I don't know why the code below giving an error on my laptop while not at my friend's.
<?php
    function myfunction() : int {
        return 10;
    }
    echo myfunction();
?>
Error
Parse error: syntax error, unexpected ':', expecting '{' in (my location) on line 2.
If I remove the ": int" on line 2 everything is fine, but can someone explain why this code can't run on mine?
 
     
    