Category "syntactic-sugar"

impl Default sugar for large struct without derive

If I have a struct I need Default implemented on, if all the field's types have Default implemented themsevles, then I can use the derive macro, otherwise I nee

Boolean assignment operators in PHP

I find myself doing this kind of thing somewhat often: $foo = true; $foo = $foo && false; // bool(false) With bitwise operators, you can use the &