note 74273 added to language.oop5.patterns
| From: | marcini at osu1 dot php dot net | Date: | Tue, 03 Apr 2007 09:44:39 +0000 |
| Subject: | note 74273 added to language.oop5.patterns | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-125027@lists.php.net to get a copy of this message | ||
Be careful:
class A{
public static $prop;
public function foo(){
$this->prop = 'something';
}
}
$a = new A;
$a->foo();
This won
t cause any error (it should in my opinion), but as a result property $prop will have
value 'something' and it wont be static any more!
As if the keyword static hasn`t ever been used...
----
Server IP: 69.147.83.197
Probable Submitter: 83.17.2.186
----
Manual Page -- http://www.php.net/manual/en/language.oop5.patterns.php
Edit -- https://master.php.net/note/edit/74273
Del: integrated -- https://master.php.net/note/delete/74273/integrated
Del: useless -- https://master.php.net/note/delete/74273/useless
Del: bad code -- https://master.php.net/note/delete/74273/bad+code
Del: spam -- https://master.php.net/note/delete/74273/spam
Del: non-english -- https://master.php.net/note/delete/74273/non-english
Del: in docs -- https://master.php.net/note/delete/74273/in+docs
Del: other reasons-- https://master.php.net/note/delete/74273
Reject -- https://master.php.net/note/reject/74273
Search -- https://master.php.net/manage/user-notes.php