3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(0); class a { var $x = 0; function a() { echo "CONSTRUCTOR CALLED\r\n"; } function b($var) { return $var . 'x'; } } print_r(array_map(array('a', 'b'), array('a', 'b'))); echo a::b('hh');
based on JC4tl
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/bl14p on line 5 Array ( [0] => ax [1] => bx ) hhx
Output for 4.3.0 - 4.4.9, 5.1.3 - 5.6.25
Array ( [0] => ax [1] => bx ) hhx
Output for 5.0.0 - 5.1.2
Strict Standards: var: Deprecated. Please use the public/private/protected modifiers in /in/bl14p on line 6 Array ( [0] => ax [1] => bx ) hhx