note 68955 added to function.isset

From: Date: Thu, 17 Aug 2006 07:13:41 +0000
Subject: note 68955 added to function.isset
Groups: php.notes 
Request: Send a blank email to php-notes+get-115994@lists.php.net to get a copy of this message
fyi: you *cannot* do assignments inside of the isset() function. although you *can* while inside of other functions such as is_null(). if (isset($var = $_GET['key'])) echo 'whatever'; //this will throw an error :( if (is_null($var = $_GET['key'])) echo 'whatever'; //this will not :) hope someone finds this useful. ---- Server IP: 216.235.15.211 Probable Submitter: 65.94.179.78 ---- 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 -- https://master.php.net/note/edit/68955 Del: integrated -- https://master.php.net/note/delete/68955/integrated Del: useless -- https://master.php.net/note/delete/68955/useless Del: bad code -- https://master.php.net/note/delete/68955/bad+code Del: spam -- https://master.php.net/note/delete/68955/spam Del: non-english -- https://master.php.net/note/delete/68955/non-english Del: in docs -- https://master.php.net/note/delete/68955/in+docs Del: other reasons-- https://master.php.net/note/delete/68955 Reject -- https://master.php.net/note/reject/68955 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#115994) next »