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 #77298 (segfault occurs when add property to unserialized ArrayObject) --FILE..
Decoded Output download
--TEST--
Bug #77298 (segfault occurs when add property to unserialized ArrayObject)
--FILE--
<?php
$o = new ArrayObject();
$o2 = unserialize(serialize($o));
$o2[1]=123;
var_dump($o2);
$o3 = new ArrayObject();
$o3->unserialize($o->serialize());
$o3['xm']=456;
var_dump($o3);
?>
--EXPECT--
object(ArrayObject)#2 (1) {
["storage":"ArrayObject":private]=>
array(1) {
[1]=>
int(123)
}
}
object(ArrayObject)#3 (1) {
["storage":"ArrayObject":private]=>
array(1) {
["xm"]=>
int(456)
}
}
Did this file decode correctly?
Original Code
--TEST--
Bug #77298 (segfault occurs when add property to unserialized ArrayObject)
--FILE--
<?php
$o = new ArrayObject();
$o2 = unserialize(serialize($o));
$o2[1]=123;
var_dump($o2);
$o3 = new ArrayObject();
$o3->unserialize($o->serialize());
$o3['xm']=456;
var_dump($o3);
?>
--EXPECT--
object(ArrayObject)#2 (1) {
["storage":"ArrayObject":private]=>
array(1) {
[1]=>
int(123)
}
}
object(ArrayObject)#3 (1) {
["storage":"ArrayObject":private]=>
array(1) {
["xm"]=>
int(456)
}
}
Function Calls
None |
Stats
MD5 | 267a693dfbaeb4bcde4793a3d03b83a9 |
Eval Count | 0 |
Decode Time | 93 ms |