|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-07-13 02:06 UTC] yohgaki@php.net
-Status: Open
+Status: Feedback
-Package: Feature/Change Request
+Package: *General Issues
[2014-07-13 02:06 UTC] yohgaki@php.net
[2014-12-30 10:41 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 03:00:01 2025 UTC |
Description: ------------ It does not seem possible to reduce the following two statements into a single statement. <? $in=array(1=>'a', 2=>'b', 3=>array('aa', 'bb')); $in[3]['cc']=&$in[3]; ?> I would suspect that this is the same or similar issue that causes the following statement to fail: <? var_export($in); ?> Reproduce code: --------------- <? $in=array(1=>'a', 2=>'b', 3=>array('aa', 'bb')); $in[3]['cc']=&$in[3]; var_export($in); ?> Expected result: ---------------- array( 1 => 'a', 2 => 'b', 3 => array( 0 => 'aa', 1 => 'bb', 'cc' => &$this->3, ) ); /* Note: as I've said before, there doesn't seem to be a method to refer to an element within the array being created at assignment time, I've used object syntax instead */ Actual result: -------------- array ( 1 => 'a', 2 => 'b', 3 => array ( 0 => 'aa', 1 => 'bb', 'cc' => array ( 0 => 'aa', 1 => 'bb', 'cc' => array ( 0 => 'aa', 1 => 'bb', 'cc' => array ( Fatal error: Nesting level too deep - recursive dependency? in /home/bens/delete on line 4