true && $a = 1; (开发过程中发现的技巧,感觉还不错)


if(true) $a = 1; (不带{}的话,只会执行if条件下的一行代码)


$a = null ?? 1; (php 7.0版本后可用)