PHP 7 Roundup: Chainable ternary awesomeness.

Feast your eyes on this: https://wiki.php.net/rfc/isset_ternary

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.

 

No Comments

Start the ball rolling by posting a comment on this article!

Leave a Reply




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">