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'; } } $a = new a(); $a();
based on oft17
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
plopinvoke
Output for 5.3.0 - 5.6.28
Strict Standards: Redefining already defined constructor for class a in /in/RAVI7 on line 6 plopinvoke
Output for 5.0.0 - 5.2.17
Strict Standards: Redefining already defined constructor for class a in /in/RAVI7 on line 6 plop Fatal error: Function name must be a string in /in/RAVI7 on line 17
Process exited with code 255.
Output for 4.4.5 - 4.4.9
construct Notice: Object to string conversion in /in/RAVI7 on line 17 Fatal error: Call to undefined function: object() in /in/RAVI7 on line 17
Process exited with code 255.
Output for 4.3.2 - 4.4.4
construct Notice: Object to string conversion in /in/RAVI7 on line 17 Fatal error: Call to undefined function: object() in /in/RAVI7 on line 17
Process exited with code 255.
Output for 4.3.0 - 4.3.1
construct Notice: Object to string conversion in /in/RAVI7 on line 17 Fatal error: Call to undefined function: object() in /in/RAVI7 on line 17