On 4/8/13 11:28 PM, Laruence wrote:
bug is described at #64554
-> https://bugs.php.net/bug.php?id=64554
I proposal to add a leading backslash to all classnames (not only ns
names, since no harm, consistent and make sense) when doing serialize,
var_export etc.
Short term: Add note to the var_export() docs:
"For full compatibility with namespaces, the representation must be executed within the
root namespace."
Proposal seems reasonable to me (as Johannes mentioned, serialize should
already be OK).
I think we're under no obligation to have serialized forms created in one version work in
previous versions [1], though FC of already persisted strings are important.
Note this won't solve the problem of existing var_export strings created in past versions.
(We'll still need some kind of note.)
[1] If an app needs BC of code like \Foo::__set_state(... I would think it'd be easy
enough to strip away the escapes.
Steve Clay
--
http://www.mrclay.org/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php