|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-07-14 15:01 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2020-07-14 15:01 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 18:00:01 2025 UTC |
Description: ------------ Array with first element null is true Test script: --------------- $arr = [ 0 => null]; if ($arr) { echo 'is true'; } else { echo 'is false'; } //TEST 2 $arr = explode(',', null); if ($arr) { echo 'is true'; } else { echo 'is false'; } Expected result: ---------------- is false Actual result: -------------- is true