Can someone tell me if doing something like this is a bad idea.
empty($foo) and $bar = 'foobar';
as opposed to this
if (empty($foo)) { $bar = 'foobar'; }
If nothing else, I'd consider nothing other than the second option simply for readability.
Anyone else have any comments to make?
Well it's obvious what it does, and if you're programming for yourself on something tiny and simple then why not, but if I had to take another programmer's source code and it was full of stuff like that I'd track him down and make him drink Sunny Delight.... through my knickers.