$ var = 1/2;
- first
- 0
- 0.5
- 1/2
$ var = 1/2;
$ a = array (
'a',
3 => 'b',
1 => 'c',
'd'
);
$ a = array ();
if ($ a == null) {
echo 'true';
} else {
echo 'false';
}
if (null === false) {
echo 'true';
} else {
echo 'false';
}
$ var = 'a';
$ VAR = 'b';
echo "$ var $ VAR";
$ a = array (
null => 'a',
true => 'b',
false => 'c',
0 => 'd',
1 => 'e',
'' => 'f'
);
echo count ($ a);
class MyException extends Exception {}
try {
throw new MyException ('Oops!');
} catch (Exception $ e) {
echo "Caught Exception";
} catch (MyException $ e) {
echo "Caught MyException";
}
$ a = 1;
{
$ a = 2;
}
echo $ a;