#25758 [Opn->Bgs]: var_export fails to escape quotes

From: Date: Mon, 06 Oct 2003 20:11:44 +0000
Subject: #25758 [Opn->Bgs]: var_export fails to escape quotes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-48600@lists.php.net to get a copy of this message
ID: 25758 Updated by: iliaa@php.net Reported By: hiroki at asakawa dot net -Status: Open +Status: Bogus Bug Type: Variables related Operating System: Widows2000 PHP Version: 4.3.3 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This is expected behaviour. Previous Comments: ------------------------------------------------------------------------ [2003-10-06 07:15:31] hiroki at asakawa dot net Description: ------------ Using var_export, single quotes in keys are not be escaped. Reproduce code: --------------- $test = array( "quote'" => array( "quote'" ) ); echo var_export($test,true); Expected result: ---------------- output: array ( 'quote\'' => array ( 0 => 'quote\'', ), ) Actual result: -------------- output: array ( 'quote'' => array ( 0 => 'quote\'', ), ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25758&edit=1

« previous php.bugs (#48600) next »