Partner links

global or $_GLOBAL[] Versus local variables




Did some tests and found out that scripts of type

$a=5;
function foo(){
global $a;
return $a +5;
}
foo();

have relatively bad performance ….

try to use something like

$a=5;
function foo($a){
return $a +5;
}
foo($a);

instead …

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>