3v4l.org

run code in 300+ PHP versions simultaneously
<?php .header { width: 300px; height: 25px; background-color: #5A68A5; border-radius: 10px; } img { width: 200px; float: right; } h1 { font-family: Verdana, sans-serif; font-size: 18px; text-align: center; color: #ffffff; } p { font-family: Tahoma, sans-serif; } li { font-family: Tahoma, sans-serif; list-style-type: square; } input { width: 280px; } <!DOCTYPE html> <html> <head> <link type='text/css' rel='stylesheet' href='style.css'/> <title>PHP!</title> </head> <body> <img src="http://i1061.photobucket.com/albums/t480/ericqweinstein/php-logo_zps408c82d7.png"/> <div class="header"><h1> <?php $welcome = "Let's get started with PHP!"; echo $welcome; ?> </h1></div> <p><strong>Generate a list:</strong> <?php for ($number = 1; $number <= 10; $number++) { if ($number <= 9) { echo $number . ", "; } else { echo $number . "!"; } }; ?> </p> <p><strong>Things you can do:</strong> <?php $things = array("Talk to databases", "Send cookies", "Evaluate form data", "Build dynamic webpages"); foreach ($things as $thing) { echo "<li>$thing</li>"; } unset($thing); ?> </p> <p><strong>This jumbled sentence will change every time you click Submit!<strong></p> <p> <?php $words = array("the ", "quick ", "brown ", "fox ", "jumped ", "over ", "the ", "lazy ", "dog "); shuffle($words); foreach ($words as $word) { echo $word; }; unset($word); ?> </p> </body> </html>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.50.0200.06720.41
7.0.40.0130.06320.40
7.0.30.0230.04720.32
7.0.20.0130.06320.30
7.0.10.0270.04720.30
7.0.00.0070.06720.21
5.6.200.0330.05721.11
5.6.190.0170.05721.12
5.6.180.0230.05021.16
5.6.170.0200.05020.93
5.6.160.0170.08021.16
5.6.150.0230.05021.02
5.6.140.0200.05321.12
5.6.130.0100.06321.15
5.6.120.0070.06721.13
5.6.110.0230.05720.93
5.6.100.0330.05021.04
5.6.90.0370.05321.14
5.6.80.0230.05720.50
5.6.70.0170.06720.42
5.6.60.0330.05320.48
5.6.50.0200.05020.57
5.6.40.0330.06020.29
5.6.30.0370.06020.45
5.6.20.0630.04020.43
5.6.10.0400.04320.40
5.6.00.0200.05020.43
5.5.340.0100.06320.93
5.5.330.0270.06020.84
5.5.320.0170.05721.04
5.5.310.0100.06020.87
5.5.300.0170.05720.84
5.5.290.0130.06320.87
5.5.280.0230.06320.92
5.5.270.0300.07020.68
5.5.260.0270.04720.82
5.5.250.0170.05720.50
5.5.240.0300.05720.21
5.5.230.0370.06320.21
5.5.220.0330.05720.23
5.5.210.0070.06320.29
5.5.200.0230.05720.23
5.5.190.0370.06720.22
5.5.180.0430.06020.20
5.5.160.0170.05020.23
5.5.150.0200.05320.13
5.5.140.0230.04720.18
5.5.130.0230.05320.32
5.5.120.0230.05020.19
5.5.110.0270.05720.22
5.5.100.0330.04320.07
5.5.90.0200.04720.18
5.5.80.0270.04320.14
5.5.70.0270.05320.14
5.5.60.0400.04320.11
5.5.50.0270.05720.10
5.5.40.0330.05720.06
5.5.30.0370.05720.20
5.5.20.0130.05320.01
5.5.10.0100.05720.08
5.5.00.0100.05719.99

preferences:
141.31 ms | 1394 KiB | 7 Q