3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if (count($sections) > 0): ?> <div class="photo-gallery-box"> <div class="photo-gallery in-view-checker"> <?php $class = ' active'; foreach ($sections as $section): ?> <div class="screen<?php echo $class; ?>"> <?php if (!empty($section['big'])): ?> <div class="side"> <div class="item responsimg" data-responsimg870="<?= $section['big'][0]['image'] ?>" data-responsimg10="<?= $section['big'][0]['image'] ?>" data-gallery="<?= $section['big'][0]['id'] ?>"> <div class="description"> <div class="sub-box"> <div class="align-m"> <img src="<?= Url::base() ?>/uploads/photo-icon.png" class="icon" alt="" /> <h3><?= $section['big'][0]['title'] ?></h3> <p><?= $section['big'][0]['description'] ?></p> </div> </div> </div> </div> </div> <?php endif; ?> <?php if (count($section['small']) > 0): ?> <div class="side half"> <?php foreach ($section['small'] as $small_album): ?> <div class="item responsimg" data-responsimg870="<?= $small_album['image'] ?>" data-responsimg10="<?= $small_album['image'] ?>" data-gallery="<?= $small_album['id'] ?>"> <div class="description"> <div class="sub-box"> <div class="align-m"> <img src="<?= Url::base() ?>/uploads/photo-icon.png" class="icon" alt="" /> <h3><?= $small_album['title'] ?></h3> <p><?= $small_album['description'] ?></p> </div> </div> </div> </div> <?php endforeach; ?> </div> <?php endif; ?> </div> <?php $class = ''; endforeach; ?> </div> <ul class="sub-gallery"> </ul> </div> </div> <?php endif; ?>
Output for 7.2.0 - 7.3.0beta1
Notice: Undefined variable: sections in /in/N34u2 on line 2 Warning: count(): Parameter must be an array or an object that implements Countable in /in/N34u2 on line 2
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.1.20
Notice: Undefined variable: sections in /in/N34u2 on line 2