No, it’s not good practice . The constructor is a “magic” method which doesn’t return anything and it should never be called manually. PHP calls this when the new constructor or the inspector functions for creating objects are called.
No, it’s not good practice . The constructor is a “magic” method which doesn’t return anything and it should never be called manually. PHP calls this when the new constructor or the inspector functions for creating objects are called.