3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class p { static public function __invoke() { echo 'invoke'; } } p();
Output for 7.0.0 - 7.3.0rc3
Warning: The magic method __invoke() must have public visibility and cannot be static in /in/c8jts on line 4 Fatal error: Uncaught Error: Call to undefined function p() in /in/c8jts:8 Stack trace: #0 {main} thrown in /in/c8jts on line 8
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Call to undefined function p() in /in/c8jts:8 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Warning: The magic method __invoke() must have public visibility and cannot be static in /in/c8jts on line 4 Fatal error: Call to undefined function p() in /in/c8jts on line 8
Process exited with code 255.