public function index(){ $a = 100 ; function test(){ global $a; echo $a; } test(); echo phpversion(); }