Adrian Cid Almaguer wrote:
Can I give visibility to a class constant.

something like this

class foo
{
  private const = "aaa";
  protected const = "bbb";
  public const = "ccc";
}

I dont want the user of my class can access to the constant.
and I cant use public static fields because I dont want the content can be
modified even inside the class.


Mark it as static:

http://au.php.net/manual/en/language.oop5.static.php


--
Postgresql & php tutorials
http://www.designmagick.com/

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

Reply via email to