Re: syntax error?
| From: | Zak Greant | Date: | Tue, 20 Jun 2000 16:23:02 +0000 |
| Subject: | Re: syntax error? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-21848@lists.php.net to get a copy of this message | ||
At 06:16 PM 6/20/00 +0200, Jonas Jochum wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [forwarded to -dev, since noone replied on -general, and since it looks like a bug. Please CC: me, when replying. I'm only subscribed to -general] Hi, just a brief question... why does PHP4 complain about a syntax error in this construct? IMHO this should be correct, shouldn't it? $catid = (isset($HTTP_GET_VARS[catid])) ? &$HTTP_GET_VARS["catid"] : 0;I would guess that the ? : operator attempts to evaluate the expression before it assigns it to the variable. &$HTTP_GET_VARS["catid"] is not going to evaluate to anything - it is only a pointer to a variable. Just a guess - perhaps one of the heavyweights could comment or explain :) HTH, Zak Greant Creative Director Nucleus Information Service Inc. "I am rather like a mosquito in a nudist camp: I know what I ought to do, but I don't know where to begin." - Stephen Bayne