Check out the Zend website
http://www.zend.com/manual/language.oop5.static.php
Neil Morgan 

-----Original Message-----
From: Joakim Ling [mailto:[EMAIL PROTECTED] 
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?

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to