3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; /* global scope */ function test() { var_dump($a); /* reference to local scope variable */ } test(); ?>

preferences:
36.43 ms | 402 KiB | 5 Q