ID:               34697
 Updated by:       [EMAIL PROTECTED]
 Reported By:      direvus at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Documentation problem
 Operating System: Linux
 PHP Version:      Irrelevant
 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to