Type juggling

Type juggling in PHP means that PHP will try to determine which type of a variable needs to be used in case when a numeric operation is performed.

For example 2 + 2 will result in the integer, therefore integer data type will be used for the result. However, 2.1 + 2.1 will result in a number with a floating point, therefore a numerical type that supports a floating point will be used.

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator