3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class MyClass { function aMethod() { //echo "Helloddfdfd"; return $this; } function bMethod() { //echo "Hissss"; return $this; } function cMethod() { //echo "hi sudhir"; return $this; } } class YourClass extend MyClass{ function yMethod() { echo "ssss"; } } (new MyClass())->aMethod()->bMethod()->cMethod()->yMethod();
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected 'extend' (T_STRING), expecting '{' in /in/1AL2k on line 17
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting '{' in /in/1AL2k on line 17
Process exited with code 255.