3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if (true) { $test = new TestClass(); } class TestClass { function TestClass() { print "hello!"; } function __construct() { print "hello!"; } }
based on NBX6r
Output for 4.3.0 - 4.4.9, 7.0.0 - 7.1.0
hello!
Output for 5.0.0 - 5.6.28
Strict Standards: Redefining already defined constructor for class TestClass in /in/SW4HW on line 12 hello!