#42272 [Opn->Asn]: var_export() incorrectly escapes char(0)

From: Date: Sat, 11 Aug 2007 16:09:11 +0000
Subject: #42272 [Opn->Asn]: var_export() incorrectly escapes char(0)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-115971@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: Open +Status: Assigned Bug Type: Variables related Operating System: WindowsXP PHP Version: 5.2.4RC1 -Assigned To: +Assigned To: derick Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#115971) next »