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; } } class YourClass extend MyClass { function yMethod() { echo "ssss"; } } //(new MyClass())->aMethod()->bMethod()->cMethod();
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected 'extend' (T_STRING), expecting '{' in /in/HOYOB 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/HOYOB on line 17
Process exited with code 255.

preferences:
176.84 ms | 1395 KiB | 61 Q