3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = 2; function innerScope() { global $foo; print_r(get_defined_vars()); } innerScope();
Output for 4.3.0 - 7.2.0
Array ( [foo] => 2 )