PHP Data Types

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jatindersingh
    Member
    • Sep 2014
    • 52

    PHP Data Types

    String
    Integer
    Float (floating point numbers - also called double)
    Boolean
    Array
    Object
    NULL
    Resource
  • Daljeet
    Senior Member
    • Dec 2014
    • 205

    #2
    Variables can store data of different types, and different data types can do different things:

    String:
    string can be any text inside quotes. You can use single or double quotes.
    Integer:
    An integer data type is a non-decimal number between.
    Float:
    A float is a number with a decimal point or a number in exponential form.
    Boolean:
    This is represents two possible states: TRUE or FALSE
    Array:
    Array stores multiple values in one single variable.
    Object:
    An object is a data type which stores data and information on how to process that data.
    NULL Value:
    This is special data type which can have only one value: NULL.
    Resource:The special resource type is not an actual data type. It is the storing of a reference to functions and resources external to PHP.

    Comment

    • AmitSood
      Member
      • Oct 2015
      • 89

      #3
      Thanks Daljeet for sharing these Data Types in details.

      Comment

      • shilparana
        Senior Member
        • May 2015
        • 194

        #4
        Really well written Post Daljeet! Thanks for sharing.

        Comment

        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎