Bug #74579 [NEW]: No notice

From: Date: Fri, 12 May 2017 11:39:24 +0000
Subject: Bug #74579 [NEW]: No notice
Groups: php.standards 
Request: Send a blank email to standards-+get-1267@lists.php.net to get a copy of this message
From: vasoczki dot ferenc at gmail dot com Operating system: Irrelevant PHP version: Irrelevant Package: PHP Language Specification Bug Type: Bug Bug description:No notice 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 -- Edit bug report at https://bugs.php.net/bug.php?id=74579&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74579&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74579&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74579&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74579&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74579&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74579&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74579&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74579&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74579&r=support Expected behavior: https://bugs.php.net/fix.php?id=74579&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74579&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74579&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74579&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74579&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74579&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74579&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74579&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74579&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74579&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74579&r=mysqlcfg

« previous php.standards (#1267) next »