January 2025
Intermediate to advanced
728 pages
18h 40m
English
In this chapter, we’ll explore the data types available in PHP. We’ll also consider how to force a value into a specified data type (type casting), as well as situations where PHP automatically attempts to convert data types to make the various parts of expressions work together (type juggling).
A data type is a categorization of a value in a program that specifies how the PHP engine is to interpret that value and therefore which operations can be applied to it. For example, if a value is an integer, the PHP engine knows that operations such as addition and multiplication are permitted and that the outcomes of those operations ...
Read now
Unlock full access