|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #53886 Example is wrong
Submitted: 2011-01-31 03:56 UTC Modified: 2011-01-31 21:29 UTC
From: corrie at sloot dot ca Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: corrie at sloot dot ca
New email:
PHP Version: OS:


 [2011-01-31 03:56 UTC] corrie at sloot dot ca
From manual page:
$stack = array("orange", "banana", "apple", "raspberry");
$fruit = array_shift($stack);

the last line should be:


otherwise "orange" would also be shown


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-31 11:33 UTC]
-Status: Open +Status: Bogus
 [2011-01-31 11:33 UTC]
array_shift() will remove the first entry from $stack. "orange" is assigned to $fruit.
 [2011-01-31 21:29 UTC] corrie at sloot dot ca
My bad.  Please ignore.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jul 23 20:01:23 2021 UTC