var_export() does not escape \0 character
| Bug #37262 | var_export() does not escape \0 character | ||||
|---|---|---|---|---|---|
| Submitted: | 2006-05-01 15:15 UTC | Modified: | 2007-12-09 14:31 UTC | ||
| From: | idiom at mail dot ru | Assigned: | |||
| Status: | Closed | Package: | Variables related | ||
| PHP Version: | 5.1.3, 4.4.2 | OS: | Windows | ||
| Private report: | No | CVE-ID: | None | ||
[2006-05-01 15:15 UTC] idiom at mail dot ru
Description:
------------
var_export() outputs \0 in variables as is, messing browser
Reproduce code:
---------------
$func = create_function('$a', 'return $a;');
var_export($func);
Expected result:
----------------
identical to:
$func = create_function('$a', 'return $a;');
$output = addcslashes(var_export($func, true), "\0");
echo $output;
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2006-10-09 18:09 UTC] iliaa@php.net
[2007-12-09 14:31 UTC] derick@php.net