3v4l.org

run code in 300+ PHP versions simultaneously
<?php // PHP Slots Script by Jonesy44 // // http://www.hawkee.com // session_start(); echo '<style> #slots { border: 1px solid green; background: lightgreen url(\'slots.jpg\'); padding: 10px; width: 200px; text-align:left; } #gborder { border: 1px solid green; background: lightgreen; padding: 10px; width: 200px; text-align:center; } #rborder { border: 1px solid red; background: pink; padding: 10px; width: 200px; text-align:center; } #border { border: 1px solid orange; background: white; padding: 10px; width: 200px; text-align:center; } </style>'; function playSlots() { $r1 = rand(0,9); $r2 = rand(0,9); $r3 = rand(0,9); echo '<div id="slots"><h1>&nbsp;&nbsp;&nbsp;' .$r1. ' &nbsp;&nbsp;&nbsp;&nbsp; ' .$r2. ' &nbsp;&nbsp;&nbsp; ' .$r3. '</h1></div>'; if ($r1 == $r2) { if ($r2 == $r3) { echo '<div id="gborder">Complete win!<br><b> + $2000</b></div>'; $_SESSION["slots"] = $_SESSION["slots"] + 2000; } else { echo '<div id="gborder">First two!<br><b> + $250</b></div>'; $_SESSION["slots"] = $_SESSION["slots"] + 250; } } elseif ($r2 == $r3) { if ($r1 != $r2) { echo '<div id="gborder">Second two!<br><b> + $250</b></div>'; $_SESSION["slots"] = $_SESSION["slots"] + 250; } } elseif ($r1 == $r3) { echo '<div id="gborder">First and last!<br><b> + $250</b></div>'; $_SESSION["slots"] = $_SESSION["slots"] + 250; } else { echo '<div id="rborder">You Lose!<br><i> - $100</i></div>'; $_SESSION["slots"] = $_SESSION["slots"] - 100; } } if ($_GET["play"]) { if (!isset($_SESSION["slots"])) { $_SESSION["slots"] = 1000; } echo '<center>'; playSlots(); echo '<br><form action=' .$_SERVER['PHP_SELF']. ' method=get>'; echo '<input type=hidden name=play value=slots> <input type=submit value="Spin Wheels!"> </form>'; } else { echo '<form action=' .$_SERVER['PHP_SELF']. ' method=get>'; echo '<input type=hidden name=play value=slots> <input type=submit value="Play Slots!"> </form>'; exit(); } echo '<div id="border">Cash: $' .$_SESSION["slots"]. '<hr><a href=http://wfs.myartsonline.com><i>PHP Slots Script By Jonesy44</a> - <a href=http://www.hawkee.com>Hawkee.com</a><hr></div>'; echo '</center>'; ?>

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.4.00.0080.00815.15
7.3.120.0030.01014.91
7.3.110.0050.01214.95
7.3.100.0070.00915.03
7.3.90.0040.00914.92
7.3.80.0030.01314.69
7.3.70.0050.01214.96
7.3.60.0050.00814.95
7.3.50.0110.00514.83
7.3.40.0040.00714.81
7.3.30.0070.01014.94
7.3.20.0070.01016.61
7.3.10.0060.00616.57
7.3.00.0080.00716.67
7.2.250.0080.00615.23
7.2.240.0110.00815.07
7.2.230.0070.00515.17
7.2.220.0060.00815.11
7.2.210.0060.01115.11
7.2.200.0050.00815.07
7.2.190.0120.00315.20
7.2.180.0080.00815.05
7.2.170.0070.00715.08
7.2.130.0060.01117.06
7.2.120.0030.01116.79
7.2.110.0030.00617.11
7.2.100.0100.00316.69
7.2.90.0030.01016.98
7.2.80.0100.00317.12
7.2.70.0040.00816.74
7.2.60.0100.00717.14
7.2.50.0060.00616.94
7.2.40.0060.00616.92
7.2.30.0100.00616.99
7.2.20.0110.00016.79
7.2.10.0130.00717.02
7.2.00.0040.00918.21
7.1.330.0060.00815.79
7.1.320.0050.01215.64
7.1.310.0080.00615.84
7.1.300.0050.00715.69
7.1.290.0050.00615.70
7.1.280.0050.01015.78
7.1.270.0030.00815.75
7.1.260.0050.00915.70
7.1.250.0000.01715.79
7.1.120.0080.00318.68
7.1.110.0040.00718.24
7.1.100.0030.00718.09
7.1.90.0030.00717.93
7.1.80.0030.00717.98
7.1.70.0050.00417.03
7.1.60.0070.01627.28
7.1.50.0150.00725.73
7.1.40.0180.00434.33
7.1.30.0180.00434.14
7.1.20.0180.00434.52
7.1.10.0090.00316.39
7.1.00.0020.04419.53
7.0.260.0030.00718.33
7.0.250.0050.00517.79
7.0.240.0100.00017.49
7.0.230.0030.00617.63
7.0.220.0050.00517.73
7.0.210.0000.00916.60
7.0.200.0030.00516.62
7.0.190.0030.00616.72
7.0.180.0030.00616.21
7.0.170.0000.01016.11
7.0.160.0070.00316.18
7.0.150.0040.01116.09
7.0.140.0030.04019.15
7.0.130.0080.00316.42
7.0.120.0030.00716.44
7.0.110.0070.00316.25
7.0.100.0060.00316.25
7.0.90.0100.00016.13
7.0.80.0030.00716.48
7.0.70.0040.00815.97
7.0.60.0030.04017.94
7.0.50.0050.04517.10
7.0.40.0080.03518.30
7.0.30.0220.04718.27
7.0.20.0080.04318.22
7.0.10.0090.03218.24
7.0.00.0030.02518.36
5.6.300.0200.05720.79
5.6.290.0000.05620.74
5.6.280.0050.06120.92
5.6.270.0070.05120.82
5.6.260.0190.03820.96
5.6.250.0070.05020.77
5.6.240.0070.05020.78
5.6.230.0130.04520.77
5.6.220.0030.05520.93
5.6.210.0080.05620.71
5.6.200.0080.04419.55
5.6.190.0100.06020.57
5.6.180.1940.04620.66
5.6.170.0270.05620.69
5.6.160.0130.06320.62
5.6.150.0120.03819.54
5.6.140.0070.06519.44
5.6.130.0080.06519.48
5.6.120.0130.04720.90
5.6.110.0050.06421.02
5.6.100.0140.06220.93
5.6.90.0080.05120.94
5.6.80.0030.04320.26
5.6.70.0180.05720.35
5.6.60.0070.04820.11
5.6.50.0030.05220.13
5.6.40.0070.04720.23
5.6.30.0100.04520.07
5.6.20.0130.04320.09
5.6.10.0070.04720.10
5.6.00.0100.04520.29
5.5.380.0130.04317.37
5.5.370.0170.04017.63
5.5.360.0070.04817.51
5.5.350.0120.06519.01
5.5.340.0050.06717.90
5.5.330.0070.05119.26
5.5.320.0150.05318.92
5.5.310.0180.05619.19
5.5.300.0050.06617.94
5.5.290.0100.06518.05
5.5.280.0070.06919.38
5.5.270.0100.06319.31
5.5.260.0130.05219.42
5.5.250.0080.06819.28
5.5.240.0050.06018.83
5.5.230.0130.04017.39
5.5.220.0030.05017.37
5.5.210.0070.04617.41
5.5.200.0070.04717.39
5.5.190.0100.04517.38
5.5.180.0070.04717.41
5.5.160.0130.04017.48
5.5.150.0100.04417.36
5.5.140.0070.05117.38
5.5.130.0160.05417.28
5.5.120.0040.04917.33
5.5.110.0130.04117.40
5.5.100.0170.03717.25
5.5.90.0030.04916.99
5.5.80.0100.04316.95
5.5.70.0070.04517.27
5.5.60.0100.04117.27
5.5.50.0060.04717.18
5.5.40.0140.04016.94
5.5.30.0070.05317.21
5.5.20.0070.04617.26
5.5.10.0130.04017.01
5.5.00.0100.04316.93
5.4.450.0240.05619.33
5.4.440.0080.05619.29
5.4.430.0510.04519.61
5.4.420.0350.02619.46
5.4.410.0130.05019.02
5.4.400.0130.05218.95
5.4.390.0150.05018.81
5.4.380.0140.05118.74
5.4.370.0130.04618.89
5.4.360.0100.05218.76
5.4.350.0050.04515.51
5.4.340.0130.04215.45
5.4.320.0100.03915.79
5.4.310.0110.04315.69
5.4.300.0100.04515.68
5.4.290.0060.05115.72
5.4.280.0070.04915.67
5.4.270.0050.05015.67
5.4.260.0070.05115.68
5.4.250.0080.04915.71
5.4.240.0080.04315.71
5.4.230.0060.04715.71
5.4.220.0080.04815.68
5.4.210.0150.03915.70
5.4.200.0080.04815.66
5.4.190.0100.04415.71
5.4.180.0110.04415.71
5.4.170.0140.04115.80
5.4.160.0100.05015.63
5.4.150.0080.05215.62
5.4.140.0070.04814.38
5.4.130.0090.04514.24
5.4.120.0130.03914.35
5.4.110.0140.04014.35
5.4.100.0140.04814.34
5.4.90.0090.04414.36
5.4.80.0150.04014.38
5.4.70.0070.04414.35
5.4.60.0080.04014.36
5.4.50.0060.04314.21
5.4.40.0090.04114.31
5.4.30.0110.04214.20
5.4.20.0130.04014.31
5.4.10.0100.03714.35
5.4.00.0100.03813.79
5.3.290.0120.04013.68
5.3.280.0070.04913.69
5.3.270.0120.04813.70
5.3.260.0060.06113.71
5.3.250.0100.04813.73
5.3.240.0090.05013.70
5.3.230.0090.04813.81
5.3.220.0080.04913.77
5.3.210.0110.04813.73
5.3.200.0130.04613.63
5.3.190.0100.04713.73
5.3.180.0090.05113.65
5.3.170.0060.05313.65
5.3.160.0100.05013.78
5.3.150.0080.04813.77
5.3.140.0030.05413.65
5.3.130.0060.05713.64
5.3.120.0110.05113.74
5.3.110.0140.05513.55
5.3.100.0110.04613.04
5.3.90.0090.04913.17
5.3.80.0090.04713.10
5.3.70.0090.04913.07
5.3.60.0080.04713.09
5.3.50.0130.04213.10
5.3.40.0090.04613.15
5.3.30.0100.04613.06
5.3.20.0110.04612.70
5.3.10.0090.04712.84
5.3.00.0070.05012.79
5.2.170.0060.04210.36
5.2.160.0080.03810.35
5.2.150.0080.03910.21
5.2.140.0100.03710.29
5.2.130.0090.03610.30
5.2.120.0080.03410.30
5.2.110.0070.03510.17
5.2.100.0040.04110.30
5.2.90.0070.03810.18
5.2.80.0040.04710.25
5.2.70.0080.04710.30
5.2.60.0070.03710.25
5.2.50.0080.03610.19
5.2.40.0050.03910.20
5.2.30.0070.0529.97
5.2.20.0050.04210.12
5.2.10.0050.03710.08
5.2.00.0060.0429.95
5.1.60.0020.0349.18
5.1.50.0040.0339.17
5.1.40.0070.0309.17
5.1.30.0040.0379.43
5.1.20.0090.0329.46
5.1.10.0100.0289.19
5.1.00.0020.0369.22
5.0.50.0040.0277.96
5.0.40.0060.0257.89
5.0.30.0050.0607.80
5.0.20.0030.0277.78
5.0.10.0020.0327.77
5.0.00.0070.0417.76
4.4.90.0070.0257.00
4.4.80.0060.0186.99
4.4.70.0040.0196.99
4.4.60.0040.0326.99
4.4.50.0030.0207.00
4.4.40.0030.0396.97
4.4.30.0050.0206.99
4.4.20.0040.0257.04
4.4.10.0060.0167.04
4.4.00.0050.0397.00
4.3.110.0090.0386.95
4.3.100.0060.0236.95
4.3.90.0040.0216.93
4.3.80.0060.0346.91
4.3.70.0060.0186.93
4.3.60.0020.0206.93
4.3.50.0040.0316.93
4.3.40.0050.0316.88
4.3.30.0020.0226.29
4.3.20.0070.0306.28
4.3.10.0030.0226.26
4.3.00.0070.0227.80

preferences:
37 ms | 401 KiB | 5 Q