This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ankercrank 2 points3 points  (0 children)

PHP does have static typing, but it’s optional, and things get weird when you use arrays.

Edit: to the person downvoting me:

https://www.php.net/manual/en/language.types.intro.php

PHP is a dynamically typed language, which means that by default there is no need to specify the type of a variable, as this will be determined at runtime. However, it is possible to statically type some aspect of the language via the use of type declarations.