Category Archives: PHP
PhpIsDead framework init idea
2024/11/18
How laravel can inject function to object in their ORM
The technique they have used are “trait“, “magic function” and “call_user_func_array“. The whole thing work in runtime, not compile time. 1. Php trait PHP trait is just like copy and paste the code from trait into the injected class. 2. Magic function When calling a not exist function, the __call function will be called. Laravel […] 2024/11/17