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

Objects in PHP Forum

View Course » View Exercise

1116 points
Submitted by
almost 3 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


Hey, just leaving this here:

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
Submitted by
over 2 years ago