Results 1 to 3 of 3

Thread: public private functions **Resolved**

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982

    public private functions **Resolved**

    In my class I have functions , when reading tutorials on PHP the text (and often code comments) this function is private and that function is public. There is no public/private keyword specified as with other languages.
    How do we specify public/private and looking at other peoples code how can we tell whether it is public/private.
    Last edited by davidrobin; May 13th, 2004 at 05:30 AM.


    Things I do when I am bored: DotNetable

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099
    Puplic and Private do not exist in PHP before PHP 5. But i think that is still only in the beta version.

    Apart from that i dont think you can know. Pot Luck.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    So in the examples I looked at the author had put private or public in the comments to let people know how he/she intended the function to be used.

    I shall do that then.

    I haven't looked at PHP5 (I'm just getting to grips with PHP4) but if private and public exist it would be good.


    Things I do when I am bored: DotNetable

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width