3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class a { function a() { echo 'construct'; } function __construct() { echo 'plop'; } function __invoke() { echo 'invoke'; } } new a(); a();
based on WJOGE
Output for 7.0.0 - 7.1.0
plop Fatal error: Uncaught Error: Call to undefined function a() in /in/oft17:17 Stack trace: #0 {main} thrown in /in/oft17 on line 17
Process exited with code 255.
Output for hhvm-3.12.0
plop Fatal error: Call to undefined function a() in /in/oft17 on line 17
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.0 - 5.6.28
Strict Standards: Redefining already defined constructor for class a in /in/oft17 on line 6 plop Fatal error: Call to undefined function a() in /in/oft17 on line 17
Process exited with code 255.
Output for 4.4.5 - 4.4.9
construct Fatal error: Call to undefined function: a() in /in/oft17 on line 17
Process exited with code 255.
Output for 4.3.2 - 4.4.4
construct Fatal error: Call to undefined function: a() in /in/oft17 on line 17
Process exited with code 255.
Output for 4.3.0 - 4.3.1
construct Fatal error: Call to undefined function: a() in /in/oft17 on line 17