PHP is loosely typed
, meaning that it will implicitly change the type
of a variable as needed, depending on the operation being performed on its value.
This contrasts with strongly typed languages, like C and Java
, where variables can only contain one type
of data throughout their existence.
Variables must be named using only
letters, numbers and underscore.
Variables must start with
a letter or an underscore.
$name = 'valid';
$_name = 'valid';
$1name = 'invalid';