=> and <=

Posted on 16th Feb 2014 by admin

So I was digging through some code when I came across the <= operator. This is the first time I've ever seen it. I felt the same way I did when I first saw a ternary statement.

What is it's purpose. I want to say it's a reverse assignment operator but that just make entirely no sense.

Just for the clueless ones reading I'll elaborate with code
Code: $someArray = array (
'keyOne' => "the value",
'keyTwo' => "the value" <= "something else", /// What in the world is going on here?
);
or this
Code: foreach ($array as $key=> $value )
while ($key <= $blah ) { /// <---------- huh?
$blah -= $key;
$str.= $value;
}

Other forums