|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-04-12 09:14 UTC] peehaa@php.net
[2019-04-12 09:16 UTC] peehaa@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: peehaa
[2019-04-12 09:16 UTC] peehaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 18 07:00:02 2025 UTC |
Description: ------------ The 2nd example for array_filter shows its usage without a callback to filter empty array elements. The example does not include entries for zero values, which could cause issues for newer developers who aren't familiar with PHP's type system. I would suggest updating the example to include zero values: $entry = array( 0 => 'foo', 1 => false, 2 => -1, 3 => null, 4 => '', 5 => '0', 6 => 0, ); print_r(array_filter($entry));