Can you tell me the exact difference between return self::__construct() and return new self()?
It seems one can actually return a self::__construct() from a __construct() call when the object is created, returning the object itself as if the first __construct() was never even called.
This is best illustrated in code:
return self::__construct()returns the value returned by the objects__constructmethod. It also runs the code in the constructor again. When called from the classes__constructmethod itself, returningself::__construct()will actually return the constructed class itself as the the method would normally do.return new self();returns a new instance of the calling object’s class.