static
| From: | Joakim Ling | Date: | Wed, 02 Mar 2005 08:52:40 +0000 |
| Subject: | static | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-25705@lists.php.net to get a copy of this message | ||
hi
class foo {
static public $a = 1;
public function __construct() {
echo $this->a; /* does not work */
echo foo::$a; /* work */
}
}
Can someone please explain to me why I have to call $a outside the class
to get the value?