3v4l.org

run code in 300+ PHP versions simultaneously
<?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 git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $sections in /in/N34u2 on line 2 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /in/N34u2:2 Stack trace: #0 {main} thrown in /in/N34u2 on line 2
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
58.27 ms | 401 KiB | 8 Q