Skip to content

Instantly share code, notes, and snippets.

@shin1x1
Created November 18, 2010 23:17
Show Gist options
  • Save shin1x1/705871 to your computer and use it in GitHub Desktop.
Save shin1x1/705871 to your computer and use it in GitHub Desktop.
<?php
class Foo {
public $value = 'abc';
public function __wakeup() {
echo(__METHOD__).PHP_EOL;
}
public function __destruct() {
echo(__METHOD__).PHP_EOL;
}
}
function func($text) {
echo('func start').PHP_EOL;
$a = unserialize($text);
echo('func end').PHP_EOL;
}
func('O:3:"Foo":1:{s:5:"value";s:3:"abc";}');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment