note 64214 added to function.isset

From: Date: Mon, 10 Apr 2006 07:04:21 +0000
Subject: note 64214 added to function.isset
Groups: php.notes 
Request: Send a blank email to php-notes+get-107682@lists.php.net to get a copy of this message
If you are developing your programs at error_reporting (E_ALL) level, you can't use isset to test whether an array element exists; isset ($foo ['index']) This will give you a warning every time. Instead you have to test whether the element exists; array_key_exists ('index', $foo) ---- Server IP: 203.202.10.60 Probable Submitter: 203.191.164.162 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.isset.php Edit -- http://master.php.net/note/edit/64214 Del: integrated -- http://master.php.net/note/delete/64214/integrated Del: useless -- http://master.php.net/note/delete/64214/useless Del: bad code -- http://master.php.net/note/delete/64214/bad+code Del: spam -- http://master.php.net/note/delete/64214/spam Del: non-english -- http://master.php.net/note/delete/64214/non-english Del: in docs -- http://master.php.net/note/delete/64214/in+docs Del: other reasons-- http://master.php.net/note/delete/64214 Reject -- http://master.php.net/note/reject/64214 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107682) next »