3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $type = 'c'; $imagesDir = array('a' => 'a', 'b' => 'b'); $images = glob($imagesDir . $type . '*[TYPE].{jpg,jpeg,png,gif}', GLOB_BRACE); foreach($images as $image): ?> <li><a href="<?php echo str_replace('[TYPE]', 'F', $image); ?>"><img src="<?php echo str_replace('[TYPE]', 'T', $image); ?></a>" alt="" /></li> <?php endforeach; ?>
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Array to string conversion in /in/q3DN6 on line 6
Output for 4.3.0 - 4.3.6, 4.3.9 - 5.3.29
Output for 4.3.7 - 4.3.8
Warning: Invalid argument supplied for foreach() in /in/q3DN6 on line 7