RT hopes to expand this knowledge point and ask experts for answers or give an entry to the information ~ RT
I hope to expand this knowledge point, ask experts for answers or give an entry to a document ~
Reply content:
RT
I hope to expand this knowledge point, ask experts for answers or give an entry to a document ~
You can try it out. Why do you want to send it.
A constructor is a special function that does not return values. It does not execute any function even if return is added.
Who do you want to return the result?
Not only php, but constructors of all object-oriented languages do not return.
The purpose of the constructor is to return an instance of the class.
You can imagine that a programming language does not support Object-Oriented Programming in syntax. How should you add object-oriented functions to it, such as C.
And in the real world, this happened at least to perl.