note 83737 added to language.references

From: Date: Mon, 09 Jun 2008 19:40:22 +0000
Subject: note 83737 added to language.references
Groups: php.notes 
Request: Send a blank email to php-notes+get-140287@lists.php.net to get a copy of this message
This is discussed before (below) but bears repeating: $a = null; ($a =& null; does not parse) is NOT the same as unset($a); $a = null; replaces the value at the destination of $a with the null value; If you chose to use a convention like $NULL = NULL; THEN, you could say $a =& $NULL to break any previous reference assignment to $a (setting it of course to $NULL), which could still get you into trouble if you forgot and then said $a = '5'. Now $NULL would be '5'. Moral: use unset when it is called for. ---- Server IP: 69.147.83.197 Probable Submitter: 76.105.247.92 ---- Manual Page -- http://www.php.net/manual/en/language.references.php Edit -- https://master.php.net/note/edit/83737 Del: integrated -- https://master.php.net/note/delete/83737/integrated Del: useless -- https://master.php.net/note/delete/83737/useless Del: bad code -- https://master.php.net/note/delete/83737/bad+code Del: spam -- https://master.php.net/note/delete/83737/spam Del: non-english -- https://master.php.net/note/delete/83737/non-english Del: in docs -- https://master.php.net/note/delete/83737/in+docs Del: other reasons-- https://master.php.net/note/delete/83737 Reject -- https://master.php.net/note/reject/83737 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140287) next »