3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Adult { publis static function get() { return new self(); } } class Child extends Adult {} var_dump(get_class_name(Adult::get())); var_dump(get_class_name(Child::get()));
Output for 5.4.0 - 5.4.16, 5.5.0
Parse error: syntax error, unexpected 'publis' (T_STRING), expecting function (T_FUNCTION) in /in/qhHOj on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in /in/qhHOj on line 4
Process exited with code 255.

preferences:
179.69 ms | 1395 KiB | 52 Q