Doc #53886 [Bgs]: Example is wrong

From: Date: Mon, 31 Jan 2011 20:29:40 +0000
Subject: Doc #53886 [Bgs]: Example is wrong
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5897@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53886&edit=1 ID: 53886 User updated by: corrie at sloot dot ca Reported by: corrie at sloot dot ca Summary: Example is wrong Status: Bogus Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: My bad. Please ignore. Previous Comments: ------------------------------------------------------------------------ [2011-01-31 11:33:41] rquadling@php.net array_shift() will remove the first entry from $stack. "orange" is assigned to $fruit. ------------------------------------------------------------------------ [2011-01-31 03:56:55] corrie at sloot dot ca Description: ------------ --- From manual page: http://www.php.net/function.array-shift#Examples --- $stack = array("orange", "banana", "apple", "raspberry"); $fruit = array_shift($stack); print_r($stack); the last line should be: print_r($fruit); otherwise "orange" would also be shown ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53886&edit=1

« previous php.doc.bugs (#5897) next »