3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ($_GET['mk'] == 1) { setcookie('generatedcount', $_COOKIE['generatedcount'] + 1, time()+3600); $locationurl = $_SERVER['HTTP_HOST'] . dirname($_SERVER["REQUEST_URI"]); $final = file_get_contents('http://' . $locationurl . '/generate.php?gm=' . $_GET['gm'] . '&prefix=' . $_GET['prefix'] . '&suffix=' . $_GET['suffix']); } $usernamecount = $_COOKIE['generatedcount'] + 1; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Username Generator</title> <link rel="shortcut icon" href="favicon.ico"> <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/narrow_jumbotron.css" rel="stylesheet"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js does not work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="modal fade" id="usernameSettings" tabindex="-1" role="dialog" aria-labelledby="usernameSettingsLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h4 class="modal-title" id="usernameSettingsLabel">Options</h4> </div> <div class="modal-body"> <form class="form-horizontal" action="" method="GET" role="form"> <div class="row"> <div class="col-md-7"> <div class="form-group"> <label class="col-sm-2 control-label">Method</label> <div class="col-sm-10"> <input type="hidden" name="mk" value="1" /> <select name="gm" class="form-control"> <option value="1">1 (Adjective Noun Number)</option> <option value="2">2 (Adjective Noun)</option> </select> </div> </div> </div> <div class="col-md-5"> <div class="form-group"> <div class="col-sm-12"> <input type="text" class="form-control" placeholder="Important noun(s)" name="importantnouns"> </div> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="col-sm-2 control-label">Prefix</label> <div class="col-sm-10"> <input type="text" placeholder="_xxX" class="form-control" name="prefix" value="<?php echo $_GET['prefix']; ?>"> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="col-sm-2 control-label">Suffix</label> <div class="col-sm-10"> <input type="text" placeholder="Xxx_" class="form-control" name="suffix" value="<?php echo $_GET['suffix']; ?>"> </div> </div> </div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="submit" class="btn btn-success">Generate</button> </form> </div> </div> </div> </div><br /><br /><br /> <div class="container"> <div class="jumbotron" style="text-align:center;"> <form method="GET"> <input type="hidden" name="mk" value="1" /> <?php if ($_GET['gm']) { echo '<input type="hidden" name="gm" value="'. $_GET['gm'] .'" />'; } else { echo '<input type="hidden" name="gm" value="1" />'; } if ($_GET['suffix']) { echo '<input type="hidden" name="suffix" value="'. $_GET['suffix'] .'" />'; } else { echo '<input type="hidden" name="suffix" value="" />'; } if ($_GET['prefix']) { echo '<input type="hidden" name="prefix" value="'. $_GET['prefix'] .'" />'; } else { echo '<input type="hidden" name="prefix" value="" />'; } ?> <h1 style="font-size: 50px;">Username Generator</h1> <?php if ($_GET['mk'] == '1') { echo "<p>Your username is...</p>"; echo '<div style="font-size: 20px;" class="well well-sm">'; echo $final; echo '</div>'; echo '<p>Make another?</p>'; } else { echo '<p>Would you like to randomly generate a username?</p>'; } ?> <div class="btn-group"> <button type="submit" class="btn btn-success">Yes please</a> <button type="button" class="btn btn-success dropdown-toggle" data-toggle="modal" data-target="#usernameSettings"> <span class="glyphicon glyphicon-cog"></span> </button> </div> <a href="<?php echo $locationurl; ?>" type="button" class="btn btn-danger">No thanks</a> </form> </div> <div class="row"> <?php if ($_GET['mk'] == 1) { ?> <div class="col-md-4"><p> <?php if ($usernamecount == 1) { echo "You have generated one username."; } elseif ($usernamecount < 10) { echo "You have generated $usernamecount usernames."; } elseif ($usernamecount < 20) { echo "Nice, you have made $usernamecount usernames."; } elseif ($usernamecount < 50) { echo "Yowza! $usernamecount usernames. Do you like any of them?"; } elseif ($usernamecount < 100) { echo "Wow. You've made $usernamecount usernames and you're not gonna stop."; } elseif ($usernamecount < 500) { echo "$usernamecount. I'm pretty sure its not a competition to see who can make the most usernames."; } elseif ($usernamecount < 1000) { echo "Don't you have a job?! You've made $usernamecount usernames... I think there are better things to do."; } elseif ($usernamecount < 2000) { echo "Well, I think you may like these messages. $usernamecount and you're still going. Tell <a href='http://speedysnail6.com'>Speedysnail6</a> any suggestions to make it better."; } elseif ($usernamecount >= 2000) { echo "Due to the owner wanting to code an actual feature, there will be no new messages saying that you have $usernamecount usernames made. I hope you are having fun. Maybe more later."; } ?> </p></div> <div class="col-md-4"> <p>If you <a href="http://codecanyon.com/#">buy</a> this, you can configure your own words that randomly mix and match.</p> </div> <div><p>Incase you care, your IP Address is <?php echo $_SERCER['REMOTE_ADDR']; ?> and a random number is <?php echo rand(1,10); ?>. You're welcome <?php } else {?> <div class="col-md-4"><p>Copyright &copy; <?php echo $_SERVER['HTTP_HOST']; ?>. All rights reserved.</p></div> <div class="col-md-4"><p>This PHP script was developed by <a href="http://speedysnail6.com" title="Speedysnail6">Speedysnail6</a>.</div> <div class="col-md-4">Want to get this app for your website? <a href="http://codecanyon.com/#">Buy it</a></div> <?php } ?> </div> </div> <!-- jQuery (necessary for Bootstraps JavaScript plugins) --> <script src="js/jquery.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="js/bootstrap.min.js"></script> </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)
8.0.120.0040.00413.46
8.0.110.0040.00313.48
8.0.100.0010.00613.47
8.0.90.0030.00413.41
8.0.80.0020.00613.47
8.0.70.0060.00113.44
8.0.60.0050.00313.41
8.0.50.0020.00613.42
8.0.30.0060.00213.44
8.0.20.0080.00213.47
8.0.10.0080.00213.62
8.0.00.0000.00713.56
7.4.250.0020.00513.33
7.4.240.0030.00413.31
7.4.230.0060.00113.38
7.4.220.0040.00413.35
7.4.210.0040.00413.34
7.4.200.0040.00413.36
7.4.190.0030.00313.38
7.4.180.0050.00113.42
7.4.160.0000.00713.34
7.4.150.0050.00113.40
7.4.140.0020.00413.34
7.4.130.0020.00613.27
7.4.120.0040.00313.39
7.4.110.0050.00113.31
7.4.100.0000.00713.24
7.4.90.0040.00313.27
7.4.80.0040.00313.30
7.4.70.0060.00113.30
7.4.60.0070.00013.34
7.4.50.0030.00313.20
7.4.40.0040.00313.23
7.4.30.0060.00113.29
7.4.20.0050.00213.29
7.4.10.0060.00113.29
7.4.00.0040.00413.37
7.3.310.0020.00513.29
7.3.300.0050.00213.20
7.3.290.0040.00413.33
7.3.280.0060.00213.30
7.3.270.0040.00513.29
7.3.260.0040.00313.29
7.3.250.0060.00213.27
7.3.240.0020.00613.38
7.3.230.0040.00413.34
7.3.220.0060.00313.25
7.3.210.0030.00613.23
7.3.200.0050.00313.30
7.3.190.0030.00513.28
7.3.180.0020.00613.24
7.3.170.0080.00013.20
7.3.160.0010.00613.28
7.3.150.0030.00413.09
7.3.140.0000.00713.21
7.3.130.0030.00313.26
7.3.120.0070.00013.25
7.3.110.0040.00313.21
7.3.100.0060.00113.18
7.3.90.0020.00513.36
7.3.80.0050.00213.22
7.3.70.0050.00213.25
7.3.60.0040.00313.33
7.3.50.0030.00413.45
7.3.40.0050.00213.29
7.3.30.0060.00013.42
7.3.20.0060.00114.94
7.3.10.0040.00314.90
7.3.00.0030.00414.99
7.2.340.0080.00313.23
7.2.330.0070.00313.23
7.2.320.0090.00113.26
7.2.310.0050.00513.21
7.2.300.0060.00413.23
7.2.290.0040.00513.18
7.2.280.0060.00413.22
7.2.270.0040.00413.26
7.2.260.0050.00513.14
7.2.250.0030.00613.24
7.2.240.0100.00013.30
7.2.230.0070.00413.17
7.2.220.0070.00413.13
7.2.210.0040.00613.17
7.2.200.0040.00713.30
7.2.190.0080.00213.35
7.2.180.0100.00013.34
7.2.170.0080.00213.34
7.2.160.0070.00313.29
7.2.150.0030.00715.06
7.2.140.0070.00215.10
7.2.130.0070.00415.11
7.2.120.0040.00615.28
7.2.110.0080.00215.21
7.2.100.0060.00315.18
7.2.90.0090.00215.09
7.2.80.0080.00214.84
7.2.70.0070.00514.81
7.2.60.0080.00515.05
7.2.50.0020.01014.86
7.2.40.0110.00014.61
7.2.30.0100.00214.77
7.2.20.0060.00514.97
7.2.10.0110.00115.13
7.2.00.0080.00315.28
7.1.330.0090.00113.95
7.1.320.0000.01114.08
7.1.310.0100.00013.55
7.1.300.0100.00113.74
7.1.290.0050.00513.91
7.1.280.0070.00313.98
7.1.270.0060.00613.72
7.1.260.0080.00214.07
7.1.250.0080.00213.89
7.1.240.0140.00013.53
7.1.230.0090.00113.75
7.1.220.0100.00013.90
7.1.210.0070.00413.72
7.1.200.0050.00413.99
7.1.190.0100.00113.84
7.1.180.0100.00013.99
7.1.170.0030.00613.86
7.1.160.0110.00013.60
7.1.150.0080.00113.71
7.1.140.0080.00113.59
7.1.130.0030.00713.84
7.1.120.0070.00313.66
7.1.110.0100.00014.12
7.1.100.0040.00613.65
7.1.90.0050.00413.52
7.1.80.0070.00313.61
7.1.70.0080.00314.73
7.1.60.0070.00715.69
7.1.50.0050.00915.14
7.1.40.0040.00614.11
7.1.30.0100.00013.78
7.1.20.0060.00514.18
7.1.10.0070.00314.02
7.1.00.0060.02816.58
7.0.330.0080.00313.46
7.0.320.0040.00513.99
7.0.310.0010.00913.70
7.0.300.0050.00613.57
7.0.290.0060.00313.77
7.0.280.0090.00113.87
7.0.270.0070.00213.75
7.0.260.0070.00413.51
7.0.250.0130.00013.96
7.0.240.0040.00713.68
7.0.230.0090.00113.74
7.0.220.0080.00313.88
7.0.210.0060.00313.82
7.0.200.0080.00214.43
7.0.190.0070.00413.63
7.0.180.0100.00013.69
7.0.170.0060.00313.77
7.0.160.0070.00413.65
7.0.150.0070.00313.74
7.0.140.0070.02416.58
7.0.130.0080.00213.97
7.0.120.0040.00614.00
7.0.110.0060.00414.07
7.0.100.0120.02815.83
7.0.90.0100.02115.74
7.0.80.0080.02415.68
7.0.70.0080.02815.83
7.0.60.0070.02115.82
7.0.50.0080.01715.79
7.0.40.0100.02815.78
7.0.30.0060.03315.69
7.0.20.0120.02715.85
7.0.10.0040.02615.89
7.0.00.0080.03115.77
5.6.400.0030.00612.59
5.6.390.0030.00712.54
5.6.380.0060.00412.44
5.6.370.0030.00612.52
5.6.360.0050.00412.60
5.6.350.0020.00812.54
5.6.340.0080.00212.17
5.6.330.0100.00012.71
5.6.320.0100.00012.63
5.6.310.0060.00412.58
5.6.300.0090.00112.38
5.6.290.0090.00012.46
5.6.280.0060.02615.41
5.6.270.0050.00512.63
5.6.260.0070.00312.36
5.6.250.0060.02215.01
5.6.240.0080.02415.22
5.6.230.0030.02615.18
5.6.220.0060.03015.31
5.6.210.0060.03415.16
5.6.200.0090.02915.39
5.6.190.0080.02815.42
5.6.180.0070.02515.48
5.6.170.0110.02715.53
5.6.160.0080.02215.34
5.6.150.0050.03315.38
5.6.140.0030.03315.34
5.6.130.0060.03115.33
5.6.120.0110.02315.49
5.6.110.0040.02215.15
5.6.100.0060.01815.14
5.6.90.0050.02715.23
5.6.80.0110.02315.21
5.6.70.0040.02515.07
5.6.60.0030.03315.26
5.6.50.0070.01815.04
5.6.40.0050.03215.13
5.6.30.0100.02615.05
5.6.20.0100.02615.11
5.6.10.0070.02114.94
5.6.00.0100.01914.80
5.5.380.0100.01415.21
5.5.370.0070.03015.18
5.5.360.0110.02514.99
5.5.350.0060.02215.05
5.5.340.0050.02415.17
5.5.330.0050.02615.11
5.5.320.0070.02815.19
5.5.310.0090.01815.10
5.5.300.0050.03515.24
5.5.290.0040.02915.31
5.5.280.0060.02115.24
5.5.270.0050.03115.16
5.5.260.0080.02115.15
5.5.250.0070.02015.25
5.5.240.0080.02415.02
5.5.230.0080.02715.08
5.5.220.0080.02714.73
5.5.210.0000.02714.97
5.5.200.0060.01515.07
5.5.190.0060.02915.00
5.5.180.0080.02615.02
5.5.170.0060.00312.33
5.5.160.0050.02614.83
5.5.150.0010.02214.89
5.5.140.0050.01814.82
5.5.130.0040.03114.85
5.5.120.0070.02814.83
5.5.110.0080.02014.81
5.5.100.0040.02315.08
5.5.90.0110.02214.90
5.5.80.0090.02114.86
5.5.70.0040.02914.77
5.5.60.0060.02014.93
5.5.50.0090.01614.91
5.5.40.0040.02215.09
5.5.30.0070.02414.82
5.5.20.0060.02115.02
5.5.10.0090.02515.07
5.5.00.0080.02614.69
5.4.450.0070.02714.75
5.4.440.0070.02814.72
5.4.430.0060.02814.52
5.4.420.0110.02314.76
5.4.410.0070.02614.77
5.4.400.0040.03014.48
5.4.390.0080.01514.75
5.4.380.0080.01914.58
5.4.370.0080.02214.51
5.4.360.0050.02914.64
5.4.350.0040.03014.59
5.4.340.0070.01714.58
5.4.330.0090.00012.28
5.4.320.0060.02514.47
5.4.310.0110.01214.56
5.4.300.0040.02914.66
5.4.290.0090.02514.63
5.4.280.0060.02014.73
5.4.270.0040.03014.43
5.4.260.0080.02314.52
5.4.250.0100.02514.71
5.4.240.0080.02814.45
5.4.230.0060.01714.45
5.4.220.0030.02814.23
5.4.210.0100.02414.25
5.4.200.0090.01314.53
5.4.190.0060.02814.43
5.4.180.0090.02314.39
5.4.170.0070.01314.67
5.4.160.0060.02814.65
5.4.150.0100.02414.59
5.4.140.0090.02413.68
5.4.130.0030.03013.77
5.4.120.0070.01813.68
5.4.110.0070.01413.95
5.4.100.0100.02413.78
5.4.90.0070.01713.57
5.4.80.0080.02513.70
5.4.70.0090.02413.39
5.4.60.0030.02813.82
5.4.50.0040.02413.82
5.4.40.0030.02913.59
5.4.30.0030.02813.72
5.4.20.0040.01813.78
5.4.10.0040.01813.78
5.4.00.0080.01113.37
5.3.290.0070.02713.12
5.3.280.0090.02013.05
5.3.270.0050.02713.34
5.3.260.0050.02913.49
5.3.250.0020.03113.64
5.3.240.0040.02413.02
5.3.230.0070.02813.40
5.3.220.0050.02413.41
5.3.210.0080.02813.54
5.3.200.0090.01813.56
5.3.190.0070.02013.49
5.3.180.0050.02513.63
5.3.170.0100.02113.36
5.3.160.0080.01713.52
5.3.150.0050.03113.32
5.3.140.0070.02612.99
5.3.130.0070.02013.34
5.3.120.0070.02913.24
5.3.110.0090.02013.13
5.3.100.0020.01813.35
5.3.90.0050.02413.29
5.3.80.0050.01613.17
5.3.70.0080.01313.28
5.3.60.0040.01613.20
5.3.50.0010.01913.12
5.3.40.0050.01512.89
5.3.30.0050.01313.08
5.3.20.0030.02013.04
5.3.10.0020.01613.13
5.3.00.0050.01512.88
5.2.170.0050.01111.66
5.2.160.0040.01311.56
5.2.150.0050.01211.58
5.2.140.0030.01411.50
5.2.130.0030.01311.61
5.2.120.0040.01211.52
5.2.110.0030.01711.59
5.2.100.0030.01311.53
5.2.90.0040.01111.70
5.2.80.0020.01911.56
5.2.70.0010.01811.56
5.2.60.0040.01111.50
5.2.50.0030.01711.56
5.2.40.0050.01211.59
5.2.30.0040.01011.46
5.2.20.0040.02311.59
5.2.10.0030.02311.34
5.2.00.0040.01911.20
5.1.60.0080.01010.55
5.1.50.0050.00810.76
5.1.40.0040.00910.87
5.1.30.0040.00911.03
5.1.20.0060.01210.80
5.1.10.0040.00910.82
5.1.00.0040.01010.74
5.0.50.0030.01310.51
5.0.40.0030.00710.51
5.0.30.0020.01310.51
5.0.20.0040.00710.51
5.0.10.0030.00910.51
5.0.00.0020.01210.51
4.4.90.0020.00610.51
4.4.80.0040.01210.51
4.4.70.0010.00510.51
4.4.60.0000.00710.51
4.4.50.0000.00810.51
4.4.40.0020.01710.51
4.4.30.0040.00510.51
4.4.20.0020.00710.51
4.4.10.0010.00710.51
4.4.00.0010.01010.51
4.3.110.0010.00710.51
4.3.100.0020.00610.51
4.3.90.0000.00710.51
4.3.80.0010.02010.51
4.3.70.0010.00910.51
4.3.60.0020.00510.51
4.3.50.0020.00610.51
4.3.40.0000.01010.51
4.3.30.0010.00610.51
4.3.20.0010.00610.51
4.3.10.0010.00510.51
4.3.00.0000.00710.51

preferences:
41.56 ms | 401 KiB | 5 Q