note 79527 deleted from control-structures.foreach by felipe

From: Date: Sat, 15 Dec 2007 16:05:49 +0000
Subject: note 79527 deleted from control-structures.foreach by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-133597@lists.php.net to get a copy of this message
Note Submitter: egingell at sisna dot com ---- > michpio at gazeta dot pl > 20-Nov-2007 07:53 > Because in PHP >= 5.0 arrays are always transferred by reference. No, they're not. I'm running PHP v5.2.3 <? function whatever($ary) { $ary[] = 'blah'; } $array = array(); whatever($array); print_r($array); ?> Assuming your claim is true, this should be output: Array ( 0 => 'blah', ) However, the actual output is this: Array ( )

« previous php.notes (#133597) next »