Clear Composer Cache

Clear Composer Cache

Composer store copies of downloaded PHP packages in the cache. It allows speeding up workflow because for the next time previously installed packages can be retrieved from the cache. Can...
Enums in PHP 8.1

Enums in PHP 8.1

Since PHP 8.1, we can use enumerations also called enums. Enum defines a custom type that contains a fixed set of related values. Enum is declared using the enum keyword...
Intersection Types in PHP 8.1

Intersection Types in PHP 8.1

Since PHP 8.0, we can use union types which allows providing two or more types for parameters, return values, and properties. The given value should be one of the specified...
First-class Callable Syntax in PHP 8.1

First-class Callable Syntax in PHP 8.1

PHP offers Closure::fromCallable static method which allows creating a new anonymous function also known as Closure from specified callback using the current scope. For example, if we want to return...
New never Return Type in PHP 8.1

New never Return Type in PHP 8.1

PHP allows defining type declarations for parameters, return values, and properties. Since PHP 8.1, we can use never return type. It indicates that a function or class method throws an...