3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class father { protected $name; function __construct($name){ $this -> name = $name; } function __destruct(){ echo "<p>".$this ->name."what the ca </p>"; } $father = new father(); }
based on HTFRQ
Output for 5.4.11 - 7.0.2
Parse error: syntax error, unexpected '$father' (T_VARIABLE), expecting function (T_FUNCTION) in /in/Qvpjd on line 11
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /in/Qvpjd on line 11
Process exited with code 255.