3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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 5.4.0 - 5.6.4
Parse error: syntax error, unexpected 'html' (T_STRING) in /in/7mptO on line 1
Process exited with code 255.
Output for 4.3.0 - 5.3.29
<?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>