3v4l.org

run code in 300+ PHP versions simultaneously
<?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() {} }
Output for 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.5.30, 5.6.8 - 5.6.16
Parse error: syntax error, unexpected 'new' (T_NEW), expecting '(' in /in/3V3Oh on line 3
Process exited with code 255.

preferences:
168.24 ms | 1395 KiB | 24 Q