note 46633 added to language.oop

From: Date: Mon, 18 Oct 2004 16:33:52 +0000
Subject: note 46633 added to language.oop
Groups: php.notes 
Request: Send a blank email to php-notes+get-78726@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/language.oop.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46633 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46633&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46633&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46633&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46633&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46633&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46633&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46633&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#78726) next »