|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-04 05:51 UTC] phpbug at gb404 dot com
[2004-05-04 09:01 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 05:00:01 2025 UTC |
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