Another noteworthy fact that when it comes to PHP programming and variable declaration is that PHP is a language “case sensitive” ie difference between upper and lower case and because of this reason it would not be the same miVariable = $ value; that MiVaRiABle = $ value; what would interpret as PHP as two completely different variables.
The types of data that can store any one variable are as follows:
Integer numbers positive and negative integers
Double numbers or decimal floating-point
Boolean values True or False
Array type special collection of values
Object Type special data complex
In subsequent chapters will accommodate the last two types of data (array and object) here that have not been explained or barely commented.
PHP is a language that makes the conversion rate depending on the operands and the operator. Thus if we try to add the string’10 ‘and the number 20 carried out the action that would convert the first variable in size and thus could add 10 +20 = 30.
Apart from PHP in some cases makes the conversion there are two special features of their own language which allows us to know the type of variable that we are using and can also convert the variable type:
gettype () receives the type of variable that is
settype ($ variable ‘variable rate’) Transform the type of variable current mode to the mode that we introduce him.
Variables characteristics PHP
argv Array of arguments passed in the execution of the script.
$ _SERVER [ ‘Argc’] number of parameters passed to the script in its execution.
$ _SERVER [ ‘PHP_SELF’] name of the script that is being implemented
$ _COOKIE Array associative pairs (key, value) passed through cookies
$ _GET Array associative pairs (key, value) passed through GET
$ _POST Array associative pairs (key, value) passed through POST
$ _File Array partnership that contains information from the files received through POST
$ _ENV Array associative pairs (key, value) environment
$ _SERVER Array associative pairs (key, value) server
$ _SESSION Array associative pairs (key, value) session
These are values that will remain constant throughout the execution of the script and possibly want to use throughout the script many times. To do this we use the following syntax:
define ( “behalf of the constant”, value);