- var_dump: documentation ( source)
- unserialize: documentation ( source)
<?php
class Foo
{
function __wakeup()
{
print "[-] Wakeup method called!\n";
}
function __destruct()
{
print "[-] Destruct method called!\n";
var_dump($this);
}
}
$normal = 'O:3:"Foo":1:{s:1:"x";s:1:"y";}';
$broken = 'O:3:"Foo":2:{s:1:"x";s:1:"y";}';
unserialize($normal);
unserialize($broken);