I am surprised why the constructor is called when we have a different class and constructor name. Does the constructor name begin with a small "r"?
class Registration{ function registration(){ echo "Constructor is called."; } } $obj = new Registration();
Outputs: The constructor is called.
Modification: Does this case insensitive behavior depend on the php versions we use?
source share