3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php trait T { static function foo() { echo 'OK', PHP_EOL; } } T::foo(); fb_intercept('T::foo', function() { echo 'NOT '; }); T::foo();
based on dQNXR
Output for 7.0.0 - 7.2.0
OK Fatal error: Uncaught Error: Call to undefined function fb_intercept() in /in/h1hLS:13 Stack trace: #0 {main} thrown in /in/h1hLS on line 13
Process exited with code 255.
Output for 5.4.2 - 5.6.28
OK Fatal error: Call to undefined function fb_intercept() in /in/h1hLS on line 13
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/h1hLS on line 3
Process exited with code 255.