3v4l.org

run code in 300+ PHP versions simultaneously
<?php $matchesMatches = function ($matches) { //$m = 1; //yield $m; // could put as a `for` so it is more optimized, but for now, that is premature optimization foreach ($matches as $key => $match) { // var_dump($match); // yeild $m; yield $key => $match; } }; $matches = [1,2, 3]; $matches = [1 => array('a', 'b'), 2 => array('c', 'd'), 3 => array('e', 'f')]; foreach ($matchesMatches($matches) as $m) { var_dump($m); }

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.0130.00716.63
8.3.50.0110.00721.95
8.3.40.0060.00918.71
8.3.30.0040.01119.04
8.3.20.0020.00520.25
8.3.10.0050.00321.94
8.3.00.0040.00420.94
8.2.180.0100.01016.88
8.2.170.0110.00322.96
8.2.160.0070.00722.17
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0020.00526.16
8.2.120.0060.00319.77
8.2.110.0050.00522.09
8.2.100.0040.00817.63
8.2.90.0030.00519.13
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0030.00517.78
8.2.50.0030.00618.07
8.2.40.0050.00318.28
8.2.30.0040.00417.98
8.2.20.0030.00517.75
8.2.10.0050.00318.14
8.2.00.0000.00817.85
8.1.280.0030.01025.92
8.1.270.0080.00018.88
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00423.84
8.1.230.0110.00019.22
8.1.220.0040.00417.78
8.1.210.0090.00018.77
8.1.200.0070.00417.48
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0080.00018.67
8.1.160.0040.00422.01
8.1.150.0040.00418.90
8.1.140.0050.00217.37
8.1.130.0070.00017.88
8.1.120.0000.00817.54
8.1.110.0030.00517.50
8.1.100.0040.00417.52
8.1.90.0060.00317.36
8.1.80.0000.00717.45
8.1.70.0030.00317.47
8.1.60.0040.00417.59
8.1.50.0000.00817.55
8.1.40.0000.00817.54
8.1.30.0050.00517.67
8.1.20.0030.00617.63
8.1.10.0000.00717.38
8.1.00.0040.00417.40
8.0.300.0000.00718.77
8.0.290.0020.00516.75
8.0.280.0050.00318.48
8.0.270.0030.00317.16
8.0.260.0030.00318.39
8.0.250.0000.00716.98
8.0.240.0030.00616.81
8.0.230.0000.00816.96
8.0.220.0000.00716.82
8.0.210.0040.00416.89
8.0.200.0030.00316.93
8.0.190.0070.00016.88
8.0.180.0070.00016.79
8.0.170.0060.00316.91
8.0.160.0080.00016.92
8.0.150.0030.00316.85
8.0.140.0000.00816.77
8.0.130.0050.00013.29
8.0.120.0050.00316.77
8.0.110.0030.00516.81
8.0.100.0000.00816.80
8.0.90.0080.00016.77
8.0.80.0030.01216.93
8.0.70.0040.00416.70
8.0.60.0020.00516.77
8.0.50.0040.00416.78
8.0.30.0100.01217.07
8.0.20.0150.00817.40
8.0.10.0040.00417.02
8.0.00.0110.00716.85
7.4.330.0060.00015.03
7.4.320.0030.00316.52
7.4.300.0030.00316.50
7.4.290.0030.00316.64
7.4.280.0080.00416.48
7.4.270.0030.00316.43
7.4.260.0000.00716.58
7.4.250.0000.00716.51
7.4.240.0050.00316.61
7.4.230.0030.00316.61
7.4.220.0130.00716.61
7.4.210.0120.00916.55
7.4.200.0000.00716.35
7.4.160.0090.00616.46
7.4.150.0150.00817.40
7.4.140.0070.01017.86
7.4.130.0120.00616.45
7.4.120.0090.01016.55
7.4.110.0080.00816.47
7.4.100.0100.01116.53
7.4.90.0080.00816.54
7.4.80.0090.01316.46
7.4.70.0060.01216.33
7.4.60.0100.00616.45
7.4.50.0000.00516.57
7.4.40.0090.00916.56
7.4.30.0120.00816.55
7.4.00.0030.01314.64
7.3.330.0020.00213.36
7.3.320.0070.00713.37
7.3.310.0000.00716.31
7.3.300.0070.00016.22
7.3.290.0050.00916.33
7.3.280.0070.01016.35
7.3.270.0150.00917.40
7.3.260.0060.01116.63
7.3.250.0100.00916.52
7.3.240.0140.00316.38
7.3.230.0110.00616.42
7.3.210.0060.00916.47
7.3.200.0070.01419.39
7.3.190.0130.00316.31
7.3.180.0060.01216.46
7.3.170.0080.01116.27
7.3.160.0060.01216.37
7.2.330.0100.00716.82
7.2.320.0030.01416.47
7.2.310.0100.01516.66
7.2.300.0040.01216.73
7.2.290.0100.01316.52
7.2.00.0030.01419.40
7.1.100.0030.00718.09
7.1.70.0030.01317.00
7.1.60.0070.01819.46
7.1.50.0000.02216.70
7.1.00.0130.06722.51
7.0.200.0050.00915.05
7.0.140.0000.08022.01
7.0.60.0030.04319.95
7.0.50.0030.05317.88
7.0.40.0070.04720.04
7.0.30.0230.04720.07
7.0.20.0200.04020.10
7.0.10.0270.08020.18
7.0.00.0100.07720.25
5.6.280.0030.07021.02
5.6.210.0100.08720.54
5.6.200.0070.05318.15
5.6.190.0030.04320.61
5.6.180.3830.04020.50
5.6.170.0230.07720.48
5.6.160.0070.04320.60
5.6.150.0030.04018.20
5.6.140.0070.04018.15
5.6.130.0070.04318.17
5.6.120.0000.05721.00
5.6.110.0030.05721.14
5.6.100.0030.05321.01
5.6.90.0100.08021.10
5.6.80.0070.04020.44
5.6.70.0170.04320.40
5.5.350.0200.06020.43
5.5.340.0030.04018.02
5.5.330.0030.05020.07
5.5.320.0300.06320.25
5.5.310.0270.07720.27
5.5.300.0170.07017.95
5.5.290.0070.08317.94
5.5.280.0100.03720.68
5.5.270.0170.07320.76
5.5.260.0130.06020.85
5.5.250.0130.04720.76
5.5.240.0230.07020.32
5.4.450.0770.05719.15
5.4.440.1070.05319.16
5.4.430.0070.06719.57
5.4.420.0970.04719.47
5.4.410.0870.04319.21
5.4.400.0670.05719.26
5.4.390.0130.07018.77
5.4.380.0200.05018.73
5.4.370.0100.06018.72
5.4.360.0200.04318.75
5.4.350.0170.05018.77
5.4.340.0200.04718.47
5.4.320.0130.05318.53
5.4.310.0100.05718.68
5.4.300.0100.05718.50
5.4.290.0200.04718.78
5.4.280.0230.04318.46
5.4.270.0100.05718.75
5.4.260.0100.05718.72
5.4.250.0170.05018.57
5.4.240.0130.05318.78
5.4.230.0170.04718.48
5.4.220.0170.05718.46
5.4.210.0270.03718.75
5.4.200.0200.04016.63
5.4.190.0200.04718.59
5.4.180.0200.06718.75
5.4.170.0100.08018.59
5.4.160.0130.05018.48
5.4.150.0130.05018.79
5.4.140.0170.04716.29
5.4.130.0270.06016.33
5.4.120.0170.06716.28
5.4.110.0200.05016.28
5.4.100.0200.06716.45
5.4.90.0130.06016.42
5.4.80.0200.06016.28
5.4.70.0170.04716.17
5.4.60.0130.04716.27
5.4.50.0070.05316.18
5.4.40.0200.05716.18
5.4.30.0270.05316.16
5.4.20.0130.05016.24
5.4.10.0130.05316.23
5.4.00.0100.05015.74
5.3.290.0100.05714.78
5.3.280.0130.05014.57
5.3.270.0000.06714.72
5.3.260.0230.04714.72
5.3.250.0130.05714.71
5.3.240.0100.05314.77
5.3.230.0100.06014.58
5.3.220.0100.05714.57
5.3.210.0200.06014.60
5.3.200.0100.05314.64
5.3.190.0130.05314.78
5.3.180.0070.05714.77
5.3.170.0070.05714.61
5.3.160.0130.05314.64
5.3.150.0200.04314.55
5.3.140.0270.03714.74
5.3.130.0230.04314.57
5.3.120.0100.05314.57
5.3.110.0030.06014.57
5.3.100.0230.04014.20
5.3.90.0070.05314.14
5.3.80.0070.05714.04
5.3.70.0070.07014.02
5.3.60.0000.06314.16
5.3.50.0130.04714.05
5.3.40.0100.05014.05
5.3.30.0070.06313.89
5.3.20.0200.05713.66
5.3.10.0130.04713.68
5.3.00.0070.06013.75
5.2.170.0170.05311.15
5.2.160.0170.05311.13
5.2.150.0070.05011.29
5.2.140.0130.04011.17
5.2.130.0130.04011.04
5.2.120.0030.04711.09
5.2.110.0100.04011.03
5.2.100.0030.04711.10
5.2.90.0100.04011.07
5.2.80.0100.04011.09
5.2.70.0170.03311.12
5.2.60.0130.03711.02
5.2.50.0100.04310.93
5.2.40.0100.03710.95
5.2.30.0130.03710.93
5.2.20.0100.04710.95
5.2.10.0100.03710.88
5.2.00.0070.04310.84
5.1.60.0100.03010.06
5.1.50.0130.03010.11
5.1.40.0100.04710.10
5.1.30.0130.04710.45
5.1.20.0000.06010.35
5.1.10.0000.04310.10
5.1.00.0100.03310.05
5.0.50.0100.0238.55
5.0.40.0030.0408.44
5.0.30.0170.0378.20
5.0.20.0070.0278.30
5.0.10.0100.0238.18
5.0.00.0030.0438.25
4.4.90.0070.0205.87
4.4.80.0070.0205.82
4.4.70.0000.0275.86
4.4.60.0070.0205.91
4.4.50.0130.0205.90
4.4.40.0000.0505.81
4.4.30.0070.0205.89
4.4.20.0130.0135.96
4.4.10.0030.0235.89
4.4.00.0030.0405.88
4.3.110.0070.0205.76
4.3.100.0000.0275.79
4.3.90.0030.0235.78
4.3.80.0030.0335.79
4.3.70.0030.0235.82
4.3.60.0000.0235.79
4.3.50.0070.0205.82
4.3.40.0100.0275.89
4.3.30.0070.0205.00
4.3.20.0070.0205.00
4.3.10.0000.0235.00
4.3.00.0170.0206.99

preferences:
49.21 ms | 401 KiB | 5 Q