Question:What are type casting and juggling? 

Answer Casting: Converting values from one data type to another is known as type casting. This is accomplished by placing the intended type in front of the variable to be cast.example: $x=34.54; $y=(int)$x; echo $y; // returns 34Juggling: Variables are sometimes automatically cast to best fit the circumstances in which they are referenced. This is known as Type Juggling.example: $a="34 items" $total=5; $total+=$a; echo $total;// returns 39 


Deprecated: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in D:\webserver\www\vcampusbd.com\answers\column_answer_two.php on line 128
+ Report
Total Preview: 954
What are type casting and juggling?
Copyright © 2024. Powered by Intellect Software Ltd