Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有更短、更简洁的方法来写这个?
<?php $a = ($a) ? $a : 'empty'; ?>
在 php5.3
<?php $a = ($a) ?: 'empty'; ?>