note 74273 deleted from language.oop5.patterns by bobby
| From: | bobby@php.net | Date: | Tue, 03 Apr 2007 15:16:54 +0000 |
| Subject: | note 74273 deleted from language.oop5.patterns by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-125048@lists.php.net to get a copy of this message | ||
Note Submitter: marcini
----
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...