|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-30 18:14 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 05:00:02 2025 UTC |
Have a look at this piece of code: class User { var $Name; var $Mail function SetUser() { $this->$Name = "Bill"; $this->$Mail = "bill@whitehouse.gov"; echo $this->$Name, ":", $this->$Mail; } } Maybe you will notice the mistake with the $ sign ($this->$Name instead of $this->Name, see bug report #60). But PHP doesn't print an error, it interprets the code and outputs this: bill@whitehouse.gov:bill@whitehouse.gov So, either PHP should produce an error, or there should be a better description of the missing $ sign in the "Classes and Objects" section of the documentation.