3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://localhost/img/'; $dir = 'C:\Program Files\Apache Group\Apache2\htdocs\img'; $max = 5; $images = array( '.', '..', 'a.jpg', 'b.GIF', 'C.png', 'd.JPEG', 'e.jpg', 'f.tiff', 'g.png', 'h.bmp', 'i.jpg', 'j.GIF', 'k.png', ); $images = preg_grep('/\.(?:jpe?g|gif|png)\z/i', $images); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>画像</title> </head> <body> <h1><?php echo $dir; ?>内の画像一覧</h1> <?php if (!$images): ?> <p>表示する画像はありません</p> <?php else: ?> <table> <tr> <?php foreach ($images as $i => $img): ?> <?php if ($i !== 0 && $i % $max === 0): ?> </tr> <tr> <?php endif; ?> <td><img src="<?php echo $url.$img; ?>"></td> <?php endforeach; ?> </tr> </table> <?php endif; ?> </body> </html>
Output for git.master, git.master_jit, rfc.property-hooks
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>画像</title> </head> <body> <h1>C:\Program Files\Apache Group\Apache2\htdocs\img内の画像一覧</h1> <table> <tr> <td><img src="http://localhost/img/a.jpg"></td> <td><img src="http://localhost/img/b.GIF"></td> <td><img src="http://localhost/img/C.png"></td> </tr> <tr> <td><img src="http://localhost/img/d.JPEG"></td> <td><img src="http://localhost/img/e.jpg"></td> <td><img src="http://localhost/img/g.png"></td> </tr> <tr> <td><img src="http://localhost/img/i.jpg"></td> <td><img src="http://localhost/img/j.GIF"></td> <td><img src="http://localhost/img/k.png"></td> </tr> </table> </body> </html>

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:
50.74 ms | 403 KiB | 8 Q