coercion Embracing coercion in PHP Coercion is implicit typecasting for scalar types (integer, float, boolean and string). In this article we look at how we can use coercion as an elegant alternative to explicit typecasting. Coercing to integer