3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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.4.10 - 5.6.16
Parse error: syntax error, unexpected ')', expecting variable (T_VARIABLE) or '$' in /in/pfiJ1 on line 19
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected ')', expecting T_VARIABLE or '$' in /in/pfiJ1 on line 19
Process exited with code 255.