3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function partialLeft($cb) { return function($left) use ($cb) { return function($right) use ($cb, $left) { return $cb($left, $right); }; }; } $a = partialLeft(null); $b = $a("hello"); $c = $b("robert");
based on SV8Y2
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Function name must be a string in /in/1BFMj:6 Stack trace: #0 /in/1BFMj(12): {closure}('robert') #1 {main} thrown in /in/1BFMj on line 6
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Function name must be a string in /in/1BFMj on line 6
Process exited with code 255.