note 30255 added to language.references.whatdo

From: Date: Wed, 12 Mar 2003 10:47:56 +0000
Subject: note 30255 added to language.references.whatdo
Groups: php.notes 
Request: Send a blank email to php-notes+get-45143@lists.php.net to get a copy of this message
I'm not certain if this is deliberate or a bug (I'm thinking the latter), but the following code will throw a parser error: $obj->GET =& isset($_GET) ? $_GET : $HTTP_GET_VARS; The error returned will be something like: "Parse error: parse error, unexpected T_ISSET, expecting T_NEW or T_STRING or T_VARIABLE or '$' in" etc etc etc. It appears you cannot assign references in conjunction with the ternary operator - you must use a complete if...else() statement instead. -- http://www.php.net/manual/en/language.references.whatdo.php http://master.php.net/manage/user-notes.php?action=edit+30255 http://master.php.net/manage/user-notes.php?action=delete+30255 http://master.php.net/manage/user-notes.php?action=reject+30255

« previous php.notes (#45143) next »