Please enable JavaScript.
Coggle requires JavaScript to display documents.
Data Types - Coggle Diagram
Data Types
Types of Data
boolean
array
$cars = array("Volvo","BMW","Toyota");
float = number with a decimal point or a number in exponential form
object
integer
Null
string
Resource
Variable Scopes
GLOBAL SCOPE
is outside of function and can only be accessed outside a function.
But
The "global" keyword is used to access a global variable from within a function.
LOCAL SCOPE
is within the function and can only be accessed within that function:
use the
static
keyword when you first declare the variable.
Get the Type
use the var_dump() function.
like
var_dump(5);
var_dump("John");
var_dump(3.14);
var_dump(true);
var_dump([2, 3, 56]);
var_dump(NULL);