|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-12-20 12:06 UTC] requinix@php.net
-Status: Open
+Status: Verified
-PHP Version: 7.1.0
+PHP Version: 7.0
[2016-12-20 12:06 UTC] requinix@php.net
[2016-12-20 13:54 UTC] dmitry@php.net
[2016-12-20 13:54 UTC] dmitry@php.net
-Status: Verified
+Status: Closed
[2016-12-20 13:55 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 18:00:02 2025 UTC |
Description: ------------ When running the below in PHP 7.1.0, the foreach loop hangs the script, and my CPU goes to 100% utilization. If &$value is changed to $value, then it runs cleanly. Test script: --------------- <?php $a = 'aaa'; foreach ($a['bbb'] as &$value) { echo 'loop'; } unset($value); echo 'done'; Expected result: ---------------- Warning: Illegal string offset 'bbb' in /tmp/test.php on line 4 Warning: Invalid argument supplied for foreach() in /tmp/test.php on line 4 done Actual result: -------------- Warning: Illegal string offset 'bbb' in /tmp/test.php on line 4 then it hangs