Forum : Need of type casting
Brief description  about Online courses   join in Online courses
View Aditi  Gupta 's Profile

Need of type casting

What is the need of type casting when in php variables are automatically convert into correct data type?
Asked by Aditi Gupta | Mar 23, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi aditi,

PHP will automatically convert data types as necessary across the board - you need not worry about it happening. If you specifically wish to override PHP's type conversion, you can perform what is called a type cast - you forcibly convert a variable of type A to type B.
Mar 23, 2010