Created
August 31, 2013 00:49
-
-
Save mbrowne/6395560 to your computer and use it in GitHub Desktop.
PHP serialization format for protected properties
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
class Test | |
{ | |
protected $foo; | |
function __construct($foo) { | |
$this->foo = $foo; | |
} | |
} | |
$str = 'O:4:"Test":1:{s:6:"'."\0".'*'."\0".'foo";s:3:"bar";}'; | |
$obj = unserialize($str); | |
var_dump($obj); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment