3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { function Foo() { echo 'old constructor'; } function __construct() { echo 'new constructor'; } } $foo = new Foo();
based on JMpMR
Output for 7.0.0 - 7.2.0
new constructor
Output for 5.0.0 - 5.6.28
Strict Standards: Redefining already defined constructor for class Foo in /in/gGJpP on line 10 new constructor
Output for 4.3.0 - 4.4.9
old constructor