3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { function foo : a { return $this; } } $a = new a; var_dump($a->foo());
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.15
Parse error: syntax error, unexpected ':', expecting '(' in /in/VVCmj on line 4
Process exited with code 255.

preferences:
163.38 ms | 1395 KiB | 22 Q