O
O
Optimus2018-03-02 15:47:43
PHP
Optimus, 2018-03-02 15:47:43

Example of __call method in PHP?

I heard that using the __call magic method in php you can simulate multiple inheritance (php is not supported). Could you give or give a link to the simplest example of such an implementation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2018-03-02
Pyan @marrk2

Emulation of multiple inheritance using the __call method, if ever it was, is now a thing of the past. Most problems of multiple inheritance can be easily solved using traits and interfaces

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question