ID: 32869 Updated by: [EMAIL PROTECTED] Reported By: thomas dot ene at gmail dot com -Status: Open +Status: Bogus Bug Type: Session related Operating System: Windows PHP Version: 4.3.9 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. This has nothing to do with sessions. (same happens if you replace $_SESSION['aaa'] with e.g. $bar) Please read this manual page and try to understand how references work: http://www.php.net/manual/en/language.references.php Previous Comments: ------------------------------------------------------------------------ [2005-04-28 17:31:31] thomas dot ene at gmail dot com Description: ------------ Let's say I have a class c1. Doing this: $obj = &$_SESSION['obj']; $obj = &new c1(); would set $_SESSION['obj'] to NULL. Reproduce code: --------------- <?php class c1 { var $v; function c1($a) { $this->v = $a; } function say() { print "{$this->v}<br>"; } } session_start(); session_destroy(); $obj = &$_SESSION['aaa']; $obj = &new c1(6); var_dump($_SESSION['aaa']); ?> Expected result: ---------------- I would expect to have an object in the $_SESSION['aaa'] Actual result: -------------- The actual result is NULL. Sorry if this is post in not pertinent but I haven't found any support related to this. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32869&edit=1