#29361 [NEW]: var_export producing invalid code
| From: | Knightking at smempire dot org | Date: | Fri, 23 Jul 2004 22:14:37 +0000 |
| Subject: | #29361 [NEW]: var_export producing invalid code | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-63444@lists.php.net to get a copy of this message | ||
From: Knightking at smempire dot org
Operating system: XP
PHP version: 4.3.8
PHP Bug Type: Class/Object related
Bug description: var_export producing invalid code
Description:
------------
When var_export is called on an object which has another object as one of
its members, it does not produce valid code.
Reproduce code:
---------------
$a->b = 1;
eval(var_export($a, 1) . ';');
Actual result:
--------------
Fatal error: Cannot redeclare class stdclass in test.php(3) : eval()'d
code on line 1
--
Edit bug report at http://bugs.php.net/?id=29361&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29361&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29361&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29361&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29361&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29361&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29361&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29361&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29361&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29361&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29361&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29361&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29361&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29361&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29361&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29361&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29361&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29361&r=float