3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(~0); ini_set('display_errors', '1'); class c { function __construct() { echo "construct\r\n"; return false; } function c(){ return $this->__construct(); } function __destruct() { echo "destruct\r\n"; } } $c = new c;
based on BHnOO
Output for 5.2.14 - 5.2.17, 5.3.3 - 7.2.0
construct destruct
Output for 5.0.0 - 5.2.13, 5.3.0 - 5.3.2
Strict Standards: Redefining already defined constructor for class c in /in/pben2 on line 7 construct destruct
Output for 4.3.0 - 4.4.9
construct