Data Types in PHP

Explain the Different Data Types and their usage in PHP?
Answer:
The basic Data Types in PHP are
1: String
2: Integer
3: Boolean
4: Object
5: Array
6: Resource
7: Float

We have ordered them in a random order.
PHP offers these usual basic primitive types to hold only one piece of data at a time (scalar).

A variable in PHP can hold data of any type. It need not be declared as we do in C or C++.
PHP automatically recognizes the type of data and stores it for further execution in the script.

0 comments:

Post a Comment