Op do 25 feb. 2021 om 09:55 schreef Rowan Tommins <rowan.coll...@gmail.com>:
> On 24/02/2021 04:26, Mike Schinkel wrote: > > Repeating code similar to that from the message sent by David Rodrigues > you can see that eliminating the ": null" is less noisy: > > > > <div class="user <?php user ? 'online' : null ?>">...</div> > > <div class="user <?php user ? 'online' ?>">...</div> > > Also just to have a somewhat apples to apples (working) comparission, it would read something like: <div class="user <?php echo user ? 'online' : null ?>">...</div> <div class="user <?php echo user ? 'online' ?>">...</div> or one of the other possibilities (print / <?= ) and with the addition of those extra strokes i fail to see the cleanliness over the added obtrusion of `the one way`: <div class="user <?= user ? 'online' : '' ?>">...</div> this atleast is consistent, doesn't provide yet another way of doing the same thing and even allows for easier refactoring (i.e. if the falsy situation has to change from '' to 'offline') to summarize from my 2cent userland developer standpoint: Hope this doesn't make this in... (or is at least strongly discouraged) Thanks, Robin