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.3.0 - 5.4.28
Parse error: syntax error, unexpected '{' in /in/GvKeE on line 4
Process exited with code 255.