Created
March 3, 2014 14:31
-
-
Save anonymous/9326129 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Oele { | |
function __construct() { | |
echo __METHOD__ . "\n"; | |
} | |
function __wakeup() { | |
echo __METHOD__ . "\n"; | |
} | |
} | |
$user = new Oele; | |
$user->oele = 'boele'; | |
$user->x = 12344; | |
// $user = (object) array('oele' => 'boele', 'x' => 4523); | |
echo $serialized = serialize($user) . "\n\n"; | |
$user = unserialize($serialized); | |
print_r($user); | |
class Boele { | |
function __construct() { | |
echo "FUCKER!\n"; | |
} | |
function __wakeup() { | |
echo __METHOD__ . "\n"; | |
} | |
} | |
$user = unserialize('O:5:"Boele":2:{s:4:"oele";s:5:"boele";s:1:"x";i:12344;}'); | |
print_r($user); | |
echo var_export($user); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment