note 27244 rejected from function.array-shift by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Fri, 29 Nov 2002 02:14:46 +0000 |
| Subject: | note 27244 rejected from function.array-shift by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40094@lists.php.net to get a copy of this message | ||
This function doesn't return 0-values, it even stops in the example below:
$fiveElems = array(10, 5, 0, 5, 10);
while ($elem = @array_shift($fiveElems))
echo $elem . " ";
would return "10 5 ".
See http://kylie.hemmet.chalmers.se/php-array-shift-bug.php