RE: [PHP-WIN] static

From: Date: Wed, 02 Mar 2005 09:03:29 +0000
Subject: RE: [PHP-WIN] static
Groups: php.windows 
Request: Send a blank email to php-windows+get-25706@lists.php.net to get a copy of this message
Check out the Zend website http://www.zend.com/manual/language.oop5.static.php Neil Morgan -----Original Message----- From: Joakim Ling [mailto:jl@webbhuset.se] Sent: 02 March 2005 08:53 To: php-windows@lists.php.net Subject: [PHP-WIN] static 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?

« previous php.windows (#25706) next »