php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #43760 Small update current() function.
Submitted: 2008-01-05 15:58 UTC Modified: 2008-01-06 12:31 UTC
From: phpbugs at dnr dot servegame dot org Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: any
Private report: No CVE-ID: None
 [2008-01-05 15:58 UTC] phpbugs at dnr dot servegame dot org
Description:
------------
current() also returns FALSE if the array is empty. This isn't mentioned in the documentation. Might seem obvious, but it could also return NULL.

Reproduce code:
---------------
<?php
$map = array();
var_dump(current($map));
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-06 12:31 UTC] felipe@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.

Added information and example. :)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 07:00:01 2026 UTC