A story of compact() and extract() Compact() and extract() are two sides of the same coin. They are also a good part of the PHP story, with their close cousins, the variable variables. Let’s review the usage of compact() and extract() and see how they can make it into the future of PHP. From variables […]
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 […]
PHP 8.1 features, one year later Closing on one year after PHP 8.1 publication, we can take a look at the published features, and how they are doing in current code. Let’s take the list of ‘PHP Core’ from the New Features ¶. Project corpus We’ll use that against the Exakat corpus, with 2696 PHP […]