3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mapchoice0 = true; $mapchoice1 = false; $mapchoice2 = false; $mapchoice3 = false; $mapchoice4 = false; $mapchoice5 = false; $mapchoice6 = false; $mapchoice7 = false; $mapchoice8 = false; $mapchoice9 = false; $mapchoice10 = false; $mapchoice11 = false; $mapchoice12 = false; $mapchoice13 = false; $mapchoice14 = false; $mapchoice15 = false; $mapchoice16 = false; $mapchoice17 = false; $mapchoice18 = false; $mapchoice19 = false; $mapchoice20 = false; $mapchoice21 = false; $mapchoice22 = false; $mapchoice23 = false; $mapchoice23 = false; $mapchoice24 = false; $mapchoice25 = false; $mapchoice26 = false; $mapchoice27 = false; $mapchoice28 = false; $mapchoice29 = false; $mapchoice30 = false; $mapchoice31 = false; $mapchoice32 = false; $mapchoice33 = false; $mapchoice34 = false; $mapchoice35 = false; $mapchoice36 = false; $mapchoice37 = false; $mapchoice38 = false; $mapchoice39 = false; $mapchoice40 = false; $mapchoice41 = false; $gmchoice0 = true; $gmchoice1 = false; $gmchoice2 = false; $gmchoice3 = false; $gmchoice4 = false; $gmchoice5 = false; $gmchoice6 = false; $gmchoice7 = false; $gmchoice8 = false; $gmchoice9 = false; $gmchoice10 = false; /* $mapchoice0 = $_POST['mapchoice0']; print $_POST['mapchoice0']; $mapchoice1 = $_POST['mapchoice1']; $mapchoice2 = $_POST['mapchoice2']; $mapchoice3 = $_POST['mapchoice3']; $mapchoice4 = $_POST['mapchoice4']; $mapchoice5 = $_POST['mapchoice5']; $mapchoice6 = $_POST['mapchoice6']; $mapchoice7 = $_POST['mapchoice7']; $mapchoice8 = $_POST['mapchoice8']; $mapchoice9 = $_POST['mapchoice9']; $mapchoice10 = $_POST['mapchoice10']; $mapchoice11 = $_POST['mapchoice11']; $mapchoice12 = $_POST['mapchoice12']; $mapchoice13 = $_POST['mapchoice13']; $mapchoice14 = $_POST['mapchoice14']; $mapchoice15 = $_POST['mapchoice15']; $mapchoice16 = $_POST['mapchoice16']; $mapchoice17 = $_POST['mapchoice17']; $mapchoice18 = $_POST['mapchoice18']; $mapchoice19 = $_POST['mapchoice19']; $mapchoice20 = $_POST['mapchoice20']; $mapchoice21 = $_POST['mapchoice21']; $mapchoice22 = $_POST['mapchoice22']; $mapchoice23 = $_POST['mapchoice23']; $mapchoice23 = $_POST['mapchoice24']; $mapchoice24 = $_POST['mapchoice25']; $mapchoice25 = $_POST['mapchoice26']; $mapchoice26 = $_POST['mapchoice27']; $mapchoice27 = $_POST['mapchoice28']; $mapchoice28 = $_POST['mapchoice29']; $mapchoice29 = $_POST['mapchoice30']; $mapchoice30 = $_POST['mapchoice31']; $mapchoice31 = $_POST['mapchoice32']; $mapchoice32 = $_POST['mapchoice33']; $mapchoice33 = $_POST['mapchoice34']; $mapchoice34 = $_POST['mapchoice35']; $mapchoice35 = $_POST['mapchoice36']; $mapchoice36 = $_POST['mapchoice37']; $mapchoice37 = $_POST['mapchoice38']; $mapchoice38 = $_POST['mapchoice39']; $mapchoice39 = $_POST['mapchoice40']; $mapchoice40 = $_POST['mapchoice41']; $mapchoice41 = $_POST['mapchoice42']; */ $mapchoice = array( $mapchoice0, $mapchoice1, $mapchoice2, $mapchoice3, $mapchoice4, $mapchoice5, $mapchoice6, $mapchoice7, $mapchoice8, $mapchoice9, $mapchoice10, $mapchoice11, $mapchoice12, $mapchoice13, $mapchoice14, $mapchoice15, $mapchoice16, $mapchoice17, $mapchoice18, $mapchoice19, $mapchoice20, $mapchoice21, $mapchoice22, $mapchoice23, $mapchoice24, $mapchoice25, $mapchoice26, $mapchoice27, $mapchoice28, $mapchoice29, $mapchoice30, $mapchoice31, $mapchoice32, $mapchoice33, $mapchoice34, $mapchoice35, $mapchoice36, $mapchoice37, $mapchoice38, $mapchoice39, $mapchoice40, $mapchoice41, ); /* $gmchoice0 = $_POST['gmchoice0']; $gmchoice1 = $_POST['gmchoice1']; $gmchoice2 = $_POST['gmchoice2']; $gmchoice3 = $_POST['gmchoice3']; $gmchoice4 = $_POST['gmchoice4']; $gmchoice5 = $_POST['gmchoice5']; $gmchoice6 = $_POST['gmchoice6']; $gmchoice7 = $_POST['gmchoice7']; $gmchoice8 = $_POST['gmchoice8']; $gmchoice9 = $_POST['gmchoice9']; $gmchoice10 = $_POST['gmchoice10']; */ $gmchoice = array( $gmchoice0, $gmchoice1, $gmchoice2, $gmchoice3, $gmchoice4, $gmchoice5, $gmchoice6, $gmchoice7, $gmchoice8, $gmchoice9, $gmchoice10); $iterations = 25; $bol_level = array(); $bol_gm = array(); $final = ""; class gamelevel{ private $name; private $fname; public function __construct($fn, $string_name){ $this->fname = $fn; $this->name = $string_name; } public function getfname(){return $this->fname;} } $level = array( new gamelevel("mp_afghan", "Afghan"), new gamelevel("mp_derail", "Derail"), new gamelevel("mp_estate","Estate"), new gamelevel("mp_favela", "Favela"), new gamelevel("mp_highrise", "Highrise"), new gamelevel("mp_invation", "Invation"), new gamelevel("mp_checkpoint", "Karachi"), new gamelevel("mp_quarry", "Quarry"), new gamelevel("mp_rundown", "Rundown"), new gamelevel("mp_rust","Rust"), new gamelevel("mp_scrapyard","Scrapyard"), new gamelevel("mp_nightshift", "Skidrow"), new gamelevel("mp_subbase", "Sub Base"), new gamelevel("mp_terminal","Terminal"), new gamelevel("mp_underpass", "Underpass"), new gamelevel("mp_brecourt", "Wasteland"), new gamelevel("mp_complex", "Bailout"), new gamelevel("mp_crash", "Crash"), new gamelevel("mp_compact", "Salvage"), new gamelevel("mp_overgrown", "Overgrown"), new gamelevel("mp_storm", "Storm"), new gamelevel("mp_abandon", "Carnival"), new gamelevel("fuel2", "Fuel"), new gamelevel("mp_strike", "Strike"), new gamelevel("mp_trailerpark", "Trailer Park"), new gamelevel("mp_vacant", "Vacant"), new gamelevel("mp_bloc", "Bloc"), new gamelevel("mp_block_sh", "Abandoned City"), new gamelevel("mp_cargoship", "Wet Work"), new gamelevel("mp_cargoship_sh", "Freighter"), new gamelevel("mp_crash_tropical", "Crash Tropical"), new gamelevel("mp_cross_fire", "Crossfire"), new gamelevel("mp_fav_tropical", "Favela Tropical"), new gamelevel("mp_estate_tropical", "Estate Tropical"), new gamelevel("mp_firingrange", "Firing Range"), new gamelevel("mp_killhouse", "Killhouse"), new gamelevel("mp_nuked", "Nuketown"), new gamelevel("mp_rust_long", "Rust Long"), new gamelevel("mp_shipment", "Shipment"), new gamelevel("mp_shipment_long", "Shipment Long"), new gamelevel("mp_storm_spring", "Chemical Plant"), new gamelevel("oilrig", "Oil Rig") ); $gametype = array( new gamelevel("war","Team Deathmatch"), new gamelevel("ffa","Free-For-All"), new gamelevel("dom","Domination"), new gamelevel("koth", "Headquarters"), new gamelevel("sab", "Sabotage"), new gamelevel("sd","Search & Destroy"), new gamelevel("arena", "Arena"), new gamelevel("dd", "Demolition"), new gamelevel("ctf", "Capture The Flag"), new gamelevel("oneflag", "One Flag CTF"), new gamelevel("gtnw", "Global Thermo-Nuclear War")); class mode{ public $level; public $gametype; function __construct($l,$g){ $this->level=$l; $this->gametype=$g; } public function getString(){ return "g_gametype ".$this->gametype->getfname()." map ".$this->level->getfname(); } } $finalModeList = array(); function buildOptionLists(){ global $level; global $gametype; global $bol_level; global $bol_gm; global $mapchoice; global $gmchoice; $bollevel = array(); $bolgm = array(); for ($x = 0; $x < count($mapchoice); $x++){ if ($mapchoice[$x] == true) array_push($bollevel,$level[$x]); } for ($x = 0; $x < count($gmchoice); $x++){ if ($gmchoice[$x] == true) array_push($bolgm,$gametype[$x]); } /* if ($mapchoice0 == true) array_push($bollevel,$level[0]); if ($mapchoice1 == true) array_push($bollevel,$level[1]); if ($mapchoice2 == true) array_push($bollevel,$level[2]); if ($mapchoice3 == true) array_push($bollevel,$level[3]); if ($mapchoice4 == true) array_push($bollevel,$level[4]); if ($mapchoice5 == true) array_push($bollevel,$level[5]); if ($mapchoice6 == true) array_push($bollevel,$level[6]); if ($mapchoice7 == true) array_push($bollevel,$level[7]); if ($mapchoice8 == true) array_push($bollevel,$level[8]); if ($mapchoice9 == true) array_push($bollevel,$level[9]); if ($mapchoice10 == true) array_push($bollevel,$level[10]); if ($mapchoice11 == true) array_push($bollevel,$level[11]); if ($mapchoice12 == true) array_push($bollevel,$level[12]); if ($mapchoice13 == true) array_push($bollevel,$level[13]); if ($mapchoice14 == true) array_push($bollevel,$level[14]); if ($mapchoice15 == true) array_push($bollevel,$level[15] if ($mapchoice16 == true) array_push($bollevel,$level[16]); if ($mapchoice17 == true) array_push($bollevel,$level[17]); if ($mapchoice18 == true) array_push($bollevel,$level[18]); if ($mapchoice19 == true) array_push($bollevel,$level[19]); if ($mapchoice20 == true) array_push($bollevel,$level[20]); if ($mapchoice21 == true) array_push($bollevel,$level[21]); if ($mapchoice22 == true) array_push($bollevel,$level[22]); if ($mapchoice23 == true) array_push($bollevel,$level[23]); if ($mapchoice24 == true) array_push($bollevel,$level[24]); if ($mapchoice25 == true) array_push($bollevel,$level[25]); if ($mapchoice26 == true) array_push($bollevel,$level[26]); if ($mapchoice27 == true) array_push($bollevel,$level[27]); if ($mapchoice28 == true) array_push($bollevel,$level[28]); if ($mapchoice29 == true) array_push($bollevel,$level[29]); if ($mapchoice30 == true) array_push($bollevel,$level[30]); if ($mapchoice31 == true) array_push($bollevel,$level[31]); if ($mapchoice32 == true) array_push($bollevel,$level[32]); if ($mapchoice33 == true) array_push($bollevel,$level[33]); if ($mapchoice34 == true) array_push($bollevel,$level[34]); if ($mapchoice35 == true) array_push($bollevel,$level[35]); if ($mapchoice36 == true) array_push($bollevel,$level[36]); if ($mapchoice37 == true) array_push($bollevel,$level[37]); if ($mapchoice38 == true) array_push($bollevel,$level[38]); if ($mapchoice39 == true) array_push($bollevel,$level[39]); if ($mapchoice40 == true) array_push($bollevel,$level[40]); if ($mapchoice41 == true) array_push($bollevel,$level[41]); if ($gmchoice0 == true) array_push($bolgm,$gametype[0]); if ($gmchoice1 == true) array_push($bolgm,$gametype[1]); if ($gmchoice2 == true) array_push($bolgm,$gametype[2]); if ($gmchoice == true) array_push($bolgm,$gametype[]); */ for ($x = 0; $x < count($bolgm); $x++){ $bol_gm[$x] = $bolgm[$x]; } for ($x = 0; $x < count($bollevel); $x++){ $bol_level[$x] = $bollevel[$x]; } } function buildList(){ global $iterations; global $finalModeList; global $bol_level; global $bol_gm; for ($x = 0; $x < $iterations; $x++) array_push($finalModeList,new mode($bol_level[mt_rand(0,(count($bol_level)-1))],$bol_gm[mt_rand(0,(count($bol_gm)-1))])); } function buildString(){ global $final; global $finalModeList; for ($x = 0; $x < count($finalModeList); $x++) $final = $final.$finalModeList[$x]->getString()." "; } buildOptionLists(); buildList(); buildString(); echo $final; ?>

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.0060.00918.43
8.3.50.0120.00318.18
8.3.40.0000.01818.91
8.3.30.0070.00719.02
8.3.20.0050.00321.88
8.3.10.0070.00023.65
8.3.00.0050.00319.78
8.2.180.0000.01516.38
8.2.170.0150.00022.96
8.2.160.0060.00920.39
8.2.150.0150.00324.18
8.2.140.0050.00324.66
8.2.130.0080.00019.50
8.2.120.0040.00426.35
8.2.110.0070.00320.99
8.2.100.0060.00619.64
8.2.90.0050.00317.77
8.2.80.0030.00518.05
8.2.70.0060.00318.05
8.2.60.0000.00818.34
8.2.50.0080.00018.10
8.2.40.0040.00419.47
8.2.30.0000.00819.37
8.2.20.0000.00718.38
8.2.10.0080.00018.41
8.2.00.0000.00718.40
8.1.280.0140.00725.92
8.1.270.0040.00423.91
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0060.00323.91
8.1.230.0080.00422.63
8.1.220.0050.00317.88
8.1.210.0040.00419.16
8.1.200.0030.00717.48
8.1.190.0060.00317.48
8.1.180.0060.00318.10
8.1.170.0040.00418.71
8.1.160.0060.00319.11
8.1.150.0050.00219.13
8.1.140.0000.00717.87
8.1.130.0030.00319.06
8.1.120.0040.00417.68
8.1.110.0080.00317.61
8.1.100.0000.00817.52
8.1.90.0030.00617.69
8.1.80.0080.00017.60
8.1.70.0030.00617.65
8.1.60.0030.00717.69
8.1.50.0000.00817.71
8.1.40.0000.00817.55
8.1.30.0000.00817.82
8.1.20.0110.00017.70
8.1.10.0060.00317.67
8.1.00.0030.00617.54
8.0.300.0020.00520.04
8.0.290.0060.00317.00
8.0.280.0000.00818.68
8.0.270.0040.00417.43
8.0.260.0040.00417.44
8.0.250.0020.00517.10
8.0.240.0000.00717.12
8.0.230.0000.00916.98
8.0.220.0080.00016.94
8.0.210.0030.00317.09
8.0.200.0000.00717.04
8.0.190.0030.00617.14
8.0.180.0040.00417.04
8.0.170.0060.00317.01
8.0.160.0040.00417.07
8.0.150.0050.00216.89
8.0.140.0090.00017.05
8.0.130.0030.00313.49
8.0.120.0000.00716.91
8.0.110.0020.00516.91
8.0.100.0000.00816.89
8.0.90.0080.00017.02
8.0.80.0160.00017.05
8.0.70.0000.00816.92
8.0.60.0000.00817.14
8.0.50.0020.00516.89
8.0.30.0090.01217.30
8.0.20.0100.01017.40
8.0.10.0080.00017.22
8.0.00.0120.00616.79
7.4.330.0000.00515.55
7.4.320.0090.00016.76
7.4.300.0070.00016.63
7.4.290.0030.00316.79
7.4.280.0030.00616.77
7.4.270.0110.00016.76
7.4.260.0030.00516.73
7.4.250.0070.00016.64
7.4.240.0050.00316.83
7.4.230.0080.00016.73
7.4.220.0000.00816.89
7.4.210.0050.01116.75
7.4.200.0000.00716.63
7.4.160.0060.01116.73
7.4.140.0130.00817.86
7.4.130.0090.00916.68
7.4.120.0130.01016.72
7.4.110.0090.00916.59
7.4.100.0100.00716.72
7.4.90.0190.00616.66
7.4.80.0080.01119.39
7.4.70.0100.00716.70
7.4.60.0070.01016.56
7.4.50.0060.00916.71
7.4.40.0120.00616.66
7.4.00.0060.01014.88
7.3.330.0030.00313.45
7.3.320.0030.00313.50
7.3.310.0040.00416.53
7.3.300.0080.00016.48
7.3.290.0000.00716.47
7.3.280.0090.00616.47
7.3.260.0070.01316.58
7.3.240.0100.00716.71
7.3.230.0130.00416.42
7.3.210.0160.00616.52
7.3.200.0110.00616.56
7.3.190.0090.00916.64
7.3.180.0110.00516.87
7.3.170.0030.01516.65
7.3.160.0070.01016.45
7.2.330.0110.00716.97
7.2.320.0060.01217.03
7.2.310.0140.00716.91
7.2.300.0100.00716.87
7.2.290.0100.01016.99
7.2.60.0240.00316.88
7.2.50.0040.00417.00
7.2.40.4400.01318.28
7.2.30.3380.01218.24
7.2.20.2050.01617.93
7.2.10.2600.01418.15
7.2.00.2970.01217.57
7.1.200.0050.00315.96
7.1.160.3190.01116.79
7.1.150.2980.01417.00
7.1.140.2350.01516.90
7.1.130.3380.01317.05
7.1.120.3430.01416.98
7.1.110.2950.01516.27
7.1.100.2820.01116.00
7.1.90.5810.01316.47
7.1.80.6760.01616.36
7.1.70.4480.01015.27
7.1.60.6310.01933.38
7.1.50.7040.01932.91
7.1.40.6850.02432.75
7.1.30.8180.01832.98
7.1.20.7830.01732.84
7.1.10.7390.01414.83
7.1.00.4310.01715.07

preferences:
62.55 ms | 400 KiB | 5 Q