php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #29545 array_pop() warning about FALSE
Submitted: 2004-08-06 11:54 UTC Modified: 2004-08-06 12:04 UTC
From: kingoleg at mail dot ru Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: all
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kingoleg at mail dot ru
New email:
PHP Version: OS:

 

 [2004-08-06 11:54 UTC] kingoleg at mail dot ru
Description:
------------
I have found a "bug" on page function.array-pop.html

I read:

If array is empty (or is not an array), NULL will be returned. 

But there is a warning about FALSE:

This function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE, such as 0 or "". Please read the section on Booleans for more information. Use the === operator for testing the return value of this function.

So, I know, that this warning is exists in man of function that on failure return (boolean)FALSE but can return (integer)0 that equal (in == sense) to FALSE.

I think, that this warning is not needed on this page.

Reproduce code:
---------------
http://us2.php.net/manual/en/function.array-pop.php

Expected result:
----------------
There is no Warning about FALSE.

Actual result:
--------------
Warning about FALSE

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-06 12:04 UTC] nlopess@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:11 UTC] phpdocbot@php.net
Automatic comment on behalf of nlopess
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=79e60a89287cffd16a1df87ae2e4ba0dac138fc8
Log: fix #29545: remove bogus warning
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Aug 06 22:00:03 2025 UTC