Monday, March 16, 2009

Integer and floating point number in Php

Integers in php can be declared as decimal, octal or hexadecimal.
To declare an octal precede the number with zero. (0)
To declare an hexadecimal precede the number with 0x.

The following is the declaration of integer types.


The Integer size can be determined using the constant PHP_INT_SIZE.
The maximum size of the Integer can be determined using the constant PHP_INT_MAX.

The maximum value of Integer is platform dependent.

If Php encounters a value that is beyond integer type then it treats the value as float.

Some declaration of floating point numbers are,

Related Documents
Datatypes in Php
Variables in PHP
Magic constants in php
Boolean datatype in Php

No comments:

Post a Comment