3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { private function __invoke() { echo "a"; }};//function() {}; $a = new A; var_dump(is_object($a), method_exists($a, '_invoke'); $a(); exit; function a($a) { } $b = 3; a($b);
Output for 5.5.0 - 5.5.3
Warning: The magic method __invoke() must have public visibility and cannot be static in /in/gAaEE on line 2 Parse error: syntax error, unexpected ';' in /in/gAaEE on line 4
Process exited with code 255.
Output for 5.3.0 - 5.4.19
Parse error: syntax error, unexpected ';' in /in/gAaEE on line 4
Process exited with code 255.