3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stats['page_fans_city'] = [ 'Belo Horizonte, Minas Gerais, Brazil' => 100, 'Lima, Peru' => 100, 'Bangkok, Thailand' => 100, 'Beja, Portugal' => 100, ]; $available_cities = array( 'Lisbon, Lisboa, Portugal', 'Braga, Portugal', 'Porto, Portugal', 'Coimbra, Portugal', 'Faro, Portugal', 'Aveiro, Portugal', 'Oeiras, Portugal' ); $replace_cities = array( 'Lima, Peru', 'Istanbul, Turkey', 'Bangkok, Thailand', 'Hanoi, Ha Noi, Vietnam', 'Dhaka, Bangladesh', 'São Paulo, Brazil', 'Rio de Janeiro, Brazil', 'Belo Horizonte, Minas Gerais, Brazil', 'Recife, Pernambuco, Brazil' ); // HACK FOR CITY NAMES :) foreach ($stats['page_fans_city'] as $city => $value) { if (in_array($city, $replace_cities)) { //unset($replace_cities[$city]); $available_city = array_pop($available_cities); while (array_key_exists($available_city, $stats['page_fans_city'])) { if (count($available_cities) <= 0) { echo 'No more available cities'; break; } $available_city = array_pop($available_cities); $stats['page_fans_city'][$available_city] = $value; echo "\nNova: " . $available_city . "\n"; } unset($stats['page_fans_city'][$city]); echo "\nAntiga: " . $city . "\n"; } }

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.0040.01816.75
8.3.50.0160.00521.98
8.3.40.0060.01219.02
8.3.30.0110.00419.21
8.3.20.0040.00420.29
8.3.10.0060.00321.79
8.3.00.0030.00517.93
8.2.180.0040.01118.55
8.2.170.0150.00022.96
8.2.160.0200.00019.32
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00820.50
8.2.110.0060.00319.38
8.2.100.0060.00617.91
8.2.90.0000.00819.17
8.2.80.0050.00318.02
8.2.70.0000.00817.50
8.2.60.0030.00517.93
8.2.50.0000.00818.07
8.2.40.0080.00018.28
8.2.30.0020.00518.09
8.2.20.0040.00417.75
8.2.10.0000.00818.23
8.2.00.0030.00517.74
8.1.280.0130.00725.92
8.1.270.0000.00923.91
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00322.07
8.1.230.0040.00819.13
8.1.220.0000.00917.79
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0000.00817.63
8.1.180.0080.00018.83
8.1.170.0030.00618.50
8.1.160.0000.00721.93
8.1.150.0040.00418.85
8.1.140.0000.00717.39
8.1.130.0000.00717.84
8.1.120.0000.00717.51
8.1.110.0040.00417.38
8.1.100.0000.00717.30
8.1.90.0040.00417.50
8.1.80.0030.00517.49
8.1.70.0030.00317.47
8.1.60.0040.00417.60
8.1.50.0060.00317.40
8.1.40.0080.00417.56
8.1.30.0040.00417.67
8.1.20.0000.00817.60
8.1.10.0040.00417.63
8.1.00.0000.00717.43
8.0.300.0040.00418.77
8.0.290.0080.00017.15
8.0.280.0080.00018.36
8.0.270.0050.00317.26
8.0.260.0000.00617.28
8.0.250.0030.00316.97
8.0.240.0000.00817.04
8.0.230.0100.00017.02
8.0.220.0030.00316.89
8.0.210.0030.00316.88
8.0.200.0000.00617.02
8.0.190.0030.00317.00
8.0.180.0040.00416.80
8.0.170.0040.00416.95
8.0.160.0000.00717.02
8.0.150.0050.00316.83
8.0.140.0000.00716.76
8.0.130.0000.00613.35
8.0.120.0050.00316.79
8.0.110.0030.00516.82
8.0.100.0000.00716.89
8.0.90.0050.00216.74
8.0.80.0090.00616.87
8.0.70.0000.00716.85
8.0.60.0000.00716.74
8.0.50.0040.00416.94
8.0.30.0160.00817.09
8.0.20.0120.00717.42
8.0.10.0040.00417.03
8.0.00.0090.00916.74
7.4.330.0000.00515.25
7.4.320.0060.00016.47
7.4.300.0070.00016.53
7.4.290.0030.00316.63
7.4.280.0050.00216.60
7.4.270.0000.00716.55
7.4.260.0070.00016.65
7.4.250.0000.00716.45
7.4.240.0040.00416.56
7.4.230.0030.00316.62
7.4.220.0100.01516.46
7.4.210.0100.01016.60
7.4.200.0070.00016.58
7.4.160.0080.00816.52
7.4.150.0090.00917.40
7.4.140.0090.00917.86
7.4.130.0090.00916.50
7.4.120.0090.00716.51
7.4.110.0110.00716.52
7.4.100.0140.00316.61
7.4.90.0080.00916.61
7.4.80.0100.00719.39
7.4.70.0120.00616.64
7.4.60.0070.01016.57
7.4.50.0030.00716.63
7.4.40.0070.01016.44
7.4.30.0100.00716.41
7.4.00.0040.01214.90
7.3.330.0030.00313.08
7.3.320.0070.00013.24
7.3.310.0000.00716.26
7.3.300.0040.00416.32
7.3.290.0030.01316.38
7.3.280.0090.01016.33
7.3.270.0050.01417.40
7.3.260.0080.00816.32
7.3.250.0140.00616.40
7.3.240.0070.01016.32
7.3.230.0160.00616.65
7.3.210.0100.00616.35
7.3.200.0060.01019.39
7.3.190.0000.01816.55
7.3.180.0060.00916.17
7.3.170.0060.01016.30
7.3.160.0070.01416.30
7.3.10.0050.00916.46
7.3.00.0120.00416.69
7.2.330.0090.00616.71
7.2.320.0080.01216.48
7.2.310.0190.00016.68
7.2.300.0120.00616.54
7.2.290.0100.00716.46
7.2.130.0070.00516.93
7.2.120.0050.00716.85
7.2.110.0020.01317.05
7.2.100.0010.00916.84
7.2.90.0130.00816.91
7.2.80.0090.00516.88
7.2.70.0070.00617.00
7.2.60.0070.00516.75
7.2.50.0050.00616.99
7.2.40.0060.00617.06
7.2.30.0070.00517.02
7.2.20.0050.01117.00
7.2.10.0060.00917.00
7.2.00.0040.00717.64
7.1.250.0080.00715.63
7.1.200.0090.00615.93
7.1.100.0030.01118.38
7.1.70.0080.00016.93
7.1.60.0060.01619.29
7.1.50.0130.00916.85
7.1.00.0100.07022.28
7.0.200.0610.00914.82
7.0.140.0030.06322.10
7.0.60.0070.06720.02
7.0.50.0070.07717.92
7.0.40.0000.08720.20
7.0.30.0200.05320.33
7.0.20.0170.08719.96
7.0.10.0170.05020.32
7.0.00.0030.08720.16
5.6.280.0000.07720.79
5.6.210.0030.07320.51
5.6.200.0070.05018.22
5.6.190.0030.08320.33
5.6.180.0270.04720.61
5.6.170.0300.08720.31
5.6.160.0030.04720.49
5.6.150.0100.08018.16
5.6.140.0070.05318.18
5.6.130.0030.04018.16
5.6.120.0100.07321.06
5.6.110.0130.07320.96
5.6.100.0170.05021.03
5.6.90.0100.08020.97
5.6.80.0130.07020.40
5.5.350.0270.07320.30
5.5.340.0000.04017.98
5.5.330.0070.09020.40
5.5.320.0370.07720.13
5.5.310.0230.08020.27
5.5.300.0130.07718.01
5.5.290.0170.07017.90
5.5.280.0100.04720.88
5.5.270.0130.06720.97
5.5.260.0070.08320.77
5.5.250.0030.08320.72
5.5.240.0100.07020.27
5.4.450.0230.06319.14
5.4.440.0570.05719.09
5.4.430.0070.06019.52
5.4.420.0070.06019.45
5.4.410.0170.04719.57
5.4.400.0100.05319.07
5.4.390.0030.05719.05
5.4.380.0270.04718.54
5.4.370.0070.06018.56
5.4.360.0130.05318.56
5.4.350.0270.04313.73
5.4.340.0170.04313.65
5.4.320.0270.04714.19
5.4.310.0330.06714.21
5.4.300.0270.04314.18
5.4.290.0270.05014.21
5.4.280.0170.03314.10
5.4.270.0130.05314.10
5.4.260.0170.04014.11
5.4.250.0100.04714.10
5.4.240.0230.03714.04
5.4.230.0300.04314.01
5.4.220.0300.03714.07
5.4.210.0300.04314.02
5.4.200.0400.04314.21
5.4.190.0700.03714.21
5.4.180.0600.03314.20
5.4.170.0330.04714.10
5.4.160.0400.05014.06
5.4.150.0170.04014.02
5.4.140.0200.03713.79
5.4.130.0130.04013.70
5.4.120.0000.05713.73
5.4.110.0070.05313.71
5.4.100.0130.04313.66
5.4.90.0570.05313.86
5.4.80.0300.05713.73
5.4.70.0230.04713.65
5.4.60.0270.04013.74
5.4.50.0070.05713.63
5.4.40.0070.05313.82
5.4.30.0300.04313.82
5.4.20.1030.04013.63
5.4.10.0100.05013.64
5.4.00.1330.04713.21
5.3.290.0100.05314.63
5.3.280.0200.04714.46
5.3.270.0200.05314.47
5.3.260.0400.06714.49
5.3.250.0700.04314.64
5.3.240.0300.04714.57
5.3.230.1100.05714.63
5.3.220.2870.05014.47
5.3.210.0230.05314.48
5.3.200.0130.05014.46
5.3.190.0200.04314.48
5.3.180.0630.04014.43
5.3.170.0030.05714.49
5.3.160.0070.05314.42
5.3.150.0070.05714.38
5.3.140.0230.04314.45
5.3.130.0300.06314.58
5.3.120.0370.05014.45
5.3.110.0130.05714.58
5.3.100.0130.04714.04
5.3.90.0200.04714.03
5.3.80.0130.05313.87
5.3.70.0100.04713.96
5.3.60.0400.03313.90
5.3.50.0230.04013.84
5.3.40.0200.04713.89
5.3.30.0170.05013.85
5.3.20.0070.05013.72
5.3.10.0130.05013.57
5.3.00.0100.05313.66
5.2.170.0030.04311.12
5.2.160.0030.04011.14
5.2.150.0030.03711.01
5.2.140.0030.04311.04
5.2.130.0030.04311.07
5.2.120.0070.03011.19
5.2.110.0200.04011.01
5.2.100.0070.03711.02
5.2.90.0030.04311.00
5.2.80.0130.04011.17
5.2.70.0170.03711.00
5.2.60.0170.04311.05
5.2.50.0100.04310.94
5.2.40.0230.03310.91
5.2.30.0100.03710.95
5.2.20.0100.03710.96
5.2.10.0470.05710.82
5.2.00.0230.04310.64
5.1.60.0170.0239.96
5.1.50.0070.0409.95
5.1.40.0070.0339.98
5.1.30.0030.03710.29
5.1.20.0100.03710.35
5.1.10.0130.02710.11
5.1.00.0070.03710.18
5.0.50.0030.0308.52
5.0.40.0070.0238.48
5.0.30.0030.0408.18
5.0.20.0070.0238.20
5.0.10.0030.0308.35
5.0.00.0170.0378.20
4.4.90.0130.0305.86
4.4.80.0100.0275.80
4.4.70.0070.0205.84
4.4.60.0030.0205.79
4.4.50.0070.0205.86
4.4.40.0000.0375.84
4.4.30.0130.0175.81
4.4.20.0030.0275.91
4.4.10.0130.0135.92
4.4.00.0000.0375.84
4.3.110.0070.0105.81
4.3.100.0070.0205.73
4.3.90.0100.0175.84
4.3.80.0170.0335.76
4.3.70.0170.0205.84
4.3.60.0100.0135.84
4.3.50.0100.0175.73
4.3.40.0030.0375.74
4.3.30.0070.0204.59
4.3.20.0070.0174.48
4.3.10.0000.0234.41
4.3.00.0100.0236.50

preferences:
50.28 ms | 401 KiB | 5 Q