ID: 28240 Updated by: [EMAIL PROTECTED] Reported By: php at jort dot net -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: Win2000 Pro PHP Version: 5.0.0RC2 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php . Previous Comments: ------------------------------------------------------------------------ [2004-05-04 05:51:30] phpbug at gb404 dot com It is totally normal. As far as I can remember, PHP never needed to declare a variable before using it. ------------------------------------------------------------------------ [2004-04-30 22:30:09] php at jort dot net Description: ------------ When you assign a value to a class member that was not declared the system defines a new class member. I'm not sure this is a feature or a bug. I would expect an error or at least a notice or a warning. Reproduce code: --------------- <?php class foo { function __construct() { $this->foo = "test"; } } $bar = new foo(); print $bar->foo; ?> Expected result: ---------------- Notice/Warning/Error Actual result: -------------- test ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28240&edit=1
