3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { function A() { echo "A::A\n"; } function __construct() { echo "A::__construct\n"; } } class B { function __construct() { echo "B::__construct\n"; } function B() { echo "B::B\n"; } } new A(); new B();
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
A::__construct B::__construct
Output for 5.2.14 - 5.2.17, 5.3.3 - 5.6.28
Strict Standards: Redefining already defined constructor for class A in /in/tjqkS on line 6 A::__construct B::__construct
Output for 5.0.0 - 5.2.13, 5.3.0 - 5.3.2
Strict Standards: Redefining already defined constructor for class A in /in/tjqkS on line 6 Strict Standards: Redefining already defined constructor for class B in /in/tjqkS on line 15 A::__construct B::__construct
Output for 4.3.0 - 4.4.9
A::A B::B