note 78045 added to language.oop5.basic

From: Date: Tue, 25 Sep 2007 15:27:35 +0000
Subject: note 78045 added to language.oop5.basic
Groups: php.notes 
Request: Send a blank email to php-notes+get-130780@lists.php.net to get a copy of this message
It should be noted that PHP, unlike many other OO languages (C++, Java, etc.), doesn't push all members to the global namespace while inside a method, so when accessing members, going through $this to do so is NOT optional. Example: <?php // $variable and method() are a member variable and a member function, respectively $variable = 'foo'; // wrong $this->variable = 'foo'; // right method(); // wrong $this->method() // right ?> ---- Server IP: 69.147.83.197 Probable Submitter: 206.162.167.230 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.basic.php Edit -- https://master.php.net/note/edit/78045 Del: integrated -- https://master.php.net/note/delete/78045/integrated Del: useless -- https://master.php.net/note/delete/78045/useless Del: bad code -- https://master.php.net/note/delete/78045/bad+code Del: spam -- https://master.php.net/note/delete/78045/spam Del: non-english -- https://master.php.net/note/delete/78045/non-english Del: in docs -- https://master.php.net/note/delete/78045/in+docs Del: other reasons-- https://master.php.net/note/delete/78045 Reject -- https://master.php.net/note/reject/78045 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130780) next »