Bug #75681 [NEW]: Warning: Narrowing occurred during type inference (specific case)

From: Date: Thu, 14 Dec 2017 02:55:00 +0000
Subject: Bug #75681 [NEW]: Warning: Narrowing occurred during type inference (specific case)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213088@lists.php.net to get a copy of this message
From: chris at ocproducts dot com Operating system: Mac OS High Sierra (fully patche PHP version: 7.2.0 Package: opcache Bug Type: Bug Bug description:Warning: Narrowing occurred during type inference (specific case) Description: ------------ Running on the latest of everything, the attached reduced test case fails when opcache is enabled. "Warning: Narrowing occurred during type inference. Please file a bug report on bugs.php.net in Unknown on line 0" It is affecting Composr CMS, we found it from in the wild for customer(s) upgraded to PHP 7.2. This is not fixed by these commits: https://github.com/php/php-src/commit/776bef8447f2848c043e4716a1e08c4ac5a88fdb https://github.com/php/php-src/commit/5934bff91337b876195e9290b0811240052be7a3 I also confirmed it is not fixed in git HEAD. Test script: --------------- <?php function foobar() { do { foreach ($a as $i => $_) { $a[$i][0] += 1; } $a[] = array(0, 0); } while ($x !== false); } -- Edit bug report at https://bugs.php.net/bug.php?id=75681&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75681&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75681&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75681&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75681&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75681&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75681&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75681&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75681&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75681&r=support Expected behavior: https://bugs.php.net/fix.php?id=75681&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75681&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75681&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75681&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75681&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75681&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75681&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75681&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75681&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75681&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75681&r=mysqlcfg

« previous php.bugs (#213088) next »