Course Content
Introduction
PHP is an object-oriented scripting programming language that allows web developers to create dynamic and interactive web pages. PHP stands for Hypertext Preprocessor (PHP).
0/14
Control Statement
A control statement is a statement that determines whether other statements will be executed.
0/7
    About Lesson

    PHP gives automatic data type conversion.

    For example, if you provide an integer value to a variable, the type of that variable will automatically be an integer. Next, if you provide a string to the same variable, the type will change to a string.

     

    Integers

    It is a number without any decimal part.

    Following functions are used to check if the type of a variable is integer:

    • is_int()
    • is_integer()
    • is_long()

    Example:

    <?php 
    	$a = 100;
    	$b = -150;
    ?>

     

    Float

    It is a number with a decimal point or a number in the exponential pattern.

    Following functions are used to check if the type of a variable is float:

    • is_float()
    • is_double()

    Example:

    <?php 
    	$a = 21.9;
    	$b = -15.351;
    ?>

     

    NaN

    NaN stands for Not a Number.

    The following function is used to check if a value is not a number.

    • is_nan()