3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A{ function x() {} } class B extends A{ function x() { parent::__METHOD__(); } } $o = new B; $o->x();
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined method A::__METHOD__() in /in/acA6c:10 Stack trace: #0 /in/acA6c(15): B->x() #1 {main} thrown in /in/acA6c on line 10
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Parse error: syntax error, unexpected '__METHOD__' (T_METHOD_C) in /in/acA6c on line 10
Process exited with code 255.
Output for 5.4.0 - 5.4.45
Parse error: syntax error, unexpected '__METHOD__' (T_METHOD_C), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /in/acA6c on line 10
Process exited with code 255.
Output for 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_METHOD_C, expecting T_STRING or T_VARIABLE or '$' in /in/acA6c on line 10
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_METHOD_C, expecting T_STRING or T_VARIABLE or '$' in /in/acA6c on line 10
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined method: b->__method__() in /in/acA6c on line 10
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: __method__() in /in/acA6c on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: __method__() in /in/acA6c on line 10