PHP began as a template language that converted every value into whatever the code seemed to want; until PHP 8.0, 0 == "foo" was true. The rule for this book: declare types, turn on strict_types, compare with ===, and know the juggling rules well enough to spot code that relies on them.