ID: 34697 User updated by: direvus at gmail dot com Reported By: direvus at gmail dot com -Status: Bogus +Status: Open Bug Type: Documentation problem Operating System: Linux PHP Version: Irrelevant New Comment:
No, it doesn't. It says "some of the new features of PHP5". That's extremely non-specific. It could mean that only a couple of the new features cause the restriction, or it could mean that all of them do. And I'd like to reiterate my point that, regardless of how clear the mention is, it is not where it needs to be. It needs to be in the manual *and* in the migration guide. This is a significant (and again, peculiar) property of PHP5 class syntax. It's just not right to leave it out of the manual. Whether you think the existing sentence is sufficient or not, how is the manual not improved by adding this? Previous Comments: ------------------------------------------------------------------------ [2005-10-02 18:21:56] [EMAIL PROTECTED] I think it is clear enough. It says that if you use the "new" PHP 5 features (interfaces, inheritance,..) you must declare the class before using it. ------------------------------------------------------------------------ [2005-10-01 03:12:54] direvus at gmail dot com Description: ------------ In the php5 migration guide, we have "In some cases classes must be declared before used. It only happens only if some of the new features of PHP 5 are used. Otherwise the behaviour is the old." I request that this behaviour be documented properly (which features? And why?) in the manual chapter on Classes and Objects in PHP5. I think for most people who are accustomed to PHP definition conventions, this will come as a surprise. Functions never need to be declared before use. Even methods within a class definition need not be declared before use. So why do we have this strange requirement in the declaration of classes? This vague mention in the migration guide really isn't sufficient ... it's a strange and opaque behaviour whether you're migrating code or not. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34697&edit=1