note 72389 added to function.unset

From: Date: Wed, 17 Jan 2007 11:51:49 +0000
Subject: note 72389 added to function.unset
Groups: php.notes 
Request: Send a blank email to php-notes+get-121828@lists.php.net to get a copy of this message
To clarify what hugo dot dworak at gmail dot com said about unsetting things that aren't already set: unsetting a non-existent key within an array does NOT throw an error. <? $array = array(); unset($array[2]); //this does not throw an error unset($array[$undefinedVar]); //Throws an error because of the undefined variable, not because of a non-existent key. ?> ---- Server IP: 83.138.144.80 Probable Submitter: 81.138.3.30 ---- Manual Page -- http://www.php.net/manual/en/function.unset.php Edit -- https://master.php.net/note/edit/72389 Del: integrated -- https://master.php.net/note/delete/72389/integrated Del: useless -- https://master.php.net/note/delete/72389/useless Del: bad code -- https://master.php.net/note/delete/72389/bad+code Del: spam -- https://master.php.net/note/delete/72389/spam Del: non-english -- https://master.php.net/note/delete/72389/non-english Del: in docs -- https://master.php.net/note/delete/72389/in+docs Del: other reasons-- https://master.php.net/note/delete/72389 Reject -- https://master.php.net/note/reject/72389 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#121828) next »