Class A {public Function __construct () {echo "A construct";} } Class B extends A { } $b =new B ();? >
Why the result is a construct
Reply to discussion (solution)
If your handout is not a mistake, then you can only say "mentor" is nonsense!
Ask Ah .... Come
If your handout is not a mistake, then you can only say "mentor" is nonsense!
You mean the teacher is pulling the crap.
Regardless of the facts, isn't it nonsense?
Regardless of the facts, isn't it nonsense?
Well, he can still see this 149.
I don't know, I haven't seen it.
I don't know, I haven't seen it.
Does the moderator think he's right to say that?
Except ①②, ③ is wrong, others are inaccurate.
Maybe it's a php version problem, I don't even know.
Extends a is not equal to new a?
See clearly. It's about the construction method. ④ people say can ⑤ wrong?
3 is wrong, and the result speaks louder than words.
Run the code test to know that 3 is wrong, but it is possible that PHP4 is the case.
Floor of the speaker I did not see, do not know when the tutorial, if it is PHP4, it is recommended not to see.
The constructor of the parent class is executed unless the subclass has its own constructor method.
Run the code test to know that 3 is wrong, but it is possible that PHP4 is the case.
Floor of the speaker I did not see, do not know when the tutorial, if it is PHP4, it is recommended not to see.
The constructor of the parent class is executed unless the subclass has its own constructor method.
There is nothing worth seeing in the tutorial ... Like MySQL, I've been watching lately, but I can't find a good video.