From: [EMAIL PROTECTED] Operating system: Win98SE PHP version: 4.0.6 PHP Bug Type: Class/Object related Bug description: var declaration in class has no meaning?
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 bug report at http://bugs.php.net/?id=16479&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16479&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16479&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16479&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16479&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16479&r=support Expected behavior: http://bugs.php.net/fix.php?id=16479&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16479&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16479&r=submittedtwice