This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Objects in PHP Forum

View Course » View Exercise

1116 points
55a25ba99113cb0c51000726_135568516
Submitted by
DaggerReign
over 2 years ago

The Purpose of "public" function

I don't entirely understand the purpose of this function, It IS required but I am confused as to why this is. Can anyone enlighten me?


0 votes

permalink

Hey, just leaving this here:
http://www.codecademy.com/forum_questions/558b5fc276b8fe4ded000598

Mainly the last section of it hopefully helps a bit.

Functions and variables can be made public to indicate that they are reachable throughout your whole <?php ?> code.

1056 points
85715fe0fccb786ad5d81712717fa53a?s=140&d=retro
Submitted by
SleepyEm
over 2 years ago