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 $match) { var_dump($match); // yeild $m; for ($i = 1; $i <= 3; $i++) { // Note that $i is preserved between yields. yield $i; } } }; $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.0040.01416.50
8.3.50.0110.00718.04
8.3.40.0100.00318.79
8.3.30.0070.01719.08
8.3.20.0070.00020.16
8.3.10.0040.00421.73
8.3.00.0080.00020.95
8.2.180.0070.01316.38
8.2.170.0030.01722.96
8.2.160.0090.00622.08
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0080.00019.54
8.2.110.0040.00422.27
8.2.100.0090.00317.75
8.2.90.0040.00419.14
8.2.80.0080.00017.97
8.2.70.0000.00817.50
8.2.60.0000.00817.93
8.2.50.0030.00518.07
8.2.40.0060.00318.22
8.2.30.0070.00018.00
8.2.20.0040.00417.69
8.2.10.0000.00818.08
8.2.00.0070.00017.75
8.1.280.0140.00725.92
8.1.270.0070.00320.60
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00823.82
8.1.230.0110.00019.06
8.1.220.0000.00717.76
8.1.210.0090.00018.77
8.1.200.0070.00317.22
8.1.190.0000.00817.38
8.1.180.0040.00418.10
8.1.170.0040.00418.40
8.1.160.0040.00421.97
8.1.150.0030.00518.90
8.1.140.0050.00217.46
8.1.130.0030.00317.74
8.1.120.0000.00817.30
8.1.110.0050.00317.38
8.1.100.0050.00217.46
8.1.90.0060.00317.50
8.1.80.0040.00417.43
8.1.70.0030.00517.34
8.1.60.0000.00817.58
8.1.50.0060.00317.52
8.1.40.0040.00417.53
8.1.30.0030.00617.66
8.1.20.0050.00217.54
8.1.10.0030.00517.49
8.1.00.0030.00517.37
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0050.00218.42
8.0.270.0070.00017.25
8.0.260.0000.00617.25
8.0.250.0000.00716.88
8.0.240.0090.00016.82
8.0.230.0000.00716.84
8.0.220.0030.00316.79
8.0.210.0040.00416.91
8.0.200.0030.00316.93
8.0.190.0000.00716.94
8.0.180.0000.00716.80
8.0.170.0090.00016.95
8.0.160.0040.00416.86
8.0.150.0030.00316.73
8.0.140.0030.00516.80
8.0.130.0060.00013.29
8.0.120.0040.00416.84
8.0.110.0000.00716.71
8.0.100.0080.00016.75
8.0.90.0040.00416.87
8.0.80.0000.01716.84
8.0.70.0000.00716.82
8.0.60.0000.00716.95
8.0.50.0040.00416.91
8.0.30.0070.01116.87
8.0.20.0090.01217.40
8.0.10.0000.00817.02
8.0.00.0080.01116.70
7.4.330.0040.00415.03
7.4.320.0000.00716.50
7.4.300.0000.00616.51
7.4.290.0030.00316.48
7.4.280.0070.00316.51
7.4.270.0000.00716.61
7.4.260.0070.00016.55
7.4.250.0040.00416.46
7.4.240.0020.00516.47
7.4.230.0030.00316.54
7.4.220.0110.00816.61
7.4.210.0060.00916.46
7.4.200.0040.00416.70
7.4.160.0100.00616.61
7.4.150.0120.00617.40
7.4.140.0070.01017.86
7.4.130.0100.00716.37
7.4.120.0030.01416.50
7.4.110.0080.01516.54
7.4.100.0110.01116.55
7.4.90.0030.01516.40
7.4.80.0060.01016.50
7.4.70.0210.00316.45
7.4.60.0070.01316.41
7.4.50.0040.00416.49
7.4.40.0070.01016.49
7.4.30.0050.01116.30
7.4.10.0040.01415.00
7.4.00.0070.01214.93
7.3.330.0050.00013.23
7.3.320.0130.00313.18
7.3.310.0080.00016.20
7.3.300.0030.00316.35
7.3.290.0090.00816.31
7.3.280.0060.01116.35
7.3.270.0140.00417.40
7.3.260.0090.00916.43
7.3.250.0100.00816.40
7.3.240.0110.00616.63
7.3.230.0160.00816.42
7.3.210.0080.00816.37
7.3.200.0140.00919.39
7.3.190.0080.00816.52
7.3.180.0080.00816.38
7.3.170.0140.00516.64
7.3.160.0120.00916.59
7.3.130.0120.00614.95
7.3.120.0110.00814.77
7.3.110.0050.01214.70
7.3.100.0070.00715.02
7.3.90.0030.01214.89
7.3.80.0060.00614.87
7.3.70.0060.00414.87
7.3.60.0120.00114.93
7.3.50.0090.00614.73
7.3.40.0020.01214.84
7.3.30.0100.00214.82
7.3.20.0030.00716.59
7.3.10.0050.00916.72
7.3.00.0090.00416.43
7.2.330.0080.00816.68
7.2.320.0070.01116.80
7.2.310.0100.01416.80
7.2.300.0090.00916.73
7.2.290.0060.01316.51
7.2.260.0110.00015.29
7.2.250.0060.00914.96
7.2.240.0080.00815.15
7.2.230.0020.01415.05
7.2.220.0050.00914.74
7.2.210.0000.01114.68
7.2.200.0040.00814.93
7.2.190.0100.00514.96
7.2.180.0060.00814.92
7.2.170.0060.00615.07
7.2.160.0000.01414.80
7.2.150.0130.00316.88
7.2.140.0100.00317.09
7.2.130.0000.01216.97
7.2.120.0030.00916.92
7.2.110.0070.00716.91
7.2.100.0060.00916.63
7.2.90.0080.00616.93
7.2.80.0000.01016.89
7.2.70.0110.00416.79
7.2.60.0060.01216.70
7.2.50.0040.00716.87
7.2.40.0070.01016.96
7.2.30.0090.00616.88
7.2.20.0090.00917.07
7.2.10.0030.01316.65
7.2.00.0030.00818.12
7.1.330.0090.00515.71
7.1.320.0040.00815.81
7.1.310.0040.00715.88
7.1.300.0010.01315.72
7.1.290.0050.00815.84
7.1.280.0040.00615.77
7.1.270.0070.00715.53
7.1.260.0030.00615.69
7.1.250.0070.00716.02
7.1.240.0030.00915.79
7.1.230.0000.01215.67
7.1.220.0110.00315.88
7.1.210.0030.01015.79
7.1.200.0030.01215.89
7.1.190.0060.00615.79
7.1.180.0040.01115.90
7.1.170.0030.01015.80
7.1.160.0100.00315.91
7.1.150.0070.00315.82
7.1.140.0090.00415.54
7.1.130.0100.00615.86
7.1.120.0040.00815.61
7.1.110.0090.00615.80
7.1.100.0080.00517.05
7.1.90.0030.01315.92
7.1.80.0060.00615.96
7.1.70.0040.00716.55
7.1.60.0080.01017.63
7.1.50.0110.00716.38
7.1.40.0030.00915.54
7.1.30.0030.01215.91
7.1.20.0070.00415.53
7.1.10.0000.01415.78
7.1.00.0080.03518.99
7.0.330.0040.00415.45
7.0.320.0100.00315.64
7.0.310.0030.01215.41
7.0.300.0080.00815.55
7.0.290.0030.01015.45
7.0.280.0040.00715.63
7.0.270.0090.00015.64
7.0.260.0060.00915.53
7.0.250.0070.01015.44
7.0.240.0000.01115.55
7.0.230.0090.00315.57
7.0.220.0030.01115.23
7.0.210.0090.00015.46
7.0.200.0090.00515.23
7.0.190.0060.00915.33
7.0.180.0040.01115.52
7.0.170.0030.01215.30
7.0.160.0060.00315.52
7.0.150.0030.00915.55
7.0.140.0050.03918.72
7.0.130.0000.00815.41
7.0.120.0040.00715.35
7.0.110.0030.00615.28
7.0.100.0040.00815.54
7.0.90.0100.00315.43
7.0.80.0000.01215.27
7.0.70.0030.01015.48
7.0.60.0080.03317.62
7.0.50.0100.04016.72
7.0.40.0050.04516.87
7.0.30.0260.02016.89
7.0.20.0170.04216.99
7.0.10.0090.03716.87
7.0.00.0060.04416.84
5.6.400.0070.00714.41
5.6.390.0090.00614.56
5.6.380.0090.00314.25
5.6.370.0030.00614.18
5.6.360.0040.01114.18
5.6.350.0100.00314.64
5.6.340.0110.00314.22
5.6.330.0070.00714.36
5.6.320.0060.00914.29
5.6.310.0130.00314.71
5.6.300.0060.00314.46
5.6.290.0030.01214.32
5.6.280.0100.03317.66
5.6.270.0030.01314.52
5.6.260.0030.01014.55
5.6.250.0080.00814.34
5.6.240.0030.00714.40
5.6.230.0040.00714.46
5.6.220.0100.00314.39
5.6.210.0020.02517.41
5.6.200.0080.02616.38
5.6.190.0030.04717.30
5.6.180.2080.02817.34
5.6.170.0160.04617.49
5.6.160.0080.03717.43
5.6.150.0080.03316.17
5.6.140.0110.03016.31
5.6.130.0010.02616.22
5.6.120.0080.04617.71
5.6.110.0070.04617.70
5.6.100.0070.03917.53
5.6.90.0110.03217.61
5.6.80.0030.03517.37
5.6.70.1810.01817.53
5.6.60.0040.00414.29
5.6.50.0030.00614.17
5.6.40.0070.01114.16
5.6.30.0070.00714.45
5.6.20.0000.01314.38
5.6.10.0040.01214.34
5.6.00.0120.00014.09
5.5.380.0040.01114.09
5.5.370.0040.01114.48
5.5.360.0030.00614.33
5.5.350.0080.04417.22
5.5.340.0100.04316.11
5.5.330.0070.04517.14
5.5.320.1600.02317.28
5.5.310.0150.04517.30
5.5.300.0060.03816.02
5.5.290.0040.04416.11
5.5.280.0100.04217.71
5.5.270.0100.03717.59
5.5.260.0030.02517.40
5.5.250.0070.03217.36
5.5.240.0190.03617.09
5.5.230.0000.01014.07
5.5.220.0030.00613.91
5.5.210.0030.01714.24
5.5.200.0090.00614.43
5.5.190.0100.00314.25
5.5.180.0060.00614.46
5.5.170.0060.00914.48
5.5.160.0110.00414.29
5.5.150.0090.00314.29
5.5.140.0060.00614.22
5.5.130.0110.00414.13
5.5.120.0040.01114.09
5.5.110.0110.00014.23
5.5.100.0030.01014.06
5.5.90.0030.01014.36
5.5.80.0040.00814.29
5.5.70.0030.00614.30
5.5.60.0030.01014.01
5.5.50.0040.01113.80
5.5.40.0070.00714.14
5.5.30.0030.01014.25
5.5.20.0000.01514.21
5.5.10.0030.01014.19
5.5.00.0070.00414.00
5.4.450.0370.03515.76
5.4.440.0670.03715.98
5.4.430.0480.02815.99
5.4.420.0750.03115.84
5.4.410.0510.03315.93
5.4.400.0600.02315.82
5.4.390.0080.02815.59
5.4.380.0050.03215.52
5.4.370.0100.02915.56
5.4.360.0080.03215.48
5.4.350.0130.02915.44
5.4.340.0050.03315.47
5.4.330.0000.01212.35
5.4.320.0110.02815.41
5.4.310.0120.02315.54
5.4.300.0070.03315.52
5.4.290.0060.03115.53
5.4.280.0130.02315.56
5.4.270.0150.02515.46
5.4.260.0110.02715.46
5.4.250.0140.02615.56
5.4.240.0130.02615.48
5.4.230.0140.02315.53
5.4.220.0150.02715.51
5.4.210.0130.02515.47
5.4.200.0100.02614.43
5.4.190.0120.02715.53
5.4.180.0110.02715.53
5.4.170.0050.03615.47
5.4.160.0050.03115.53
5.4.150.0050.03015.45
5.4.140.0050.03314.33
5.4.130.0080.02514.32
5.4.120.0060.03014.27
5.4.110.0100.02614.32
5.4.100.0070.03014.33
5.4.90.0030.03514.26
5.4.80.0080.02714.33
5.4.70.0030.03314.29
5.4.60.0060.03514.31
5.4.50.0060.03914.30
5.4.40.0130.03014.37
5.4.30.0070.02614.32
5.4.20.0100.02714.38
5.4.10.0100.03014.29
5.4.00.0100.03314.03
5.3.290.0170.06014.78
5.3.280.0100.05714.80
5.3.270.0100.05714.70
5.3.260.0200.05014.70
5.3.250.0100.07314.63
5.3.240.0230.06314.71
5.3.230.0130.05314.63
5.3.220.0100.05714.59
5.3.210.0200.05014.66
5.3.200.0170.06014.54
5.3.190.0170.05714.64
5.3.180.0170.06714.75
5.3.170.0200.04314.59
5.3.160.0030.06014.65
5.3.150.0100.07314.65
5.3.140.0330.04714.60
5.3.130.0170.06714.53
5.3.120.0200.06714.73
5.3.110.0200.06714.59
5.3.100.0200.06014.25
5.3.90.0170.06714.03
5.3.80.0170.06314.20
5.3.70.0170.04714.07
5.3.60.0030.06014.05
5.3.50.0200.04313.93
5.3.40.0170.04714.05
5.3.30.0170.04314.11
5.3.20.0100.06013.80
5.3.10.0130.05313.64
5.3.00.0100.05313.72
5.2.170.0030.04711.08
5.2.160.0100.04011.17
5.2.150.0070.04711.05
5.2.140.0100.04311.17
5.2.130.0030.04311.13
5.2.120.0000.05011.13
5.2.110.0200.03011.14
5.2.100.0030.04711.13
5.2.90.0030.04711.08
5.2.80.0130.04711.21
5.2.70.0070.05711.11
5.2.60.0130.05011.01
5.2.50.0030.04710.94
5.2.40.0100.04011.15
5.2.30.0100.04711.00
5.2.20.0070.05710.87
5.2.10.0130.03310.88
5.2.00.0100.04010.65
5.1.60.0000.0439.93
5.1.50.0100.03710.11
5.1.40.0070.0379.95
5.1.30.0070.05010.33
5.1.20.0070.05010.47
5.1.10.0170.03710.09
5.1.00.0100.04710.08
5.0.50.0170.0278.54
5.0.40.0070.0378.41
5.0.30.0170.0438.32
5.0.20.0100.0308.18
5.0.10.0000.0338.27
5.0.00.0030.0438.14
4.4.90.0030.0305.91
4.4.80.0030.0305.85
4.4.70.0030.0305.86
4.4.60.0000.0335.90
4.4.50.0030.0335.91
4.4.40.0000.0405.81
4.4.30.0070.0205.90
4.4.20.0070.0235.96
4.4.10.0070.0235.96
4.4.00.0030.0375.91
4.3.110.0030.0235.88
4.3.100.0030.0205.75
4.3.90.0070.0175.81
4.3.80.0070.0335.87
4.3.70.0000.0275.82
4.3.60.0030.0235.79
4.3.50.0030.0235.80
4.3.40.0030.0335.86
4.3.30.0030.0235.00
4.3.20.0000.0275.00
4.3.10.0000.0235.00
4.3.00.0230.01714.62

preferences:
32.81 ms | 400 KiB | 5 Q