Log in

View Full Version : How is it possible to cast types in PHP?



seo.gops
09-05-2021, 03:52 PM
How is it possible to cast types in PHP?

kajalescort
09-05-2021, 05:00 PM
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.