Doc #66123 [Com]: Bu
| From: | bl at panthera dot nl | Date: | Wed, 20 Nov 2013 11:34:24 +0000 |
| Subject: | Doc #66123 [Com]: Bu | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10619@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66123&edit=1
ID: 66123
Comment by: bl at panthera dot nl
Reported by: bhupendra dot chouhan at webdunia dot net
Summary: Bu
Status: Open
Type: Documentation Problem
Package: Arrays related
Operating System: any
PHP Version: 5.5.6
Block user comment: N
Private report: N
New Comment:
This is in regards to a ten year old *comment* on the documentation for array_pop: http://www.php.net/manual/en/function.array-pop.php#36765
Previous Comments:
------------------------------------------------------------------------
[2013-11-20 06:29:40] gabri dot ns at gmail dot com
which site? please provide the link!
------------------------------------------------------------------------
[2013-11-20 06:24:24] bhupendra dot chouhan at webdunia dot net
Description:
------------
Output is not same as given on site. ;-)
<?php
$stack= array("12" => "green", "54" => "brown",
"672" => "blue");
print_r($stack);
$fruit = array_pop($stack);
print_r($stack);
?>
Results of execution:
Array
(
[12] => green
[54] => brown
[672] => blue
)
Array
(
[0] => green
[1] => brown
)
Test script:
---------------
Bug
Expected result:
----------------
Array
(
[0] => green
[1] => brown
)
Actual result:
--------------
Array
(
[12] => green
[54] => brown
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66123&edit=1