php tutorial - PHP Datatypes Integer - php programming - learn php - php code - php script





  • Integer means numeric data types, which is also defined as a whole number with no fractional and decimal components.
  • Integer may be lesser than or greater than or sometimes equals to zero.
  • Integers can be specified in decimal (10-based), hexadecimal (16-based) or octal (8-based) notation, optionally preceded by a sign (- or +).
php - php 7 - php tutorial - php framework tutorial - php examples - php sample code - php basics - php web development - php components - php project - php technology  - learn php - php online - php programming - php program - php code - html code - embedded php in html - web server  - php syntax - php function - variable types

php code Syntax :

<?php
    $x = integer;
    var_dump($x);
?>
click below button to copy the code. php tutorial - team

Syntax Explanation :

  • Here $x is an integer.
  • $x is an integer. The PHP var_dump() function returns the data type as integer with its integer value.

learn php Sample Code : a simple php program

<!DOCTYPE html>
<html>
    <head>
        <title>Datatype-Integer</title>
    </head>
    <body>
        <?php
            $x = 25;
	    var_dump($x);
        ?>
    </body>
</html>
click below button to copy the code. php tutorial - team

php for beginners Code Explanation :

Code Explanation for Datatype Integer In PHP

  1. In PHP, $x = 25 is an integer variable that is holding the integer value =25.
  2. The var_dump() function returns the integer data type with its integer value as 25.

php tutorials Sample Output :

output for Datatype Integer In PHP

  1. In this output, var_dump() function returns the integer data type with its integer value as 25 i.e., int(25).


Related Searches to php datatype integer