mardi 24 janvier 2017

Does the position of null in a PHP control structure matter?

I attempted to do:

if( $this->function() == null ) { do this }

but PHP said, roughly,

you can't do that, but you can try if( null == $this->function() ) ...

It works. What's the difference?

Aucun commentaire:

Enregistrer un commentaire