3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A { function x(self $o); } class B implements A { function x(self $o) { return $o; } } class C extends B { } $c = new C(); var_dump($c->x($));
Output for 7.0.0
Parse error: syntax error, unexpected ')', expecting variable (T_VARIABLE) or '{' or '$' in /in/pfiJ1 on line 19
Process exited with code 255.
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Parse error: syntax error, unexpected ')', expecting variable (T_VARIABLE) or '$' in /in/pfiJ1 on line 19
Process exited with code 255.

preferences:
164.98 ms | 1395 KiB | 24 Q