3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { public function test2(array $p = []) { print_r($p); return null; } public function getName($key) { return 'test' . $key; } } $a = new A; $b = 2; $a->($a->getName($b))([ 'firstName' => 'Nikita', 'secondName' => 'Gopkalo', ]); echo date('d.m.Y');
Output for 5.4.0 - 5.4.15
Parse error: syntax error, unexpected '(', expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /in/7Yk9k on line 15
Process exited with code 255.
Output for 5.3.0 - 5.3.25
Parse error: syntax error, unexpected '[' in /in/7Yk9k on line 3
Process exited with code 255.