Posted By

Thaicloud on 02/12/11


Tagged


Versions (?)

Basic Public / Private Function Call


 / Published in: PHP
 

  1. class Visitors
  2. {
  3. public function greetVisitor()
  4. {
  5. echo "Hello<br />";
  6. }
  7.  
  8. function sayGoodbye()
  9. {
  10. echo "Goodbye<br />";
  11. }
  12. }
  13.  
  14. Visitors::greetVisitor();
  15. $visitor = new Visitors();
  16. $visitor->sayGoodbye();

Report this snippet  

You need to login to post a comment.