|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-05-12 12:09 UTC] narf@php.net
-Status: Open
+Status: Duplicate
-Package: PHP Language Specification
+Package: Scripting Engine problem
[2017-05-12 12:09 UTC] narf@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 20:00:01 2025 UTC |
Description: ------------ When initialize a variable as an integer, and later try to dump a non existent key, PHP dump it as null, and do not drop notice. If you assign string, it drops the notice. Test script: --------------- error_reporting(E_ALL); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); $array = 666; var_dump($array); var_dump($array['test']); $a = $array['test']; var_dump($a); Expected result: ---------------- Notice: Undefined index: test Actual result: -------------- null