note 72605 deleted from language.variables.scope by danbrown

From: Date: Mon, 17 Oct 2011 16:23:21 +0000
Subject: note 72605 deleted from language.variables.scope by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-183931@lists.php.net to get a copy of this message
Note Submitter: Rohan ---- <?php $a = 20; function myfunction($b){ $a=30; //Local Variable global $a,$c; //here global $a overrides the local return $c=($b+$a); } print myfunction(40)+$c; ?> The output of this function will be 120.

« previous php.notes (#183931) next »