3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 'Newcastle Upon Tyne, Tyne and Wear, England' => 18, 'Gateshead, Tyne and Wear, England' => 17, 'Sunderland, Tyne and Wear, England' => 3, ]; $result = []; /*foreach($data as $key=>$value){ $result[explode(',',$key)[0]] = $value; }*/ array_walk($data, function (&$value,$key) use (&$result) { $splitted = explode(",",$key); $result[ $splitted[0] ] = $value; }); print_r($result);

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.00718.31
8.3.50.0140.00416.11
8.3.40.0120.00618.66
8.3.30.0090.00618.79
8.3.20.0040.00419.13
8.3.10.0040.00421.73
8.3.00.0040.00420.62
8.2.180.0170.00016.63
8.2.170.0140.00718.95
8.2.160.0170.00022.96
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00318.03
8.2.120.0090.00026.35
8.2.110.0100.00022.25
8.2.100.0040.00717.84
8.2.90.0080.00022.15
8.2.80.0080.00017.97
8.2.70.0030.00618.05
8.2.60.0070.00018.28
8.2.50.0040.00418.10
8.2.40.0000.00719.48
8.2.30.0040.00419.41
8.2.20.0040.00417.94
8.2.10.0040.00418.04
8.2.00.0040.00418.02
8.1.280.0070.01425.92
8.1.270.0000.00822.19
8.1.260.0090.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00622.51
8.1.230.0090.00320.83
8.1.220.0050.00317.79
8.1.210.0030.00618.95
8.1.200.0080.00017.35
8.1.190.0080.00017.22
8.1.180.0080.00018.10
8.1.170.0080.00018.71
8.1.160.0030.00518.95
8.1.150.0070.00018.96
8.1.140.0070.00022.17
8.1.130.0000.00717.46
8.1.120.0080.00017.36
8.1.110.0000.00917.50
8.1.100.0000.00817.50
8.1.90.0040.00417.49
8.1.80.0040.00417.49
8.1.70.0000.00717.42
8.1.60.0040.00417.64
8.1.50.0060.00317.52
8.1.40.0020.00517.43
8.1.30.0000.00717.57
8.1.20.0040.00717.67
8.1.10.0030.00517.51
8.1.00.0060.00317.48
8.0.300.0060.00320.03
8.0.290.0060.00316.75
8.0.280.0080.00018.36
8.0.270.0030.00317.25
8.0.260.0030.00516.82
8.0.250.0040.00416.97
8.0.240.0030.00316.96
8.0.230.0000.00716.99
8.0.220.0030.00316.95
8.0.210.0000.00716.86
8.0.200.0040.00516.98
8.0.190.0000.00716.82
8.0.180.0040.00416.96
8.0.170.0080.00016.79
8.0.160.0040.00416.86
8.0.150.0040.00416.80
8.0.140.0040.00416.86
8.0.130.0000.00613.28
8.0.120.0040.00416.86
8.0.110.0000.00816.85
8.0.100.0040.00416.86
8.0.90.0000.00716.93
8.0.80.0130.00316.80
8.0.70.0070.00016.79
8.0.60.0000.00716.96
8.0.50.0040.00416.88
8.0.30.0130.00517.22
8.0.20.0130.00717.40
8.0.10.0050.00217.13
8.0.00.0060.01216.78
7.4.330.0000.00515.55
7.4.320.0030.00316.52
7.4.300.0060.00016.39
7.4.290.0060.00316.57
7.4.280.0000.00716.58
7.4.270.0040.00416.61
7.4.260.0040.00416.51
7.4.250.0030.00316.48
7.4.240.0030.00316.51
7.4.230.0040.00416.41
7.4.220.0070.00016.67
7.4.210.0080.00616.56
7.4.200.0040.00416.30
7.4.160.0070.01116.63
7.4.140.0110.00717.86
7.4.130.0140.00316.54
7.4.120.0110.00616.50
7.4.110.0130.00616.38
7.4.100.0060.01216.60
7.4.90.0200.00316.59
7.4.80.0130.01019.39
7.4.70.0140.00616.59
7.4.60.0130.00716.48
7.4.50.0040.01416.32
7.4.40.0160.00016.35
7.4.10.0110.00714.86
7.4.00.0070.00914.95
7.3.330.0020.00213.38
7.3.320.0060.00013.23
7.3.310.0030.00616.18
7.3.300.0030.00316.36
7.3.290.0000.00716.35
7.3.280.0070.00816.37
7.3.260.0110.00816.35
7.3.240.0100.00716.55
7.3.230.0070.01016.33
7.3.210.0080.01416.41
7.3.200.0140.00316.45
7.3.190.0120.00916.34
7.3.180.0030.01416.38
7.3.170.0120.00616.72
7.3.160.0100.01016.53
7.3.130.0000.01914.91
7.3.120.0070.01014.71
7.3.110.0100.00614.71
7.3.100.0000.01114.90
7.3.90.0090.00914.90
7.3.80.0060.00614.55
7.3.70.0000.01114.75
7.3.60.0080.00814.68
7.3.50.0060.00914.95
7.3.40.0060.00314.84
7.3.30.0120.00014.71
7.3.20.0090.00616.79
7.3.10.0030.00916.83
7.3.00.0050.01016.67
7.2.330.0070.01116.56
7.2.320.0130.01016.41
7.2.310.0070.01016.85
7.2.300.0060.01216.56
7.2.290.0030.01316.69
7.2.260.0090.00914.68
7.2.250.0110.00615.00
7.2.240.0100.00715.07
7.2.230.0100.00715.17
7.2.220.0030.01415.18
7.2.210.0070.00714.78
7.2.200.0070.01114.92
7.2.190.0000.01014.98
7.2.180.0030.00915.01
7.2.170.0030.01315.03
7.2.160.0000.01515.12
7.2.150.0080.00317.00
7.2.140.0040.01017.00
7.2.130.0030.01016.87
7.2.120.0070.00716.95
7.2.110.0150.00516.22
7.2.100.0100.00616.17
7.2.90.0130.00716.24
7.2.80.0140.00816.05
7.2.70.0150.00516.37
7.2.60.0100.01016.32
7.2.50.0080.00716.20
7.2.40.0140.00316.33
7.2.30.0100.00516.30
7.2.20.0150.00616.21
7.2.10.0120.00516.23
7.2.00.0040.00916.23
7.1.330.0070.00715.62
7.1.320.0110.00415.95
7.1.310.0080.00616.15
7.1.300.0030.00915.67
7.1.290.0090.00315.84
7.1.280.0040.00415.80
7.1.270.0030.01015.85
7.1.260.0050.00515.77
7.1.250.0050.01115.81
7.1.240.0060.00915.62
7.1.230.0150.00614.84
7.1.220.0140.01014.73
7.1.210.0100.01214.76
7.1.200.0150.00814.76
7.1.190.0100.00914.93
7.1.180.0090.00714.88
7.1.170.0120.00914.65
7.1.160.0120.00414.79
7.1.150.0100.00514.88
7.1.140.0090.01014.92
7.1.130.0100.01014.91
7.1.120.0150.00114.87
7.1.110.0120.00514.78
7.1.100.0070.00714.73
7.1.90.0140.00314.83
7.1.80.0120.00614.96
7.1.70.0100.01214.91
7.1.60.0200.00714.76
7.1.50.0070.01114.80
7.1.40.0140.00314.83
7.1.30.0100.00514.88
7.1.20.0180.00314.85
7.1.10.0060.01114.93
7.1.00.0050.01214.87
7.0.330.0060.01215.28
7.0.320.0060.00615.64
7.0.310.0030.00715.13
7.0.300.0070.00715.38
7.0.290.0140.00015.13
7.0.280.0040.00415.53
7.0.270.0030.00915.35
7.0.260.0040.00715.47
7.0.250.0060.00915.46
7.0.240.0000.01015.55
7.0.230.0070.00315.50
7.0.220.0050.00815.25
7.0.210.0040.01115.41
7.0.200.0060.00615.42
7.0.190.0030.00915.17
7.0.180.0030.01015.28
7.0.170.0080.00315.39
7.0.160.0060.00915.22
7.0.150.0060.00915.44
7.0.140.0000.00915.30
7.0.130.0000.01015.25
7.0.120.0000.00815.43
7.0.110.0040.00815.57
7.0.100.0100.00315.53
7.0.90.0000.01315.65
7.0.80.0070.00715.35
7.0.70.0040.01115.43
7.0.60.0070.01015.25
7.0.50.0030.01015.58
7.0.40.0070.00413.31
7.0.30.0000.00813.60
7.0.20.0070.00713.30
7.0.10.0040.00713.66
7.0.00.0060.00613.53
5.6.400.0040.00713.99
5.6.390.0060.00914.64
5.6.380.0060.01014.33
5.6.370.0060.00314.39
5.6.360.0040.01214.52
5.6.350.0030.00614.48
5.6.340.0140.00314.11
5.6.330.0000.01114.66
5.6.320.0040.01114.61
5.6.310.0000.00814.28
5.6.300.0060.00614.38
5.6.290.0030.00714.28
5.6.280.0090.00613.97
5.6.270.0080.00614.60
5.6.260.0060.00914.32
5.6.250.0030.00614.48
5.6.240.0030.01014.50
5.6.230.0090.00314.40
5.6.220.0000.01514.35
5.6.210.0040.01114.30
5.6.200.0080.00314.51
5.6.190.0030.01014.44
5.6.180.0110.00414.40
5.6.170.0000.00814.31
5.6.160.0050.00514.54
5.6.150.0080.00614.39
5.6.140.0040.00414.24
5.6.130.0070.01014.34
5.6.120.0030.00614.65
5.6.110.0030.00614.47
5.6.100.0030.01014.32
5.6.90.0070.00714.25
5.6.80.0080.00814.40
5.6.70.0080.00014.02
5.6.60.0130.00314.16
5.6.50.0080.00314.63
5.6.40.0030.01014.61
5.6.30.0090.00414.45
5.6.20.0030.00614.41
5.6.10.0150.00014.37
5.6.00.0040.01114.21

preferences:
60.51 ms | 400 KiB | 5 Q