|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75630 Narrowing occurred during type inference
Submitted: 2017-12-05 10:00 UTC Modified: 2017-12-05 10:41 UTC
From: m dot sevastyanov at s7 dot ru Assigned:
Status: Duplicate Package: opcache
PHP Version: 7.1.12 OS: Linux/Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: m dot sevastyanov at s7 dot ru
New email:
PHP Version: OS:


 [2017-12-05 10:00 UTC] m dot sevastyanov at s7 dot ru
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:

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 in Unknown on line 0


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-05 10:04 UTC]
-Status: Open +Status: Feedback
 [2017-12-05 10:04 UTC]
Please review the existing bugs to determine if any are relevant to you.
 [2017-12-05 10:40 UTC] m dot sevastyanov at s7 dot ru
Looks like this one is related:
 [2017-12-05 10:41 UTC]
-Status: Feedback +Status: Duplicate
 [2017-12-05 10:41 UTC]
Please try using this snapshot:
For Windows:
 [2017-12-06 02:33 UTC] m dot sevastyanov at s7 dot ru
I confirm this bug is fixed in the snapshot for windows
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 17:01:31 2024 UTC