|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[1999-05-03 14:22 UTC] markjr at easydns dot com
(I've commented out the rest of this class and look at
it with application/x-httpd-php3-source .phps)
This parses fine:
if($this->fp = fsockopen($this->SERVER, $this->PORT, &$this->ERRNO, &$this->ERRMSG)):
fputs($fp, "GET $this->REQUEST $this->PROTO\n\n");
while(!feof($this->fp)) {
$this->result.= fgets($this->fp,128);
}
# if($this->DEBUG) { echo $this->result; }
else:
logit( "ERROR: submitting $field[domain] message was: $this->ERRMSG");
endif;
Now uncomment the line with if($this->DEBUG), I get
a parser error. I've noticed this happened to me on
occassion before, but I never got around to paring it
down to a few lines to reproduce it.
Move that exact uncommented line outside of the nesting
if:/endif; block and it also parses fine. In fact, moving
it into the else: block and it also parses fine.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
The problem is that you can't do "if (cond) { stuff; } else: something_else();", which is what you are trying to do. With your line commented out, the "else:" gets associated with the initial "if():".