3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function new() { return 3; } class Test { const private = 1; const public = 2; public static function new() { return new Test; } public function for() {} public function while() {} public function abstract() {} public function public() {} public function private() {} }
based on CAF0X
Output for 5.4.10 - 5.4.45, 7.0.0
Parse error: syntax error, unexpected 'new' (T_NEW), expecting identifier (T_STRING) or '(' in /in/3V3Oh on line 3
Process exited with code 255.
Output for 5.5.24 - 5.6.16
Parse error: syntax error, unexpected 'new' (T_NEW), expecting '(' in /in/3V3Oh on line 3
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected T_NEW, expecting T_STRING or '(' in /in/3V3Oh on line 3
Process exited with code 255.