3v4l.org

run code in 300+ PHP versions simultaneously
<? function main(){ $cards = array("ah", "ac", "ad", "as", "2h", "2c", "2d", "2s", "3h", "3c", "3d", "3s", "4h", "4c", "4d", "4s", "5h", "5c", "5d", "5s", "6h", "6c", "6d", "6s", "7h", "7c", "7d", "7s", "8h", "8c", "8d", "8s", "9h", "9c", "9d", "9s", "th", "tc", "td", "ts", "jh", "jc", "jd", "js", "qh", "qc", "qd", "qs", "kh", "kc", "kd", "ks"); srand(time()); for($i = 0; $i < 52; $i++) { $count = count($cards); $random = (rand()%$count); if($cards[$random] == "") { $i--; } else { $deck[] = $cards[$random]; $cards[$random] = ""; } } srand(time()); $starting_point = (rand()%51); print("Starting point for cut cards is: $starting_point<p>"); // display shuffled cards (EXAMPLE ONLY) for ($index = 0; $index < 52; $index++) { if ($starting_point == 52) { $starting_point = 0; } print("Uncut Point: <strong>$deck[$index]</strong> "); print("Starting Point: <strong>$deck[$starting_point]</strong><br>"); $starting_point++; } } main(); ?>

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.3.40.0140.00018.46
8.3.30.0100.01018.84
8.3.20.0070.00020.07
8.3.10.0080.00023.65
8.3.00.0060.00317.25
8.2.170.0170.00322.96
8.2.160.0040.01120.35
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00022.09
8.2.110.0060.00321.96
8.2.100.0070.00417.63
8.2.90.0040.00419.09
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0060.00317.93
8.2.50.0040.00818.07
8.2.40.0000.00819.82
8.2.30.0080.00017.80
8.2.20.0050.00217.43
8.2.10.0040.00417.90
8.2.00.0040.00417.59
8.1.270.0030.00622.10
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00323.83
8.1.230.0090.00319.13
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0040.00416.98
8.1.190.0050.00317.10
8.1.180.0040.00418.10
8.1.170.0040.00418.44
8.1.160.0040.00421.93
8.1.150.0000.00718.65
8.1.140.0070.00017.27
8.1.130.0000.00717.68
8.1.120.0040.00317.33
8.1.110.0000.00817.30
8.1.100.0030.00317.20
8.1.90.0040.00417.33
8.1.80.0000.00817.35
8.1.70.0000.00717.24
8.1.60.0040.00417.49
8.1.50.0090.00017.45
8.1.40.0030.00817.26
8.1.30.0040.00417.50
8.1.20.0040.00417.39
8.1.10.0040.00417.45
8.1.00.0070.00017.28
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00618.28
8.0.270.0030.00317.11
8.0.260.0030.00317.14
8.0.250.0000.00616.77
8.0.240.0060.00016.84
8.0.230.0000.00716.69
8.0.220.0070.00016.73
8.0.210.0030.00316.72
8.0.200.0000.00616.80
8.0.190.0030.00516.80
8.0.180.0040.00416.79
8.0.170.0000.00716.80
8.0.160.0040.00416.81
8.0.150.0030.00716.75
8.0.140.0000.00716.72
8.0.130.0000.00813.32
8.0.120.0080.00016.75
8.0.110.0040.00416.73
8.0.100.0040.00416.77
8.0.90.0000.00716.62
8.0.80.0090.01216.81
8.0.70.0020.00516.69
8.0.60.0030.00316.66
8.0.50.0000.00716.58
8.0.30.0140.00716.89
8.0.20.0100.01017.40
8.0.10.0030.00316.68
8.0.00.0100.00816.58
7.4.330.0050.00015.00
7.4.320.0030.00316.36
7.4.300.0060.00016.44
7.4.290.0030.00316.41
7.4.280.0000.00716.45
7.4.270.0000.00616.45
7.4.260.0050.00316.38
7.4.250.0070.00016.33
7.4.240.0040.00416.34
7.4.230.0060.00016.28
7.4.220.0140.00316.38
7.4.210.0030.01016.53
7.4.200.0050.00216.34
7.4.160.0090.00616.28
7.4.150.0170.00717.40
7.4.140.0150.00617.86
7.4.130.0070.01016.42
7.4.120.0080.00916.29
7.4.110.0140.00716.50
7.4.100.0120.00916.28
7.4.90.0130.00316.43
7.4.80.0070.01019.39
7.4.70.0100.00616.49
7.4.60.0030.01416.36
7.4.50.0030.00616.23
7.4.40.0090.00916.35
7.4.30.0060.00916.44
7.3.330.0020.00213.29
7.3.320.0050.00013.36
7.3.310.0070.00016.08
7.3.300.0030.00316.00
7.3.290.0160.00916.07
7.3.280.0050.01116.16
7.3.270.0110.00717.40
7.3.260.0120.00916.52
7.3.250.0040.01216.40
7.3.240.0050.01116.45
7.3.230.0060.01016.39
7.3.210.0120.00616.10
7.3.200.0120.00619.39
7.3.190.0060.01016.17
7.3.180.0050.01116.32
7.3.170.0090.00616.27
7.3.160.0060.00916.28
7.3.10.0040.00716.71
7.3.00.0000.01116.47
7.2.330.0160.00016.51
7.2.320.0030.01516.63
7.2.310.0070.01016.64
7.2.300.0060.01016.58
7.2.290.0050.01116.51
7.2.130.0080.00316.95
7.2.120.0030.01016.89
7.2.110.0060.00616.77
7.2.100.0070.00716.77
7.2.90.0060.00316.63
7.2.80.0120.00016.63
7.2.70.0030.01316.95
7.2.60.0000.01116.86
7.2.50.0040.01116.63
7.2.40.0030.00916.61
7.2.30.0000.01416.74
7.2.20.0070.00716.91
7.2.10.0050.00816.83
7.2.00.0010.00818.08
7.1.250.0070.00315.97
7.1.70.0030.00517.26
7.1.60.0070.01819.32
7.1.50.0160.00616.68
7.1.00.0030.07722.28
7.0.200.0070.00416.52
7.0.140.0100.06722.12
7.0.100.0100.06021.74
7.0.90.0100.07721.77
7.0.80.0070.07721.66
7.0.70.0070.08721.74
7.0.60.0270.06721.68
7.0.50.0100.07321.96
7.0.40.0130.04720.13
7.0.30.0030.09320.04
7.0.20.0100.07720.00
7.0.10.0170.05020.04
7.0.00.0100.07020.03
5.6.280.0070.07021.01
5.6.250.0070.06020.71
5.6.240.0170.05320.72
5.6.230.0030.08720.62
5.6.220.0070.06720.70
5.6.210.0170.06320.77
5.6.200.0170.04321.13
5.6.190.0170.07321.04
5.6.180.0030.07021.16
5.6.170.0100.07721.04
5.6.160.0130.07321.04
5.6.150.0070.06720.97
5.6.140.0130.07721.06
5.6.130.0100.07721.04
5.6.120.0000.07021.04
5.6.110.0070.08021.02
5.6.100.0070.09021.14
5.6.90.0100.05321.01
5.6.80.0200.03720.34
5.6.70.0100.08020.52
5.6.60.0000.06020.45
5.6.50.0130.07020.34
5.6.40.0030.06320.46
5.6.30.0070.07320.55
5.6.20.0100.07320.45
5.6.10.0030.08720.48
5.6.00.0030.05720.42
5.5.380.0030.08320.39
5.5.370.0270.08020.39
5.5.360.0070.08720.51
5.5.350.0070.08320.43
5.5.340.0100.07720.85
5.5.330.0070.09020.67
5.5.320.0130.04320.91
5.5.310.0130.08020.67
5.5.300.0100.07320.95
5.5.290.0030.08720.85
5.5.280.0100.04320.95
5.5.270.0030.05320.91
5.5.260.0100.08320.95
5.5.250.0000.07020.72
5.5.240.0030.07320.33
5.5.230.0030.08320.18
5.5.220.0070.08020.27
5.5.210.0100.06020.30
5.5.200.0130.07320.24
5.5.190.0000.08020.29
5.5.180.0130.07320.20
5.5.160.0130.07020.14
5.5.150.0000.05020.10
5.5.140.0070.07020.14
5.5.130.0070.05720.23
5.5.120.0070.07320.20
5.5.110.0130.07720.25
5.5.100.0030.08020.10
5.5.90.0030.05020.15
5.5.80.0030.07720.18
5.5.70.0100.06319.95
5.5.60.0000.07720.05
5.5.50.0100.07720.18
5.5.40.0070.08020.07
5.5.30.0170.07020.07
5.5.20.0100.07720.17
5.5.10.0000.08720.00
5.5.00.0170.05320.13
5.4.450.0100.06719.38
5.4.440.0130.07719.41
5.4.430.0030.05019.36
5.4.420.0170.06019.36
5.4.410.0000.06319.40
5.4.400.0070.05719.23
5.4.390.0030.07019.25
5.4.380.0100.07719.03
5.4.370.0130.06719.16
5.4.360.0100.05719.04
5.4.350.0070.07019.13
5.4.340.0070.07719.06
5.4.320.0070.07319.04
5.4.310.0100.07018.89
5.4.300.0070.07319.23
5.4.290.0130.06719.14
5.4.280.0070.07018.94
5.4.270.0070.06019.00
5.4.260.0100.07719.08
5.4.250.0130.06719.04
5.4.240.0100.07018.83
5.4.230.0070.07319.15
5.4.220.0170.06718.96
5.4.210.0100.05319.00
5.4.200.0070.07319.04
5.4.190.0030.04719.15
5.4.180.0070.05019.02
5.4.170.0000.08719.08
5.4.160.0130.07318.88
5.4.150.0130.07319.18
5.4.140.0170.06316.46
5.4.130.0000.05716.45
5.4.120.0030.06316.42
5.4.110.0030.07316.36
5.4.100.0000.08016.42
5.4.90.0030.06016.39
5.4.80.0100.06716.44
5.4.70.0200.06016.38
5.4.60.0070.07316.31
5.4.50.0100.06316.45
5.4.40.0070.07316.51
5.4.30.0070.07716.42
5.4.20.0000.08016.26
5.4.10.0100.07016.46
5.4.00.0030.04315.86
5.3.290.0030.08314.49
5.3.280.0030.04014.56
5.3.270.0070.06014.59
5.3.260.0070.07714.59
5.3.250.0070.07314.58
5.3.240.0070.04014.56
5.3.230.0000.04714.60
5.3.220.0000.08314.52
5.3.210.0030.07714.42
5.3.200.0100.07314.55
5.3.190.0030.07714.54
5.3.180.0100.07014.54
5.3.170.0130.05014.52
5.3.160.0030.07714.49
5.3.150.0030.05014.39
5.3.140.0070.07314.50
5.3.130.0030.04714.49
5.3.120.0130.07014.52
5.3.110.0070.06014.52
5.3.100.0030.06014.01
5.3.90.0030.07713.95
5.3.80.0030.04713.86
5.3.70.0100.07313.87
5.3.60.0070.05013.99
5.3.50.0000.06013.80
5.3.40.0030.08313.94
5.3.30.0100.04013.84
5.3.20.0000.06713.54
5.3.10.0100.06713.66
5.3.00.0030.04713.59
5.2.170.0000.06311.19
5.2.160.0070.03710.98
5.2.150.0100.03311.06
5.2.140.0100.05011.19
5.2.130.0000.04310.89
5.2.120.0030.03010.96
5.2.110.0070.06011.01
5.2.100.0030.06010.89
5.2.90.0070.05710.89
5.2.80.0000.03710.95
5.2.70.0070.06011.09
5.2.60.0030.06310.84
5.2.50.0000.06010.81
5.2.40.0130.05310.80
5.2.30.0000.05711.01
5.2.20.0000.03711.01
5.2.10.0030.03710.91
5.2.00.0000.07010.68
5.1.60.0130.04710.02
5.1.50.0070.05310.05
5.1.40.0000.0509.96
5.1.30.0000.06010.41
5.1.20.0030.05010.42
5.1.10.0070.03710.05
5.1.00.0070.0279.94
5.0.50.0000.0408.49
5.0.40.0070.0338.43
5.0.30.0030.0308.20
5.0.20.0030.0308.07
5.0.10.0030.0438.28
5.0.00.0030.0507.99
4.4.90.0000.0307.25
4.4.80.0070.0307.25
4.4.70.0000.0337.25
4.4.60.0100.0237.25
4.4.50.0000.0207.25
4.4.40.0000.0507.25
4.4.30.0030.0237.25
4.4.20.0030.0237.25
4.4.10.0000.0377.25
4.4.00.0030.0277.25
4.3.110.0000.0337.25
4.3.100.0000.0377.25
4.3.90.0000.0307.25
4.3.80.0030.0507.25
4.3.70.0030.0177.25
4.3.60.0000.0277.25
4.3.50.0000.0377.25
4.3.40.0000.0237.25
4.3.30.0000.0407.25
4.3.20.0000.0207.25
4.3.10.0030.0337.25
4.3.00.0030.0337.25

preferences:
43.75 ms | 400 KiB | 5 Q