How is it possible to cast types in PHP?
How is it possible to cast types in PHP?
Type casting in PHP works much as it does in C: the name of the desired type is written in parentheses before the variable which is to be cast. The casts allowed are: (int), (integer) - cast to int. (bool), (boolean) - cast to bool.
|
Bookmarks