3v4l.org

run code in 300+ PHP versions simultaneously
<?php<!DOCTYPE html> <html> <head> <link type='text/css' rel='stylesheet' href='style.css'/> <title>FIGURES!</title> </head> <body> <img src="http://i1061.photobucket.com/albums/t480/ericqweinstein/php-logo_zps408c82d7.png"/> <div class="header"><h1> <?php $welcome = "YOU WILL LEARN FIGURES!"; echo $welcome; ?> </h1></div> <p><strong>Generate a list:</strong> <?php for ($number = 0; $number <= 20; $number++) { if ($number <= 19) { echo $number . ", "; } else { echo $number . "!"; } }; ?> </p> <p><strong></strong> <?php $things = array( ); foreach ($things as $thing) { echo "<li>$thing</li>"; } unset($thing); ?> </p> <p><strong> <strong></p> <p> <?php $words = array( ); shuffle($words); foreach ($words as $word) { echo $word; }; unset($word); ?> </p> </body> </html>
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
<?php<!DOCTYPE html> <html> <head> <link type='text/css' rel='stylesheet' href='style.css'/> <title>FIGURES!</title> </head> <body> <img src="http://i1061.photobucket.com/albums/t480/ericqweinstein/php-logo_zps408c82d7.png"/> <div class="header"><h1> YOU WILL LEARN FIGURES! </h1></div> <p><strong>Generate a list:</strong> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20! </p> <p><strong></strong> </p> <p><strong> <strong></p> <p> </p> </body> </html>
Output for 5.4.0 - 5.4.45
Parse error: syntax error, unexpected 'html' (T_STRING) in /in/7mptO on line 1
Process exited with code 255.

preferences:
202.73 ms | 401 KiB | 325 Q