|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-12-04 14:45 UTC] laruence@php.net
[2015-12-04 14:45 UTC] laruence@php.net
-Status: Open
+Status: Closed
[2016-07-20 11:35 UTC] davey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Description: ------------ Hello I have a PHP warning with ArrayIterator when used with references. Thank you for looking at this. My test scripts works as expected if you replace 'cast($b)' by '$b = (int)$b' Test script: --------------- <?php function cast(&$a) { $a = (int)$a; } $a = new ArrayIterator; $a[-1] = 123; $b = "-1"; cast($b); echo $a[$b]; ?> Expected result: ---------------- 123 Actual result: -------------- PHP Warning: Illegal offset type in /tmp/test.php on line 12