Bug #75630 [Com]: Narrowing occurred during type inference

From: Date: Wed, 06 Dec 2017 02:33:41 +0000
Subject: Bug #75630 [Com]: Narrowing occurred during type inference
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212954@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75630&edit=1 ID: 75630 Comment by: m dot sevastyanov at s7 dot ru Reported by: m dot sevastyanov at s7 dot ru Summary: Narrowing occurred during type inference Status: Duplicate Type: Bug Package: opcache Operating System: Linux/Windows PHP Version: 7.1.12 Block user comment: N Private report: N New Comment: I confirm this bug is fixed in the snapshot for windows Previous Comments: ------------------------------------------------------------------------ [2017-12-05 10:41:37] requinix@php.net Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2017-12-05 10:40:22] m dot sevastyanov at s7 dot ru Looks like this one is related: https://bugs.php.net/bug.php?id=75627 ------------------------------------------------------------------------ [2017-12-05 10:04:25] requinix@php.net Please review the existing bugs to determine if any are relevant to you. https://bugs.php.net/search.php?search_for=%22Narrowing+occurred+during+type+inference%22&boolean=2&cmd=display&status=All ------------------------------------------------------------------------ [2017-12-05 10:00:07] m dot sevastyanov at s7 dot ru Description: ------------ We get these strange errors when trying to require() or include() some classes. I managed to extract some script part enough to reproduce it. Test script: --------------- php.ini: opcache.enable_cli=1 narrowing.php: <?php class TestClass { public function test() { $seqs = []; foreach ([] as $row) { foreach ($seqs as $i => $seq) $seqs[$i][] = 0; $seqs[] = 0; } } } php -c php.ini narrowing.php Expected result: ---------------- no warning/error Actual result: -------------- Warning: Narrowing occurred during type inference. Please file a bug report on bugs.php.net in Unknown on line 0 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75630&edit=1

« previous php.bugs (#212954) next »