What is Type juggle in php?
Answer
Type Juggling means dealing with a variable type. In PHP a variables type is determined by the context in which it is used. If an integer value is assigned to a variable, it becomes an integer.
E.g. $var3= $var1 + $var2
Here, if $var1 is an integer. $var2 and $var3 will also be treated as integers.
What is Type juggle in php?
In order to declare a variable in PHP, the type of the variable is not required. The data type is determined by the value / context of the variable. If integer value is assigned to the variable $num, then the variable $num is of the type integer. If string value is assigned to the variable $str, the variable $str is of the type string.