note 15663 rejected from language.references.whatdo by zak
| From: | zak@php.net | Date: | Tue, 25 Sep 2001 16:31:10 +0000 |
| Subject: | note 15663 rejected from language.references.whatdo by zak | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18289@lists.php.net to get a copy of this message | ||
There is a problem when storing references in a session.
eg:
<?
switch($act) {
case 'ini': $root->obj->val=17;break;
case 'jmp': $ptr = & $root->obj; break;
case 'set': $ptr->val++;break;
}
header ("Content-Type: text/plain");
echo "Root:";print_r($root);
echo "Ptr:";print_r($ptr);
?>
after calling with
..?act=ini
..?act=jmp
any further call leads to a segfault.
PS: I'm using php4.0.6 on linux