A few things I've been wondering for a while
$foo &= $bar
what's this?
if($a === $b)
if($a !== $b)
why three comparison operators?
$$var
why two $s?
a few questions
Moderator: General Moderators
a few questions
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
- &= is a bitwise operator. It means L-value = L-value & R-value
- === is the identity operator. It's similar to == the equality operator, but also requires the type of the operands to be the same. Same sort of thing for !== being the types must match as well as the values to fail.
Code: Select all
'1' == 1; // true '1' === 1; // false '1' != 1; // false '1' !== 1; // true - $$var is variable variables. The value in $var is considered the name of a variable thus accessed or set (depending on context)
Code: Select all
$foo = 'bar'; $$foo = 64; echo $bar;