3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $calc = function ($arg = null, $acc = '') use (&$calc) { return $arg === null ? $acc : function ($arg, $acc = '') use (&$calc) { return $calc($arg, $acc . $arg); }; }; $result = $decurrying(1)(3)(3)(8)(); var_dump($result);
based on TvAhd
Output for 7.0.0 - 7.3.1
Notice: Undefined variable: decurrying in /in/3RPRe on line 9 Fatal error: Uncaught Error: Function name must be a string in /in/3RPRe:9 Stack trace: #0 {main} thrown in /in/3RPRe on line 9
Process exited with code 255.
Output for hhvm-3.15.4
Notice: Undefined variable: decurrying in /in/3RPRe on line 9 Fatal error: Uncaught Error: Function name must be a string in /in/3RPRe:9 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '(' in /in/3RPRe on line 9
Process exited with code 255.