Jump to content

public and private functions?


rxbanditboy1112

Recommended Posts

I've been programming with php for a while now in a more script like way with some classes here and there. I am also experienced with java and c#. Now I am trying to rewrite my code to make it object oriented because that is what I am used to and definitely what makes sense.

 

I was wondering does php have public, private and maybe even protected functions? Are all functions public? Furthermore, this style of programming makes me want to specify type, rather than just commenting on what type something should be. Is there a way I can declare a type to my variables? Also by default are variables in php set to public or private?

 

THanks!!

Link to comment
https://forums.phpfreaks.com/topic/100015-public-and-private-functions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.