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 #35895 (__sleep and private property) --FILE-- <?php class Parents { priva..
Decoded Output download
--TEST--
Bug #35895 (__sleep and private property)
--FILE--
<?php
class Parents {
private $parents;
public function __sleep() {
return array("parents");
}
}
class Child extends Parents {
private $child;
public function __sleep() {
return array_merge(array("child"), parent::__sleep());
}
}
$obj = new Child();
serialize($obj);
?>
--EXPECTF--
Warning: serialize(): "parents" returned as member variable from __sleep() but does not exist in %s on line %d
Did this file decode correctly?
Original Code
--TEST--
Bug #35895 (__sleep and private property)
--FILE--
<?php
class Parents {
private $parents;
public function __sleep() {
return array("parents");
}
}
class Child extends Parents {
private $child;
public function __sleep() {
return array_merge(array("child"), parent::__sleep());
}
}
$obj = new Child();
serialize($obj);
?>
--EXPECTF--
Warning: serialize(): "parents" returned as member variable from __sleep() but does not exist in %s on line %d
Function Calls
None |
Stats
MD5 | 775653a00461c9223c50e7d655f26f75 |
Eval Count | 0 |
Decode Time | 75 ms |