We often use $class_object->class_procedure
or self::class_procedure
in PHP OOP. While reading aloud your code, how do you read out these conventions?
->
is the object operator. Typically called the arrow in conversation. If I were reading the code, I might say:
class object arrow class method
::
is the static resolution operator. I doesn't read as well in conversation. The docs say double colon. I might say:
class colon colon static method
Note: Reading code aloud can be awkward regardless of how you name syntax. Furthermore, it will depend greatly on your audience. I am sharing what I've heard, seen used in books, or found in the docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With