3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { function aMethod() { //echo "Helloddfdfd"; return $this; } function bMethod() { //echo "Hissss"; return $this; } function cMethod() { //echo "hi sudhir"; return $this->value; } } 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/n05Uk 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/n05Uk on line 17
Process exited with code 255.

preferences:
201.34 ms | 1395 KiB | 61 Q