·  PHP – Syntax – Datatypes – Scalar – Integer

 

- Info:

  - Integer datatype represents whole numbers or, a number that does not contain fractional parts.

  - PHP supports integer values represented in base 1(decimal), base 8 (octal), and base 16 (hexadecimal).

 

- Example:

  - Create PHP Console Application Test.php.

 

    Test.php

    <?php

      42           // decimal

      -678900      // decimal

      0755         // octal

      0xC4E        // hexadecimal   

    ?>