3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(0); class a { function a() { echo "CONSTRUCTOR CALLED\r\n"; } function b($var) { return $var . 'x'; } } class c { static function w() { echo "w".$PHP_EOL; } public function f() { echo "f".$PHP_EOL; } } $cc = new c(); $cc.f(); //print_r(array_map(array('a', 'b'), array('a', 'b')));
based on S1uGt
Output for 7.0.0 - 7.2.0
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; a has a deprecated constructor in /in/s3jVj on line 5
Process exited with code 255.
Output for hhvm-3.11.1 - 3.17.3
Fatal error: Uncaught Error: Call to undefined function f() in /in/s3jVj:27 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.4.0 - 5.6.30, hhvm-3.10.1

Process exited with code 255.