Method Arguments

So far so good! You now know 3 of the things that you'll spend most of your time doing in OOPHP i.e. writing classes, properties, and methods. I told you this would be easy...let's keep going!

You can pass variables into methods just like regular functions. We refer to these variables as parameters when we define them in classes and as arguments when they are passed to physical objects but...

...most of the time, developers will just refer to them as arguments regardless of whether they are working with a classes or objects, self included!

Branch: https://github.com/GaryClarke/learn-oophp/tree/4-named-arguments

Complete and Continue  
Discussion

4 comments