3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?hh // strict $divide = ($x, $y) ==> $x / $y; $partial = ($f, $y) ==> $x ==> $f($x, $y); $third = $partial($divide, 3); echo $third(12);
based on PiM1J
Output for 5.4.34 - 5.4.35
Parse error: syntax error, unexpected '$divide' (T_VARIABLE) in /in/J227T on line 3
Process exited with code 255.
Output for 5.4.0 - 5.4.32
<?hh // strict $divide = ($x, $y) ==> $x / $y; $partial = ($f, $y) ==> $x ==> $f($x, $y); $third = $partial($divide, 3); echo $third(12);