note 77549 added to language.oop5.magic

From: Date: Mon, 03 Sep 2007 11:46:06 +0000
Subject: note 77549 added to language.oop5.magic
Groups: php.notes 
Request: Send a blank email to php-notes+get-130122@lists.php.net to get a copy of this message
If you use exit() inside __wakeup(), session data will not be saved. Example: class test { var $s='old value'; function __wakeup() { $this->run(); } function run() { echo $this->s; $this->s='new value'; exit(); } function __destruct() { $_SESSION['test']=$this; } } session_start(); if(!isset($test)) $test=new test; one could expect that after first refresh $s becomes 'new value' but it will not ---- Server IP: 82.160.108.140 Probable Submitter: 213.76.153.180 (proxied: 213.76.153.180) ---- Manual Page -- http://www.php.net/manual/en/language.oop5.magic.php Edit -- https://master.php.net/note/edit/77549 Del: integrated -- https://master.php.net/note/delete/77549/integrated Del: useless -- https://master.php.net/note/delete/77549/useless Del: bad code -- https://master.php.net/note/delete/77549/bad+code Del: spam -- https://master.php.net/note/delete/77549/spam Del: non-english -- https://master.php.net/note/delete/77549/non-english Del: in docs -- https://master.php.net/note/delete/77549/in+docs Del: other reasons-- https://master.php.net/note/delete/77549 Reject -- https://master.php.net/note/reject/77549 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130122) next »