DataTypes Used in PHP | CSEBLOG100

CSEBLOG100
0
PHP DATA TYPES | CSEBLOG100
 
Integer Type 
  • For displaying the integer value the Integer type is used. 
  • It is similar to the long data type in C. 
  • The size is 32 bit. 

Double Type 
  • For displaying the real values the double data type is used. 
  • It includes the numbers with decimal point, exponentiation or both. 
  • The exponent can be represented by E ore followed by integer literal. 
  •  It is not compulsory to have digits before and after the decimal point. For instance .123 or 123. is allowed in PHP. 

String Type
  • There is no character data type in PHP. If the character has to be represented then it is represented using the string type itself; but in this case the string is considered to be of length 1. 
  • The string literals can be defined using either single or double quotes. 
  • In single quotes the escape sequence or the values of the literals can not be recognized by PHP but in double quotes the escape sequences can be recognized.
 
For example 
 The total marks are $marks" 
will be typed as it is but 
 "The total marks are $marks" 
will display the value of $marks variable.
 
Boolean Type 
  • There are only two types of values that can be defined by the Boolean type and those are TRUE and FALSE. 
  •  If Boolean values are used in context of integer type variable then TRUE will be interpreted as 1 and FALSE will be interpreted as 0. 
  • If Boolean values are used in context of double type then the FALSE will be interpreted as 0.0.



Other Usefull Links:

Installation of PHP On Your Machine? - Click Here

Introduction to PHP - Click Here

PHP echo and print Statements - Click Here

General Syntactic Characteristics of PHP - Click Here

Tags

Post a Comment

0Comments

Post Your comments,Views and thoughts Here, Give Us Time To Respond Your Queries

Post a Comment (0)