$ GLOBALS [ 'value'] and the global keyword usage

<?php
$a = 11;

function fun()
{
    echo $GLOBALS['a'];
    $GLOBALS['a']++;

}
fun();
echo '<br>'.$a;

 

? < PHP
 $ A =. 11 ; 

function Fun () 
{ 
    Global  $ A ;
     echo  $ A ; // output 
    $ A ++;   // ++ arithmetic 

} 
Fun (); // output. 11 
echo '<br>'. A $ ; // output 12

 

Guess you like

Origin www.cnblogs.com/xm666/p/11184839.html