RE: static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-----Original Message-----
From: Joakim Ling [mailto:jl@xxxxxxxxxxxx] 
Sent: 02 March 2005 08:53
To: php-windows@xxxxxxxxxxxxx
Subject:  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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux