PHP 7 Roundup: Chainable ternary awesomeness.

Feast your eyes on this:

This eliminates quite a bit of ‘noise’ and ‘fluff’ use in any display logic, it’s a new ternary operator that allows you to quickly set a default without doing the isset() dance.

This has a limited affect if you use a templating engine like Twig, but it’s still very nice if you have to do some quick and dirty default setting at the code level for display.


Leave a Reply

Your email address will not be published. Required fields are marked *