Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Bug #42919 (Unserializing of namespaced class object fails) --FILE-- <?php namesp..
Decoded Output download
--TEST--
Bug #42919 (Unserializing of namespaced class object fails)
--FILE--
<?php
namespace Foo;
class Bar {
}
echo serialize(new Bar) . "
";
$x = unserialize(serialize(new Bar));
echo get_class($x) . "
";
?>
--EXPECT--
O:7:"Foo\Bar":0:{}
Foo\Bar
Did this file decode correctly?
Original Code
--TEST--
Bug #42919 (Unserializing of namespaced class object fails)
--FILE--
<?php
namespace Foo;
class Bar {
}
echo serialize(new Bar) . "\n";
$x = unserialize(serialize(new Bar));
echo get_class($x) . "\n";
?>
--EXPECT--
O:7:"Foo\Bar":0:{}
Foo\Bar
Function Calls
None |
Stats
MD5 | 5275d7eb327deb7e51f4210dfcb8672e |
Eval Count | 0 |
Decode Time | 83 ms |