October 2021
Intermediate to advanced
420 pages
7h
English
Welcome to Section 2. In this part of the book, we are going to look at something that has become much more of a first-class feature in modern PHP: types.
The release of PHP 7 marked a significant turning point in the history of PHP. It ended a long period of stagnation that included the abandonment of a whole version – PHP 6. With PHP 7, we got some significant and highly useful changes to the language, and one of those was the introduction of scalar type declarations:
PHP: New features - Manual
https://www.php.net/manual/en/migration70.new-features.php
PHP 7 brought the advent of scalar type hints and strict type checking. This allowed us to write code with a clearer API and built-in assurances ...