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 #62836 (Seg fault or broken object references on unserialize()) --FILE-- <?ph..
Decoded Output download
--TEST--
Bug #62836 (Seg fault or broken object references on unserialize())
--FILE--
<?php
$serialized_object='O:1:"A":4:{s:1:"b";O:1:"B":0:{}s:2:"b1";r:2;s:1:"c";O:1:"B":0:{}s:2:"c1";r:4;}';
ini_set('unserialize_callback_func','mycallback');
function mycallback($classname) {
unserialize("i:4;");
eval ("class $classname {} ");
}
print_r(unserialize($serialized_object));
echo "okey";
?>
--EXPECT--
A Object
(
[b] => B Object
(
)
[b1] => B Object
(
)
[c] => B Object
(
)
[c1] => B Object
(
)
)
okey
Did this file decode correctly?
Original Code
--TEST--
Bug #62836 (Seg fault or broken object references on unserialize())
--FILE--
<?php
$serialized_object='O:1:"A":4:{s:1:"b";O:1:"B":0:{}s:2:"b1";r:2;s:1:"c";O:1:"B":0:{}s:2:"c1";r:4;}';
ini_set('unserialize_callback_func','mycallback');
function mycallback($classname) {
unserialize("i:4;");
eval ("class $classname {} ");
}
print_r(unserialize($serialized_object));
echo "okey";
?>
--EXPECT--
A Object
(
[b] => B Object
(
)
[b1] => B Object
(
)
[c] => B Object
(
)
[c1] => B Object
(
)
)
okey
Function Calls
ini_set | 1 |
unserialize | 1 |
Stats
MD5 | f3790775a39e22278e1a52d1052326ee |
Eval Count | 0 |
Decode Time | 89 ms |