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-- Serialize() must return a string or NULL --FILE-- <?php Class C implements Serial..
Decoded Output download
--TEST--
Serialize() must return a string or NULL
--FILE--
<?php
Class C implements Serializable {
public function serialize() {
return $this;
}
public function unserialize($blah) {
}
}
try {
var_dump(serialize(new C));
} catch (Exception $e) {
echo $e->getMessage(). "
";
}
echo "Done";
?>
--EXPECTF--
Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d
C::serialize() must return a string or NULL
Done
Did this file decode correctly?
Original Code
--TEST--
Serialize() must return a string or NULL
--FILE--
<?php
Class C implements Serializable {
public function serialize() {
return $this;
}
public function unserialize($blah) {
}
}
try {
var_dump(serialize(new C));
} catch (Exception $e) {
echo $e->getMessage(). "\n";
}
echo "Done";
?>
--EXPECTF--
Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d
C::serialize() must return a string or NULL
Done
Function Calls
None |
Stats
MD5 | d2c5c21c8b6de576ad211f88ba2cbdeb |
Eval Count | 0 |
Decode Time | 111 ms |