When was type hinting added php?

Summary: in this tutorial, you’ll learn how to use PHP type hints to declare the types for function parameters and return values.

Introduction to PHP type hints

PHP is a dynamically typed language. When you define a function, you don’t need to declare types for parameters. For example:

Chủ Đề