Skip to content

gunnard.org Posts

PHP 8.2: null, false, and true as stand-alone types

PHP 8.2 introduces a new feature that allows you to use null, true, and false as stand-alone types for function arguments and return values. This means you can be more explicit with your type hints and make your code easier to understand for other developers.

PHP 8.2 : Disjunctive Normal Form (DNF) Types

PHP 8.2 introduces a new feature called Disjunctive Normal Form (DNF) Types, which allow developers to specify complex type constraints using logical OR and AND…