|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-12-14 06:07 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
When I call a method that initializes a instance variable that isn't declared, php doen's complain. I see this as a bug, because when I mis-spelled an instance variabele some strange things happen. Because when I trie to get the value of an instance variabele, I get the old/unitialized value. Here is some sample code: <? class apple { var $color; function fruit($new_color) { $this->color = $new_color; } function set_taste($new_taste) { $this->taste = $new_taste; } } $green_apple = new apple('green'); $green_apple->set_taste('good'); ?>