3v4l.org

run code in 300+ PHP versions simultaneously
<?php $one = Array ( 4 => 'bim', 5 => 'pow', 6 => 'foo' ); $two = Array ( 'n' => Array ( 0 => 1 ), 'm' => Array ( 0 => 1, 1 => 2 ), 'l' => Array ( 0 => 1, 1 => 4, 2 => 64 ) ); $result = []; while((list($oneKey, $oneValue) = each($one)) && (list($twoKey, $twoValue) = each($two))) { $result[$oneValue] = array_map(function($item) use ($twoKey) { return $twoKey.'-'.$item; }, $twoValue); }; var_dump($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.70.0120.00316.63
8.3.60.0140.00718.56
8.3.50.0120.01021.15
8.3.40.0070.00718.79
8.3.30.0070.00720.38
8.3.20.0000.00820.16
8.3.10.0000.00822.05
8.3.00.0040.00422.50
8.2.180.0110.00418.54
8.2.170.0110.00422.96
8.2.160.0110.00422.08
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0040.00420.79
8.2.110.0060.00321.11
8.2.100.0060.00617.91
8.2.90.0080.00020.41
8.2.80.0050.00320.50
8.2.70.0060.00317.63
8.2.60.0000.00917.80
8.2.50.0040.00718.07
8.2.40.0040.00418.03
8.2.30.0080.00018.07
8.2.20.0050.00317.54
8.2.10.0040.00417.81
8.2.00.0030.00617.80
8.1.280.0070.00725.92
8.1.270.0000.00823.99
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00422.04
8.1.230.0080.00420.75
8.1.220.0080.00017.74
8.1.210.0000.00818.91
8.1.200.0090.00017.35
8.1.190.0030.00617.23
8.1.180.0040.00418.10
8.1.170.0030.00518.56
8.1.160.0000.00818.89
8.1.150.0050.00518.59
8.1.140.0040.00417.44
8.1.130.0030.00317.74
8.1.120.0040.00417.30
8.1.110.0070.00017.38
8.1.100.0000.01117.38
8.1.90.0000.00817.39
8.1.80.0000.00717.41
8.1.70.0030.00317.39
8.1.60.0060.00317.51
8.1.50.0030.00517.54
8.1.40.0000.00817.41
8.1.30.0030.00517.61
8.1.20.0040.00417.70
8.1.10.0070.00017.52
8.1.00.0000.00817.43
8.0.300.0000.01120.07
8.0.290.0000.00716.88
8.0.280.0000.00718.36
8.0.270.0000.00717.21
8.0.260.0000.00616.88
8.0.250.0030.00316.97
8.0.240.0000.00817.02
8.0.230.0040.00416.99
8.0.220.0000.00716.77
8.0.210.0040.00416.89
8.0.200.0030.00317.03
8.0.190.0040.00416.86
8.0.180.0000.00716.92
8.0.170.0040.00416.82
8.0.160.0050.00316.91
8.0.150.0040.00416.80
8.0.140.0040.00416.75
8.0.130.0060.00013.44
8.0.120.0000.00716.86
8.0.110.0080.00016.79
8.0.100.0040.00416.72
8.0.90.0000.00816.90
8.0.80.0150.00016.79
8.0.70.0040.00416.78
8.0.60.0050.00316.86
8.0.50.0040.00416.70
8.0.30.0090.01017.06
8.0.20.0100.01417.40
8.0.10.0030.00516.97
8.0.00.0100.00716.62
7.4.330.0000.00515.00
7.4.320.0060.00016.40
7.4.300.0000.00616.62
7.4.290.0030.00316.51
7.4.280.0000.00816.59
7.4.270.0070.00316.60
7.4.260.0030.00313.20
7.4.250.0070.00016.52
7.4.240.0040.00316.52
7.4.230.0030.00316.62
7.4.220.0090.01316.64
7.4.210.0080.00816.55
7.4.200.0000.00716.53
7.4.190.0030.00516.67
7.4.160.0170.00716.58
7.4.150.0130.00717.40
7.4.140.0130.01217.86
7.4.130.0100.00916.68
7.4.120.0090.00816.53
7.4.110.0120.00616.50
7.4.100.0070.01416.63
7.4.90.0090.00816.78
7.4.80.0140.01019.39
7.4.70.0110.01216.48
7.4.60.0110.00716.58
7.4.50.0000.00616.64
7.4.40.0100.00322.77
7.4.30.0090.00916.65
7.4.00.0130.00315.04
7.3.330.0060.00013.29
7.3.320.0020.00213.34
7.3.310.0000.00716.44
7.3.300.0000.00716.25
7.3.290.0140.00716.48
7.3.280.0090.00916.41
7.3.270.0140.00717.40
7.3.260.0090.00916.41
7.3.250.0120.00816.64
7.3.240.0040.01416.66
7.3.230.0150.00316.44
7.3.210.0100.00716.64
7.3.200.0170.00319.39
7.3.190.0100.00716.64
7.3.180.0030.01316.51
7.3.170.0050.01016.70
7.3.160.0150.00316.43
7.3.120.0120.00314.77
7.2.330.0120.00616.59
7.2.320.0040.01316.54
7.2.310.0130.01016.82
7.2.300.0030.01416.63
7.2.290.0070.01116.82
7.2.80.0060.00616.75
7.2.60.0030.01016.82
7.2.00.0070.00719.63
7.1.200.0100.01015.91
7.1.100.0000.01317.80
7.1.70.0000.00717.33
7.1.60.0110.01519.32
7.1.50.0040.02217.02
7.1.00.0070.06722.57
7.0.200.0050.00316.79
7.0.140.0030.07022.05
7.0.60.0070.08019.93
7.0.50.0070.04317.84
7.0.40.0200.06017.75
7.0.30.0130.07717.85
7.0.20.0200.06017.75
7.0.10.0130.07717.78
7.0.00.0070.08317.72
5.6.280.0070.07021.12
5.6.210.0130.08020.77
5.6.200.0070.08718.25
5.6.190.0100.04318.18
5.6.180.0030.08718.29
5.6.170.0070.08318.14
5.6.160.0130.05718.19
5.6.150.0130.04018.16
5.6.140.0030.09018.14
5.6.130.0100.07018.15
5.6.120.0000.05018.18
5.6.110.0070.08318.27
5.6.100.0070.06718.13
5.6.90.0030.08018.13
5.6.80.0130.04317.57
5.6.70.0030.06317.65
5.6.60.0030.07717.67
5.6.50.0030.06717.54
5.6.40.0100.07317.50
5.6.30.0030.08317.48
5.6.20.0170.06717.47
5.6.10.0130.07017.57
5.6.00.0070.08317.59
5.5.350.0230.02720.42
5.5.340.0100.08017.95
5.5.330.0030.04317.99
5.5.320.0070.07018.02
5.5.310.0070.07017.97
5.5.300.0130.07017.95
5.5.290.0170.07317.95
5.5.280.0030.08317.96
5.5.270.0070.08018.01
5.5.260.0100.05717.92
5.5.250.0130.07317.73
5.5.240.0170.06717.33
5.5.230.0030.07017.32
5.5.220.0030.05017.33
5.5.210.0030.04717.33
5.5.200.0070.08017.33
5.5.190.0100.06717.27
5.5.180.0100.07717.30
5.5.160.0070.08017.31
5.5.150.0070.04717.30
5.5.140.0070.08017.33
5.5.130.0070.04017.29
5.5.120.0130.05017.31
5.5.110.0070.06017.32
5.5.100.0070.04717.34
5.5.90.0100.04017.26
5.5.80.0070.07717.20
5.5.70.0030.07017.16
5.5.60.0030.04717.30
5.5.50.0000.04717.24
5.5.40.0030.04017.21
5.5.30.0200.04317.27
5.5.20.0030.08317.30
5.5.10.0000.07717.21
5.5.00.0100.03717.22
5.4.450.0130.08019.39
5.4.440.0070.08019.38
5.4.430.0200.07019.38
5.4.420.0070.08319.21
5.4.410.0000.05019.31
5.4.400.0070.08019.02
5.4.390.0100.06019.02
5.4.380.0130.06719.03
5.4.370.0000.08319.05
5.4.360.0000.04719.00
5.4.350.0000.08319.07
5.4.340.0030.08319.04
5.4.320.0100.06319.03
5.4.310.0070.03719.11
5.4.300.0070.07719.11
5.4.290.0030.08319.01
5.4.280.0070.05319.05
5.4.270.0130.06319.05
5.4.260.0030.04318.98
5.4.250.0100.07019.05
5.4.240.0030.05319.13
5.4.230.0030.07019.05
5.4.220.0000.05019.02
5.4.210.0070.03719.16
5.4.200.0100.07319.04
5.4.190.0000.06019.08
5.4.180.0000.07318.89
5.4.170.0070.08018.97
5.4.160.0200.02719.03
5.4.150.0070.08019.03
5.4.140.0030.06716.58
5.4.130.0100.07316.57
5.4.120.0100.04316.51
5.4.110.0000.06016.38
5.4.100.0070.07716.48
5.4.90.0070.06316.34
5.4.80.0000.03716.39
5.4.70.0070.03316.39
5.4.60.0070.03016.36
5.4.50.0030.03716.43
5.4.40.0030.03316.45
5.4.30.0000.03716.46
5.4.20.0030.03316.39
5.4.10.0030.03316.55
5.4.00.0030.03315.85
5.3.290.0000.07314.50
5.3.280.0070.06014.57
5.3.270.0100.08014.39
5.3.260.0070.08014.58
5.3.250.0030.07714.69
5.3.240.0170.03314.60
5.3.230.0100.07314.46
5.3.220.0100.07314.53
5.3.210.0130.07014.35
5.3.200.0070.06314.49
5.3.190.0030.06714.39
5.3.180.0000.04314.55
5.3.170.0100.03014.39
5.3.160.0100.03014.51
5.3.150.0100.03014.51
5.3.140.0030.03714.34
5.3.130.0030.04014.54
5.3.120.0100.03014.53
5.3.110.0000.04014.52
5.3.100.0000.03713.87
5.3.90.0070.03313.84
5.3.80.0030.03313.95
5.3.70.0030.03313.95
5.3.60.0000.03713.85
5.3.50.0000.03713.73
5.3.40.0000.03713.91
5.3.30.0030.03313.83
5.3.20.0100.03313.66
5.3.10.0030.03313.57
5.3.00.0070.03013.55
5.2.170.0030.02711.14
5.2.160.0000.03011.29
5.2.150.0000.03011.12
5.2.140.0030.02711.13
5.2.130.0000.03011.07
5.2.120.0030.02711.25
5.2.110.0000.03010.90
5.2.100.0030.02711.08
5.2.90.0030.02711.06
5.2.80.0070.02311.06
5.2.70.0000.03010.91
5.2.60.0030.02711.05
5.2.50.0070.02711.02
5.2.40.0030.02710.78
5.2.30.0030.02710.95
5.2.20.0000.03010.85
5.2.10.0000.03010.82
5.2.00.0100.02010.74
5.1.60.0030.0279.94
5.1.50.0030.0209.96
5.1.40.0000.0239.95
5.1.30.0030.02710.23
5.1.20.0000.02710.25
5.1.10.0100.0239.90
5.1.00.0030.02310.00
5.0.50.0000.0208.57
5.0.40.0000.0438.38
5.0.30.0030.0308.20
5.0.20.0100.0378.16
5.0.10.0000.0408.21
5.0.00.0000.0538.22
4.4.90.0000.0237.75
4.4.80.0030.0137.75
4.4.70.0030.0137.75
4.4.60.0000.0177.75
4.4.50.0000.0137.75
4.4.40.0030.0207.75
4.4.30.0000.0177.75
4.4.20.0030.0137.75
4.4.10.0030.0137.75
4.4.00.0030.0577.75
4.3.110.0000.0237.75
4.3.100.0030.0177.75
4.3.90.0000.0337.75
4.3.80.0000.0377.75
4.3.70.0070.0307.75
4.3.60.0030.0337.75
4.3.50.0070.0277.75
4.3.40.0030.0477.75
4.3.30.0000.0407.75
4.3.20.0030.0277.75
4.3.10.0030.0237.75
4.3.00.0030.0337.75

preferences:
38.2 ms | 401 KiB | 5 Q