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?
We often use $class_object->class_procedure or self::class_procedure in PHP OOP. While reading aloud your code,
Share
->is the object operator. Typically called the arrow in conversation. If I were reading the code, I might say:::is the static resolution operator. I doesn’t read as well in conversation. The docs say double colon. I might say: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.