[PHP-DEV] Re: How to access the per-class constant from a member function?

2004-08-02 Thread Kamesh Jayachandran
Hi Mehdi, Even Foo::HELLO works. My question is why simple HELLO inside a member function does not work. Why are we not able to access the static and const members of a class from inside a class member function like the way with other member variables.? Any special reasons. With regards Kamesh

[PHP-DEV] Re: How to access the per-class constant from a member function?

2004-07-28 Thread Mehdi Achour
Hi Kamesh, Try replacing Foo::HELLO with self::HELLO. This should work. (this is documented, the manual will reflect it in the next build) didou Kamesh Jayachandran wrote: Hi All, ?php class Foo { const HELLO = con\n; function memberfunc() { echo HELLO; //does not work echo