php: Declare arguments type of a Function

According to the PHP5 documentation:

Type Hints can only be of the object and array (since PHP 5.1) type. Traditional type hinting with int and string isn’t supported.

Since string and int are not classes, you can’t “type-hint” them in your function.

As of PHP 7.0 declaring argument type as string, int, float, bool is supported.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)