#25758 [NEW]: var_export fails to escape quotes
| From: | hiroki at asakawa dot net | Date: | Mon, 06 Oct 2003 11:15:31 +0000 |
| Subject: | #25758 [NEW]: var_export fails to escape quotes | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-48580@lists.php.net to get a copy of this message | ||
From: hiroki at asakawa dot net
Operating system: Widows2000
PHP version: 4.3.3
PHP Bug Type: Variables related
Bug description: var_export fails to escape quotes
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 bug report at http://bugs.php.net/?id=25758&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25758&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25758&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25758&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25758&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25758&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25758&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25758&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25758&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25758&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25758&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25758&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25758&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25758&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25758&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25758&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25758&r=float