3v4l.org

run code in 200+ php & hhvm versions
<?php $month_number = "08"; $month_year = "2016"; // the ternary aspect: $month_result = ($month_number === "09"); $year_result = ($month_year === "2017"); $str = ($month_result && $year_result)? "active":""; echo "<div class=\"item" . $str . "\"></div>";
Output for 5.6.0 - 5.6.30, hhvm-3.18.4 - 3.21.0, 7.0.0 - 7.3.1
<div class="item"></div>