3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $ltActive = 1; $rtActive = 1; if($ltActive && $rtActive){ $class = 'class when both sidebars are active'; }elseif(!$ltActive && !$rtActive){ $class = 'class when both sidebars are inactive'; }else{ $class = 'class when only one of the sidebars is active (either one)'; } print $class;
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
class when both sidebars are active