Bug #76257 [Com]: NULL can be used as an array without warning

From: Date: Wed, 03 Nov 2021 14:38:59 +0000
Subject: Bug #76257 [Com]: NULL can be used as an array without warning
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-237528@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76257&edit=1 ID: 76257 Comment by: davidsmithhello653 at gmail dot com Reported by: smileytechguy at smileytechguy dot com Summary: NULL can be used as an array without warning Status: Duplicate Type: Bug Package: Arrays related Operating System: Windows 10 PHP Version: 7.2.4 Assigned To: cmb Block user comment: N Private report: N New Comment: Online service https://www.a-writer.com/professional-college-essay-writers/ - they thoroughly take care of me, I myself would not have done it also - without counterfeiting, on schedule, with genuine sources, and not simply downloaded from the Internet. In the event that you don't have the foggiest idea how to compose a paper, contact the experts, save your time! Previous Comments: ------------------------------------------------------------------------ [2018-04-23 21:22:09] cmb@php.net This is basically a duplicate of request #37676. Note that there is a respective RFC[1] which already has been accepted, but not implemented yet. [1] <https://wiki.php.net/rfc/notice-for-non-valid-array-container> ------------------------------------------------------------------------ [2018-04-23 21:01:01] smileytechguy at smileytechguy dot com Description: ------------ The special constant NULL or any value which is null can be used as an array without error, warning, or notice. PHP version: PHP 7.2.4 (cli) (built: Mar 28 2018 04:27:01) ( ZTS MSVC15 (Visual C++ 2017) x64 ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies Test script: --------------- $foo = NULL; var_dump($foo[0]); // will output NULL var_dump($foo["bar"]); // will also output NULL Expected result: ---------------- Throw at least a warning, showing that NULL was used in an invalid way. Actual result: -------------- NULL is returned ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76257&edit=1

« previous php.bugs (#237528) next »