3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Base { function __construct() { echo "Constructing Base"; } function __construct($s) { } } class Derive extends Base { function __construct() { } } new Base();
Output for 5.0.0 - 5.4.26
Fatal error: Cannot redeclare Base::__construct() in /in/dEQcA on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot redeclare __construct() in /in/dEQcA on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot redeclare __construct() in /in/dEQcA on line 8