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 -- h
ttps://master.php.net/note/delete/78045/integrated
Del: useless -- http
s://master.php.net/note/delete/78045/useless
Del: bad code -- htt
ps://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 -- http
s://master.php.net/note/delete/78045/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78045
Reject -- https://mast
er.php.net/note/reject/78045
Search -- https://
master.php.net/manage/user-notes.php
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|