ID:               16479
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
-Bug Type:         Class/Object related
+Bug Type:         Documentation problem
 Operating System: Win98SE
 PHP Version:      4.0.6
 New Comment:

Well, you have get_class_vars() which can retrieve all the default
properties (i.e. the ones declared with 'var $foo').

And your last suggestions is against the nature of PHP. You just do not
have to declare variables to use it.

Making this a doc problem though I'm not quite sure; letting the doc
team decide.


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

[2002-04-07 18:31:55] [EMAIL PROTECTED]

I am not sure whether this is a bug, a feature, or lack of a feature.
Perhaps this should be marked a "Feature Request" then... Anyway, here
goes: the var declaration in a class seems to have no meaning
whatsoever, except perhaps for documentation purposes. PHP allows me to
assign to class variables that weren't declared without even a warning
at the highest warning reporting level. That's actually not very
surprising since PHP doesn't otherwise have declarations of variables,
but what is then the meaning of var in classes?

I suggest that PHP should at least warn about class variables that
weren't declared.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=16479&edit=1

Reply via email to