#42272 [Csd->Opn]: var_export() incorrectly escapes char(0)
| From: | derick@php.net | Date: | Mon, 17 Dec 2007 13:39:24 +0000 |
| Subject: | #42272 [Csd->Opn]: var_export() incorrectly escapes char(0) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-120702@lists.php.net to get a copy of this message | ||
ID: 42272
Updated by: derick@php.net
Reported By: pilots at rambler dot ru
-Status: Closed
+Status: Open
Bug Type: Variables related
Operating System: WindowsXP
PHP Version: 5.2.4RC1
Assigned To: derick
New Comment:
There is still an issue, with array keys and \0
Previous Comments:
------------------------------------------------------------------------
[2007-12-09 16:55:51] derick@php.net
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2007-08-11 15:50:22] pilots at rambler dot ru
Description:
------------
var_export() incorrectly escapes char(0) in strings. It returns '\000'
in single quotes, therefore then this string can not be imported
correctly.
Reproduce code:
---------------
eval('echo '.var_export("\0",true).';');
Expected result:
----------------
// chr(0)
Actual result:
--------------
\000
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42272&edit=1