> > I would be against changing the behaviour of elvis/ternary operator. > However, I remember seeing past suggestions to implement another operator. > One that would fill the gap between null-coalesce and elvis operators. If I > recall correctly, most of the time, these proposals end in consensus that > such operator isn't really needed. See > https://externals.io/message/89292#89292 and > https://externals.io/message/101606#101610 > Maybe, it would be worthwhile to refresh a discussion about adding such > operator to the PHP language? >
I think it would be a worthwhile endeavor. Back then, this was only a notice that could be ignored for the sake of brevity/conciseness, or just to keep close syntax to a ported library from Javascript. With it being a warning, it is much harder to ignore and there is no as-short equivalent.