Global vs function level
<?php $a = 7; function test() { global $a; $a = 20; } test(); echo "\$a = $a\n"; ?>