3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { function fun() { echo "fooo"; } } $parts = ['Foo', 'fun']; (new array_shift($parts))->array_shift($parts)();
based on pd0PP
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'array_shift' not found in /in/3UCd8:11 Stack trace: #0 {main} thrown in /in/3UCd8 on line 11
Process exited with code 255.
Output for 5.4.1 - 5.6.28
Parse error: syntax error, unexpected '(' in /in/3UCd8 on line 11
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/3UCd8 on line 9
Process exited with code 255.