PHP Variable type

The main way to store information in the middle of a php program is by using a variable. Hear are the most important things to know about variable in php.

  1. All variable in php are denoted with a leading dollar sing ($).
  2. The value of the variable a value of its most recent assignment.
  3. Variable of assigned with the operator with the variable on the left hand side and the expression to be evaluated on the right.
  4. Variable can but do not read to be declare before assignment.
  5. Variable in php do not have intrinsic type - a variable dos not know in advance whether it will be used to stared a number of a string of characters.
  6. Variable use define they are assigned have default value.
  7. PHP does a good job of aromatically converting types from one to another when necessary.
  8. PHP  variable are perl-link' PHP has a total of eight data types which we use to construct our variables.
  • Integers : Are whole number without a decimal point like '123456' .
  • Doubles : Are Flouting point numbers like '3.14156.499'. 
  • Null : Is a special type that only has one value 'Null'.
  • Boolean : Have only two possible value other true or false 'True/False'. 
  • String : Are sequence of character like php support strings operators.
  • Array :  Are name and index collection of other value. 
  • Object : An object is a data type which store data and information 
  • Resource : The special resource type is not a actual data type. It is storing of a reference to function and resource external to php.

No comments:

Post a Comment

Python in AI: Getting Started with TensorFlow & PyTorch

  Artificial Intelligence (AI) is no longer just a buzzword. It powers recommendation systems, chatbots, self-driving cars, and more. At the...