PHP types
PHP types
- The type of a variable is not usually set by the programmer; rather, it is decided at runtime by PHP depending on the context in which that variable is used.
- To forcibly convert a variable to a certain type, either cast the variable or use the settype() function on it.
- Note that a variable may be evaluated with different values in certain situations, depending on what type it is at the time.
Related concepts
→
PHP types
→