PHP extended classes

PHP extended classes Recently, I discovered that Datetime::createFromImmutable is now returning a static type : it returns an object of the type that called the method. This is only useful when the class has been extended by another class. This means that the Datetime class is extended enough for PHP to acknowledge it and adapts […]