3v4l.org

run code in 300+ PHP versions simultaneously
<?php $colours = array( 'white' => '#FFFFFF', 'red' => '#FA3438', 'orange' => '#FFA845', 'blue' => '#459CFF', 'green' => '#60C953', 'yellow' => '#F7F73B' ); $colour = isset($_GET['c']) && isset($colours[$_GET['c']]) ? $colours[$_GET['c']] : '#FFFFFF'; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>title</title> <style type="text/css"> h1 { text-align: center; margin-bottom: 50px; } a { color: #000; } div.colours { width: 720px; margin: auto; background-color: #ECECEC; padding: 25px 30px; } div.colours div.colour { width: 100px; height: 100px; float: left; margin: 0 10px; border: 1px solid #888; text-align: center; padding-top: 40px; box-sizing: border-box; } </style> </head> <body style="background-color: <?= $colour ?>"> <h1>Wybierz kolor tła dla strony</h1> <div class="colours"> <? foreach ($colours as $colour => $hex): ?> <a href="?c=<?= $colour ?>"><div class="colour" style="background-color: <?= $hex ?>;"><?= $colour ?></div></a> <? endforeach; ?> <div style="clear: both;"></div> </div> </body> </html>
Output for git.master, git.master_jit, rfc.property-hooks
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>title</title> <style type="text/css"> h1 { text-align: center; margin-bottom: 50px; } a { color: #000; } div.colours { width: 720px; margin: auto; background-color: #ECECEC; padding: 25px 30px; } div.colours div.colour { width: 100px; height: 100px; float: left; margin: 0 10px; border: 1px solid #888; text-align: center; padding-top: 40px; box-sizing: border-box; } </style> </head> <body style="background-color: #FFFFFF"> <h1>Wybierz kolor tła dla strony</h1> <div class="colours"> <? foreach ($colours as $colour => $hex): ?> <a href="?c=#FFFFFF"><div class="colour" style="background-color: Warning: Undefined variable $hex in /in/VWGFk on line 56 ;">#FFFFFF</div></a> <? endforeach; ?> <div style="clear: both;"></div> </div> </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:
49.21 ms | 403 KiB | 8 Q