What do we call this? What do we call this? php php

What do we call this?


I believe this is overloading.

Overloading in PHP provides means to dynamically "create" properties and methods. These dynamic entities are processed via magic methods one can establish in a class for various action types.

The overloading methods are invoked when interacting with properties or methods that have not been declared or are not visible in the current scope.

PHP Manual reference here.


It is assigning the string WTF?! to a public scope variable of SimpleClass. If you var_dump it, it shows the output correctly as:

string(5) "WTF?!"

And as @marcdev pointed out, it is known as overloading.


You are setting an independent property of the $objSc object.