note 46633 rejected from language.oop by sean
| From: | sean@php.net | Date: | Mon, 18 Oct 2004 16:53:51 +0000 |
| Subject: | note 46633 rejected from language.oop by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78728@lists.php.net to get a copy of this message | ||
Note Submitter: gawain dot lavers+php at gmail dot com
----
I don't know if this is a bug or a "feature", but I had an odd error when defining a
class. I'm accustomed to adding a comment at the end of long blocks of code, like:
<?php
foreach($arr as $el) {
...lots of nested blocks...
};//end foreach
?>
However, trying to do that for object methods failed to parse properly:
<?php
class test {
function test() {
...code...
};//end constructor test
}
?>
While this looks like a bug in the parser, I've run across odd behavior like this in other
languages that was ultimately considered a "feature" because it was an inescapable result
of the language definition.