English

List the supported data types in PHP. - Information Technology

Advertisements
Advertisements

Question

List the supported data types in PHP.

Answer in Brief

Solution

  1. String: A string is a sequence of characters. A string can be any text inside quotes. You can use single or double-quotes.
  2. Integer: An integer data type is a non-decimal number between -2,147,483,648 and 2,147,483,647.
  3. Float (floating point numbers): A float (floating-point number) is a number with a decimal point or a number in exponential form.
  4. Boolean: A Boolean represents two possible states. TRUE or FALSE.
  5. Array: An array stores multiple values in one single variable.
  6. NULL: Null is a special data type which can have only one value NULL. A variable of data type NULL is a variable that has no value assigned to it.
shaalaa.com
PHP Data Types
  Is there an error in this question or solution?
Chapter 5: Server-Side Scripting (PHP) - Exercises [Page 78]

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×