Magic object functions in PHP

There are special built-in functions for objects as the constructor. They all start with “_”.

one of them is _call which is called when an unrecognized/ undefined method is called.

It can be used to create an on the fly functions, such as on page 158 on “wrox php 6” ebook I have.

Read more about magic oop functions and oop overloading.

 

Leave a Reply

Your email address will not be published. Required fields are marked *