[php] equality or assignment?
I have seen the following code:
if ($blah = do_this()) {
[...]
};
While I'm quite a competent programmer, I still have an icky feeling when it comes to PHP only because the documentation on the website blows. and no one except the PHP programmers know what they're doing.
So what is this statement performing?
Is it assigning do_this() to $blah and returning true (all the time) or testing if $blah equals do_this() (which I don't think because usually == is equality and = is assignment)?
*shrugs*
__________________
"You looked at me as if I was eating runny eggs in slow motion." - Gord Downie of The Tragically Hip
|