3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo ' <div class="content_box"><b>Random Spawn Array Generator - Generates a random spawn array from SavedPositions.txt!</b></div> <form method="POST" name="editor"> <textarea name="code" cols="80" rows="30" class="paste_textarea">'; if(!empty($_POST['code'])) { $text = $_POST['code']; $text = explode("\n",$text); $incAngles = $_POST['incAngles']; $counter = 0; $string = ""; for($i = 0; $i < sizeof($text); $i++) { $sText = explode(",",$text[$i]); if(empty($sText[1]) || empty($sText[2]) || empty($sText[3]) || empty($sText[4])) continue; if($incAngles == "on") if($i != sizeof($text) - 1) $string .= " {".$sText[1].",".$sText[2].",".$sText[3].",".$sText[4]."},\n"; else $string .= " {".$sText[1].",".$sText[2].",".$sText[3].",".$sText[4]."}\n"; else if($i != sizeof($text) - 1) $string .= " {".$sText[1].",".$sText[2].",".$sText[3]."},\n"; else $string .= " {".$sText[1].",".$sText[2].",".$sText[3]."}\n"; $counter++; } echo "new Float:".$_POST['format']."[".$counter."][".($incAngles == "on" ? "4" : "3")."] = {\n"; echo $string; echo '};'; } echo '</textarea> <div class="form_frame"> <div class="form_left"> Array name: </div> <div class="form_right"> <input type="text" value="randomSpawns" name="format" size="20" class="post_input"> </div> <div class="form_left"> Include angles: </div> <div class="form_right"> <input type="checkbox" name="incAngles"> </div> </div> <input type="submit" value="Split String" name="Submit"> </form>'; ?> echo ' <div class="content_box"><b>Random Spawn Array Generator - Generates a random spawn array from SavedPositions.txt!</b></div> <form method="POST" name="editor"> <textarea name="code" cols="80" rows="30" class="paste_textarea">'; if(!empty($_POST['code'])) { $text = $_POST['code']; $text = explode("\n",$text); $incAngles = $_POST['incAngles']; $counter = 0; $string = ""; for($i = 0; $i < sizeof($text); $i++) { $sText = explode(",",$text[$i]); if(empty($sText[1]) || empty($sText[2]) || empty($sText[3]) || empty($sText[4])) continue; if($incAngles == "on") if($i != sizeof($text) - 1) $string .= " {".$sText[1].",".$sText[2].",".$sText[3].",".$sText[4]."},\n"; else $string .= " {".$sText[1].",".$sText[2].",".$sText[3].",".$sText[4]."}\n"; else if($i != sizeof($text) - 1) $string .= " {".$sText[1].",".$sText[2].",".$sText[3]."},\n"; else $string .= " {".$sText[1].",".$sText[2].",".$sText[3]."}\n"; $counter++; } echo "new Float:".$_POST['format']."[".$counter."][".($incAngles == "on" ? "4" : "3")."] = {\n"; echo $string; echo '};'; } echo '</textarea> <div class="form_frame"> <div class="form_left"> Array name: </div> <div class="form_right"> <input type="text" value="randomSpawns" name="format" size="20" class="post_input"> </div> <div class="form_left"> Include angles: </div> <div class="form_right"> <input type="checkbox" name="incAngles"> </div> </div> <input type="submit" value="Split String" name="Submit"> </form>'; ?>

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.60.0140.00716.88
8.3.50.0150.00717.35
8.3.40.0110.00418.67
8.3.30.0110.00318.68
8.3.20.0040.00418.73
8.3.10.0040.00420.16
8.3.00.0040.00419.26
8.2.180.0070.01416.35
8.2.170.0040.01122.96
8.2.160.0070.01018.77
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0200.00026.16
8.2.120.0000.00918.75
8.2.110.0030.00620.35
8.2.100.0040.00817.72
8.2.90.0080.00319.34
8.2.80.0040.00419.20
8.2.70.0080.00017.63
8.2.60.0030.00717.93
8.2.50.0030.00518.07
8.2.40.0080.00018.22
8.2.30.0040.00418.13
8.2.20.0040.00419.41
8.2.10.0050.00217.79
8.2.00.0050.00317.77
8.1.280.0100.00725.92
8.1.270.0000.00723.99
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00322.21
8.1.230.0080.00323.86
8.1.220.0030.00517.74
8.1.210.0060.00318.91
8.1.200.0070.00317.23
8.1.190.0050.00317.51
8.1.180.0040.00418.10
8.1.170.0080.00018.91
8.1.160.0000.00818.83
8.1.150.0040.00418.69
8.1.140.0040.00417.35
8.1.130.0030.00317.91
8.1.120.0030.00517.44
8.1.110.0020.00517.34
8.1.100.0070.00017.35
8.1.90.0040.00417.46
8.1.80.0020.00517.34
8.1.70.0030.00317.27
8.1.60.0020.00517.62
8.1.50.0070.00017.48
8.1.40.0040.00417.53
8.1.30.0050.00317.71
8.1.20.0040.00417.66
8.1.10.0000.00817.55
8.1.00.0040.00417.45
8.0.300.0000.00720.21
8.0.290.0000.00716.75
8.0.280.0070.00018.30
8.0.270.0030.00317.32
8.0.260.0000.00616.86
8.0.250.0020.00516.81
8.0.240.0030.00316.94
8.0.230.0030.00316.98
8.0.220.0070.00016.93
8.0.210.0030.00316.87
8.0.200.0030.00316.98
8.0.190.0040.00416.82
8.0.180.0000.00816.92
8.0.170.0030.00616.75
8.0.160.0040.00416.92
8.0.150.0060.00516.86
8.0.140.0140.00016.86
8.0.130.0000.00513.37
8.0.120.0040.00416.75
8.0.110.0000.00716.68
8.0.100.0040.00416.72
8.0.90.0000.00816.70
8.0.80.0030.01316.90
8.0.70.0000.00816.91
8.0.60.0000.00716.83
8.0.50.0070.00016.70
8.0.30.0100.01017.05
8.0.20.0110.00817.15
8.0.10.0080.00016.84
8.0.00.0100.01016.66
7.4.330.0000.00512.96
7.4.320.0000.00716.51
7.4.300.0000.00616.48
7.4.290.0040.00416.39
7.4.280.0030.00816.47
7.4.270.0030.00316.58
7.4.260.0030.00313.21
7.4.250.0060.00316.50
7.4.240.0000.00716.63
7.4.230.0000.00716.29
7.4.220.0060.01216.63
7.4.210.0110.00616.70
7.4.200.0030.00316.48
7.4.190.0040.00416.48
7.4.160.0070.01016.41
7.4.150.0140.00616.38
7.4.140.0130.00416.32
7.4.130.0030.01316.66
7.4.120.0070.01016.32
7.4.110.0140.00716.64
7.4.100.0070.01016.71
7.4.90.0090.00916.69
7.4.80.0070.01019.39
7.4.70.0060.01016.46
7.4.60.0130.00716.64
7.4.50.0000.00916.52
7.4.40.0090.00916.40
7.4.30.0130.00716.34
7.4.00.0030.01414.96
7.3.330.0060.00013.00
7.3.320.0030.00313.11
7.3.310.0070.00016.09
7.3.300.0070.00016.20
7.3.290.0090.00816.27
7.3.280.0120.00716.21
7.3.270.0100.00716.19
7.3.260.0140.00716.31
7.3.250.0110.00816.38
7.3.240.0120.00616.36
7.3.230.0080.01116.42
7.3.210.0140.00316.34
7.3.200.0060.01516.43
7.3.190.0040.01216.49
7.3.180.0150.00416.18
7.3.170.0100.00716.44
7.3.160.0080.00816.59
7.3.120.0030.01314.55
7.2.330.0120.00616.38
7.2.320.0030.01516.58
7.2.310.0030.01616.48
7.2.300.0130.00916.38
7.2.290.0070.01016.55
7.2.00.0030.00619.18
7.1.100.0030.01318.11
7.1.70.0000.01016.71
7.1.60.0100.00719.30
7.1.50.0150.00616.91
7.1.00.0070.05322.30
7.0.200.0060.00614.78
7.0.140.0030.07722.04
7.0.120.0000.07721.96
7.0.60.0030.08021.77
7.0.50.0070.07717.68
7.0.40.0070.08320.18
7.0.30.0200.05720.09
7.0.20.0170.04020.09
7.0.10.0030.06020.13
7.0.00.0130.05320.04
5.6.280.0000.07720.92
5.6.210.0100.03320.72
5.6.200.0100.08318.21
5.6.190.0070.08720.61
5.6.180.0270.07320.61
5.6.170.0170.05720.44
5.6.160.0100.08720.61
5.6.150.0070.07718.21
5.6.140.0030.04318.20
5.6.130.0100.06018.21
5.6.120.0130.07720.98
5.6.110.0100.08321.03
5.6.100.0030.08720.99
5.6.90.0100.08021.04
5.6.80.0070.05020.53
5.5.350.0370.07020.41
5.5.340.0100.03717.91
5.5.330.0100.05020.36
5.5.320.0070.07720.18
5.5.310.0200.03320.22
5.5.300.0130.07318.01
5.5.290.0100.07318.00
5.5.280.0030.04320.78
5.5.270.0100.08320.91
5.5.260.0230.05320.81
5.5.250.0100.03720.48
5.5.240.0070.07320.05
5.4.450.0100.08019.36
5.4.440.0070.07319.41
5.4.430.0070.04019.50
5.4.420.0070.04019.39
5.4.410.0030.08318.98
5.4.400.0030.08019.16
5.4.390.0070.07719.18
5.4.380.0070.04018.93
5.4.370.0100.04719.16
5.4.360.0070.07718.91
5.4.350.0130.06019.12
5.4.340.0030.05018.79
5.4.320.0070.06318.81
5.4.310.0100.07319.08
5.4.300.0000.04319.15
5.4.290.0030.05018.78
5.4.280.0000.07019.17
5.4.270.0100.07319.18
5.4.260.0070.08019.14
5.4.250.0100.05018.91
5.4.240.0000.04319.17
5.4.230.0070.04319.00
5.4.220.0100.07019.09
5.4.210.0070.04018.92
5.4.200.0070.07319.19
5.4.190.0030.05019.07
5.4.180.0070.05318.87
5.4.170.0030.04019.14
5.4.160.0070.03718.98
5.4.150.0100.03019.11
5.4.140.0000.04016.30
5.4.130.0000.03716.34
5.4.120.0030.03716.21
5.4.110.0100.03016.34
5.4.100.0030.03316.60
5.4.90.0070.03716.41
5.4.80.0030.04016.25
5.4.70.0030.03716.39
5.4.60.0030.08016.38
5.4.50.0030.04316.36
5.4.40.0030.04316.26
5.4.30.0030.03316.24
5.4.20.0070.03016.33
5.4.10.0070.03716.58
5.4.00.0000.03715.78
5.3.290.0000.06314.66
5.3.280.0100.07014.43
5.3.270.0130.03314.55
5.3.260.0070.03314.71
5.3.250.0030.03714.57
5.3.240.0070.04014.44
5.3.230.0070.03314.71
5.3.220.0000.03714.53
5.3.210.0100.03014.40
5.3.200.0030.03314.51
5.3.190.0030.05014.51
5.3.180.0000.04014.53
5.3.170.0030.06714.50
5.3.160.0030.04014.52
5.3.150.0070.03314.48
5.3.140.0000.04014.55
5.3.130.0030.03714.53
5.3.120.0130.04314.49
5.3.110.0000.04014.50
5.3.100.0100.04314.02
5.3.90.0030.04014.13
5.3.80.0030.03313.97
5.3.70.0100.03313.96
5.3.60.0030.03713.98
5.3.50.0030.04013.89
5.3.40.0030.03713.89
5.3.30.0070.03313.89
5.3.20.0030.03313.64
5.3.10.0030.04313.65
5.3.00.0000.04013.68
5.2.170.0030.03011.11
5.2.160.0070.02711.16
5.2.150.0000.03011.16
5.2.140.0070.02711.14
5.2.130.0030.02710.95
5.2.120.0070.03711.09
5.2.110.0000.03311.07
5.2.100.0000.03011.03
5.2.90.0000.03011.13
5.2.80.0000.03711.08
5.2.70.0030.03011.11
5.2.60.0000.03310.97
5.2.50.0000.03011.12
5.2.40.0030.02710.91
5.2.30.0130.02310.83
5.2.20.0070.02310.87
5.2.10.0100.02010.87
5.2.00.0030.02710.73
5.1.60.0000.02710.04
5.1.50.0070.02010.01
5.1.40.0000.02710.01
5.1.30.0000.03010.31
5.1.20.0030.02710.36
5.1.10.0070.04310.10
5.1.00.0070.03310.07
5.0.50.0070.0438.76
5.0.40.0000.0308.76
5.0.30.0000.0678.76
5.0.20.0070.0208.76
5.0.10.0000.0308.76
5.0.00.0000.0378.76
4.4.90.0000.0178.76
4.4.80.0000.0178.76
4.4.70.0030.0138.76
4.4.60.0030.0138.76
4.4.50.0000.0178.76
4.4.40.0000.0238.76
4.4.30.0000.0178.76
4.4.20.0000.0338.76
4.4.10.0030.0378.76
4.4.00.0030.0538.76
4.3.110.0000.0178.76
4.3.100.0000.0378.76
4.3.90.0000.0238.76
4.3.80.0000.0308.76
4.3.70.0070.0208.76
4.3.60.0030.0138.76
4.3.50.0070.0178.76
4.3.40.0000.0538.76
4.3.30.0000.0338.76
4.3.20.0000.0338.76
4.3.10.0030.0238.76
4.3.00.0000.0378.76

preferences:
44.12 ms | 401 KiB | 5 Q