3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $decurrying = function ($arg = null, $acc = '') use (&$decurrying) { return $arg === null ? $acc : function ($arg, $acc) use (&$decurrying) { return $decurrying($arg, $acc . $arg); }; }; $result = $decurrying(1)(3)(3)(8)(); var_dump($result);
based on 73WR9
Output for 7.1.0 - 7.3.0rc3
Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed in /in/YZH0T on line 9 and exactly 2 expected in /in/YZH0T:4 Stack trace: #0 /in/YZH0T(9): {closure}(3) #1 {main} thrown in /in/YZH0T on line 4
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Warning: Missing argument 2 for {closure}(), called in /in/YZH0T on line 9 and defined in /in/YZH0T on line 4 Notice: Undefined variable: acc in /in/YZH0T on line 5 Warning: Missing argument 2 for {closure}(), called in /in/YZH0T on line 9 and defined in /in/YZH0T on line 4 Notice: Undefined variable: acc in /in/YZH0T on line 5 Warning: Missing argument 2 for {closure}(), called in /in/YZH0T on line 9 and defined in /in/YZH0T on line 4 Notice: Undefined variable: acc in /in/YZH0T on line 5 Warning: Missing argument 1 for {closure}(), called in /in/YZH0T on line 9 and defined in /in/YZH0T on line 4 Warning: Missing argument 2 for {closure}(), called in /in/YZH0T on line 9 and defined in /in/YZH0T on line 4 Notice: Undefined variable: arg in /in/YZH0T on line 5 Notice: Undefined variable: acc in /in/YZH0T on line 5 Notice: Undefined variable: arg in /in/YZH0T on line 5 string(0) ""
Output for hhvm-3.15.4
Warning: __invoke() expects exactly 2 parameters, 1 given in /in/YZH0T on line 5 Notice: Undefined variable: acc in /in/YZH0T on line 5 Warning: __invoke() expects exactly 2 parameters, 1 given in /in/YZH0T on line 5 Notice: Undefined variable: acc in /in/YZH0T on line 5 Warning: __invoke() expects exactly 2 parameters, 1 given in /in/YZH0T on line 5 Notice: Undefined variable: acc in /in/YZH0T on line 5 Warning: __invoke() expects exactly 2 parameters, 0 given in /in/YZH0T on line 5 Notice: Undefined variable: arg in /in/YZH0T on line 5 Notice: Undefined variable: arg in /in/YZH0T on line 5 Notice: Undefined variable: acc in /in/YZH0T on line 5 string(0) ""
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected '(' in /in/YZH0T on line 9
Process exited with code 255.