DEV Community

Discussion on: How PHP Type Declarations Actually Work

Collapse
 
andreidascalu profile image
Andrei Dascalu

"This approach does have some consequences though." - it's not this approach though.

Type coercion is what PHP always does by default. Basically, to make it simple, strict types means PHP won't do coercion when types are declared and will perform the default coercion behaviour otherwise.