note 77549 deleted from language.oop5.magic by nlopess

From: Date: Sat, 15 Sep 2007 19:08:32 +0000
Subject: note 77549 deleted from language.oop5.magic by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-130519@lists.php.net to get a copy of this message
Note Submitter: jurek at n-s dot com dot pl ---- 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

« previous php.notes (#130519) next »