• Just curious if anyone could answer this.

    Why is it recommended to use the & sign before the class that you are calling?

    & is used in PHP to update the main instance of the variable (object), when it changes.

    Is it so that the original instance of the object is updated with any changes made to the class vars?

    Still not sure why since I could just use $myClass->myVar … am I missing something here?

  • The topic ‘& before class name… Curious why?’ is closed to new replies.