PHP type declarations — A guide for beginners
December 4, 2022 — PHP 7 introduced a lot of new features to the language. One of them is the ability to declare the type of a function argument and the type of value that a function returns. This is called type declaration.