note 90819 added to function.var-export
| From: | Tahir at osu1 dot php dot net | Date: | Mon, 11 May 2009 18:13:24 +0000 |
| Subject: | note 90819 added to function.var-export | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154462@lists.php.net to get a copy of this message | ||
Glen,
Surprisingly array_merge() somehow handles recursive references as well. So we can write:
<?php
$lunars=array_merge($GLOBALS);
$lunars[GLOBALS]="-deleted-";
$lunars_str = var_export($lunars, TRUE);
?>
until the bug in var_export() function is removed.
----
Server IP: 69.147.83.197
Probable Submitter: 212.174.90.237
----
Manual Page -- http://www.php.net/manual/en/function.var-export.php
Edit -- https://master.php.net/note/edit/90819
Del: integrated -- https://master.php.net/note/delete/90819/integrated
Del: useless -- https://master.php.net/note/delete/90819/useless
Del: bad code -- https://master.php.net/note/delete/90819/bad+code
Del: spam -- https://master.php.net/note/delete/90819/spam
Del: non-english -- https://master.php.net/note/delete/90819/non-english
Del: in docs -- https://master.php.net/note/delete/90819/in+docs
Del: other reasons-- https://master.php.net/note/delete/90819
Reject -- https://master.php.net/note/reject/90819
Search -- https://master.php.net/manage/user-notes.php