PHP World

What data types does Php support ?

Data Types define the data type that can be stored by a variable. PHP enables eight distinct data types. All of them will be discussed below. The first five are called easy data types and the last three are kinds of compound data types.

Integer

Integers only keep whole figures with favorable and bad figures, i.e. numbers without fractional portion or decimal point. They may be decimal (10 base), octal (8 base) or hexadecimal (16 base). Decimal is the standard foundation (base 10). The octal integer with leading 0 can be stated and the hexadecimal with leading 0x can be stated.

String

Hold letters or any alphabets, even numbers are included. These are written within double quotes during declaration. The strings can also be written within single quotes but it will be treated differently while printing variables.

Boolean

Hold either TRUE or FALSE only two values. Successful occurrences will make real and failed occurrences fake. The values of the NULL type are also treated in Boolean as false. Other than NULL, 0 in Boolean is also considered to be false. If a string is empty then it is also considered as false in Boolean data type.

Objects

Objects are identified as user-defined class cases capable of holding both values and features. This is a sophisticated subject and in further papers will be discussed in detail.

Arrays

Array is a data-type compound that can store multiple data-type values.

Resources

PHP resources are not a precise sort of information. Basically, these are used to store references to some function call or external PHP resources. Consider, for instance, a call from the database. This is a resource from outside.

PHP also has a NULL and resource sort in relation to the data types mentioned above. If no value has been allocated to a variable, it has been explicitly set to NULL, or has become unset. When php developers interact with documents and databases, you may run into the resource sort as the features in PHP often use a resource when opening a file to read or link to a database.

Php blog

  1. 9 Juin 2022The Different Roles of a PHP Development Team: What to Expect When Working with One198 aff.
  2. 6 Juin 2022The Pros and Cons of Programming Languages: Which One Is Right for You?199 aff.
  3. 28 Avril 2022How to Learn PHP Programming: The Basic Steps240 aff.
  4. 29 Janv. 2022The S19 XP Crypto Mining Machine: The Most Efficient Miner on the Market!397 aff.
  5. 29 Nov. 2021Adding Team Extension to Your Larger Company: Benefits and Strategies733 aff.
  6. 21 Août 2021The Key Principles of a php Web Development Company645 aff.
  7. 19 Juil. 2021Read your news online with web publication !691 aff.
  8. 18 Mai 2021How to balance brevity and abstraction652 aff.
  9. 20 Avril 2021Concepts that will revolutionize certain sectors738 aff.
  10. 12 Mars 2021How to make a responsive design with php ?845 aff.