Blog Stats
  • Posts - 162
  • Articles - 10
  • Comments - 0
  • Trackbacks - 17

 

PHP Tutorials - Data Types

In this PHP Tutorial you will learn about PHP Data Types viz. Numeric values, String values, Boolean values, Arrays, Objects and NULL

Numeric values:

There are two numeric values in PHP, they are:

1. integer: Integer numbers don’t have floating point, for example, 5, 12, 1567

2. real: or floating point numbers, real number has a floating point, for example, 2.3

There are three ways to represent the numeric values:

1. base 10 numbers: They are represented using digits from 1 to 9, with an optional (.) for floating point if the value is real.

2. base 8 numbers: They are represented by preceding the number by zero ‘0’, and it only permits the digits from 0 to 7, example 023, which is the same as 19

3. base 16 numbers: They are represented by preceding zero and x ‘0x’, and it permits the digits from 0 – 9 and characters from ‘A’ to ‘F’, for example, 0x3f, which is the same as 63

PHP Data Types


Feedback

No comments posted yet.


Post a comment





 

 

 

 

Copyright © John Jacob