3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 'outside'; $f = function () use ($a) { echo $a; }; class C { public static function foo($f) { $a = 'inside'; $f(); } } C::foo($f);
based on QMc7B
Output for 5.3.18 - 7.2.0
outside