3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = array ( array ("title" => "one", "color" => "blue" ), array ("title" => "two", "color" => "green" ) ); $merged = array(); $str = "000three000red0!000four000white0!000five000black0!"; $pat = "/\d+(\D+)\d+(\D+)\d!/um"; preg_match($pat, $str, $match); foreach($match as $result) { $merged = array_merge($original,array("title" => $match[1], "color" => $match[2])); print_r($merged); }

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.0090.01317.13
8.3.50.0080.00722.26
8.3.40.0130.00918.94
8.3.30.0110.00319.17
8.3.20.0040.00420.18
8.3.10.0070.00023.53
8.3.00.0040.00420.90
8.2.180.0030.01316.63
8.2.170.0090.01322.96
8.2.160.0030.01020.35
8.2.150.0000.00724.18
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0050.00320.98
8.2.110.0070.00322.39
8.2.100.0070.00418.16
8.2.90.0000.00918.28
8.2.80.0040.00419.24
8.2.70.0090.00017.88
8.2.60.0060.00317.93
8.2.50.0040.00718.07
8.2.40.0000.00820.13
8.2.30.0030.00718.27
8.2.20.0060.00318.15
8.2.10.0000.00718.28
8.2.00.0000.00718.16
8.1.280.0110.01125.92
8.1.270.0030.00623.96
8.1.260.0000.01526.35
8.1.250.0040.00428.09
8.1.240.0060.00322.20
8.1.230.0040.00820.97
8.1.220.0040.00417.88
8.1.210.0050.00318.87
8.1.200.0030.00617.61
8.1.190.0000.00817.35
8.1.180.0080.00018.10
8.1.170.0050.00318.76
8.1.160.0000.00722.10
8.1.150.0070.00018.77
8.1.140.0070.00017.55
8.1.130.0000.00717.91
8.1.120.0070.00017.62
8.1.110.0000.00817.50
8.1.100.0050.00217.56
8.1.90.0080.00017.61
8.1.80.0000.00717.63
8.1.70.0030.00317.63
8.1.60.0040.00417.58
8.1.50.0090.00017.70
8.1.40.0030.00717.67
8.1.30.0030.00617.82
8.1.20.0000.00717.86
8.1.10.0030.00617.70
8.1.00.0030.00617.61
8.0.300.0070.00020.21
8.0.290.0000.00716.75
8.0.280.0070.00018.41
8.0.270.0040.00417.29
8.0.260.0000.00617.40
8.0.250.0030.00317.07
8.0.240.0030.00317.20
8.0.230.0070.00017.10
8.0.220.0000.00717.16
8.0.210.0030.00317.05
8.0.200.0030.00317.06
8.0.190.0030.00517.16
8.0.180.0000.00817.17
8.0.170.0030.00617.16
8.0.160.0040.00417.18
8.0.150.0030.00617.10
8.0.140.0000.00717.13
8.0.130.0030.00313.50
8.0.120.0000.00817.19
8.0.110.0000.00717.14
8.0.100.0040.00417.20
8.0.90.0000.00717.19
8.0.80.0130.00717.14
8.0.70.0000.00817.14
8.0.60.0000.00717.18
8.0.50.0050.00217.14
8.0.30.0120.00717.16
8.0.20.0060.01217.49
8.0.10.0030.00517.04
8.0.00.0080.00917.02
7.4.330.0060.00015.05
7.4.320.0030.00316.80
7.4.300.0040.00416.79
7.4.290.0030.00316.89
7.4.280.0000.00716.86
7.4.270.0030.00516.93
7.4.260.0030.00516.86
7.4.250.0040.00416.85
7.4.240.0000.00716.84
7.4.230.0070.00016.91
7.4.220.0070.01116.70
7.4.210.0040.01116.69
7.4.200.0000.00716.59
7.4.160.0000.01516.61
7.4.150.0090.00917.40
7.4.140.0120.00817.86
7.4.130.0110.00716.82
7.4.120.0090.00916.85
7.4.110.0070.01016.68
7.4.100.0140.00716.68
7.4.90.0110.00716.86
7.4.80.0140.00619.39
7.4.70.0050.01316.57
7.4.60.0040.01516.74
7.4.50.0030.00616.86
7.4.40.0130.00316.80
7.4.30.0060.00916.71
7.4.00.0090.00815.21
7.3.330.0030.00313.38
7.3.320.0080.00013.39
7.3.310.0030.00316.51
7.3.300.0040.00416.51
7.3.290.0060.01216.52
7.3.280.0080.00916.50
7.3.270.0130.00917.40
7.3.260.0100.01316.71
7.3.250.0100.00716.66
7.3.240.0070.01116.60
7.3.230.0170.00016.39
7.3.210.0120.00916.74
7.3.200.0090.01019.39
7.3.190.0090.00816.84
7.3.180.0080.00816.70
7.3.170.0100.00616.42
7.3.160.0120.00316.74
7.3.120.0090.00814.96
7.3.110.0090.00615.07
7.3.100.0040.01115.13
7.3.90.0100.00715.03
7.3.80.0110.00014.86
7.3.70.0000.01115.08
7.3.60.0070.00714.86
7.3.50.0000.01614.99
7.3.40.0000.01514.85
7.3.30.0030.00714.77
7.3.20.0060.00616.89
7.3.10.0030.01216.87
7.3.00.0120.00016.95
7.2.330.0080.00816.89
7.2.320.0040.01316.81
7.2.310.0100.01316.79
7.2.300.0210.00016.82
7.2.290.0090.00916.91
7.2.250.0100.01015.47
7.2.240.0070.01315.00
7.2.230.0030.00615.23
7.2.220.0090.00315.36
7.2.210.0070.00715.43
7.2.200.0030.00915.29
7.2.190.0100.00015.14
7.2.180.0040.00715.13
7.2.170.0110.00615.09
7.2.60.0090.00316.90
7.2.00.0000.01519.50
7.1.330.0000.01516.01
7.1.320.0130.00316.24
7.1.310.0030.01215.91
7.1.300.0040.00415.78
7.1.290.0090.00015.83
7.1.280.0060.00315.77
7.1.270.0030.01016.14
7.1.260.0110.00416.06
7.1.200.0060.01016.02
7.1.100.0060.00618.50
7.1.70.0080.00017.46
7.1.60.0140.01019.70
7.1.50.0230.01635.10
7.1.00.0100.06722.42
7.0.200.0000.00816.68
7.0.140.0100.06022.00
7.0.60.0100.03719.97
7.0.50.0070.07717.91
7.0.40.0130.08020.30
7.0.30.0400.05720.14
7.0.20.0330.07020.25
7.0.10.0170.07320.08
7.0.00.0030.09320.18
5.6.280.0070.07020.89
5.6.210.0030.07020.74
5.6.200.0070.05018.14
5.6.190.0100.08320.41
5.6.180.0170.05020.49
5.6.170.0270.08020.52
5.6.160.0070.08720.55
5.6.150.0070.06018.12
5.6.140.0030.08318.15
5.6.130.0130.06718.22
5.6.120.0070.05720.96
5.6.110.0070.08021.11
5.6.100.0070.04021.06
5.6.90.0030.08721.01
5.6.80.0100.07720.53
5.6.70.0200.04020.37
5.5.350.0170.08020.44
5.5.340.0130.07718.01
5.5.330.0170.07720.57
5.5.320.0300.07320.44
5.5.310.0200.07720.29
5.5.300.0100.06718.02
5.5.290.0200.02717.95
5.5.280.0070.06320.73
5.5.270.0130.04320.76
5.5.260.0170.08020.74
5.5.250.0130.07720.77
5.5.240.0000.04320.29
5.4.450.0100.05719.63
5.4.440.0900.06019.48
5.4.430.0900.05019.58
5.4.420.0700.00019.65
5.4.410.0230.05018.97
5.4.400.0270.05018.87
5.4.390.0200.07718.59
5.4.380.0300.05018.63
5.4.370.0000.04718.73
5.4.360.0230.04018.55
5.4.350.0070.03912.00
5.4.340.0060.03912.00
5.4.320.0090.03512.48
5.4.310.0090.04812.48
5.4.300.0090.04012.49
5.4.290.0060.04412.48
5.4.280.0120.03612.38
5.4.270.0060.04212.38
5.4.260.0060.04312.38
5.4.250.0100.04212.38
5.4.240.0050.04012.38
5.4.230.0040.04312.37
5.4.220.0060.03812.37
5.4.210.0080.03512.37
5.4.200.0100.03612.37
5.4.190.0070.03912.36
5.4.180.0070.04612.36
5.4.170.0070.03712.38
5.4.160.0050.03812.38
5.4.150.0090.03812.37
5.4.140.0070.03812.05
5.4.130.0060.04612.04
5.4.120.0090.03712.00
5.4.110.0080.04011.99
5.4.100.0080.03511.99
5.4.90.0080.03611.99
5.4.80.0080.03612.00
5.4.70.0070.03711.99
5.4.60.0120.03311.99
5.4.50.0070.03911.99
5.4.40.0080.04511.98
5.4.30.0090.04011.98
5.4.20.0060.03711.98
5.4.10.0070.03411.98
5.4.00.0090.03811.47
5.3.290.0050.05712.80
5.3.280.0100.03512.71
5.3.270.0070.03812.72
5.3.260.0080.03812.72
5.3.250.0070.03712.71
5.3.240.0050.04012.72
5.3.230.0070.03712.70
5.3.220.0060.03912.68
5.3.210.0060.04012.68
5.3.200.0070.03612.68
5.3.190.0100.03512.68
5.3.180.0080.03412.67
5.3.170.0060.03712.67
5.3.160.0110.03212.67
5.3.150.0120.04412.67
5.3.140.0140.03212.66
5.3.130.0030.04212.66
5.3.120.0070.03812.66
5.3.110.0050.03912.66
5.3.100.0060.03612.12
5.3.90.0050.04112.10
5.3.80.0080.03612.09
5.3.70.0030.03812.09
5.3.60.0040.03812.08
5.3.50.0080.03412.03
5.3.40.0080.03512.02
5.3.30.0030.03911.98
5.3.20.0050.04411.76
5.3.10.0120.03211.73
5.3.00.0030.04311.71
5.2.170.0020.0399.22
5.2.160.0050.0309.22
5.2.150.0050.0369.22
5.2.140.0120.0329.22
5.2.130.0050.0339.18
5.2.120.0030.0309.18
5.2.110.0020.0339.19
5.2.100.0050.0309.18
5.2.90.0070.0309.18
5.2.80.0080.0389.17
5.2.70.0070.0399.17
5.2.60.0060.0389.13
5.2.50.0070.0319.09
5.2.40.0060.0309.08
5.2.30.0080.0309.05
5.2.20.0050.0319.04
5.2.10.0050.0318.93
5.2.00.0060.0298.80
5.1.60.0040.0258.07
5.1.50.0070.0248.06
5.1.40.0130.0198.04
5.1.30.0090.0248.39
5.1.20.0040.0338.41
5.1.10.0130.0218.14
5.1.00.0090.0288.14
5.0.50.0040.0276.61
5.0.40.0070.0246.48
5.0.30.0050.0406.29
5.0.20.0040.0256.26
5.0.10.0020.0236.24
5.0.00.0070.0356.24
4.4.90.0050.0214.77
4.4.80.0030.0224.76
4.4.70.0040.0174.75
4.4.60.0050.0194.76
4.4.50.0070.0154.77
4.4.40.0040.0304.71
4.4.30.0080.0194.76
4.4.20.0070.0224.84
4.4.10.0070.0194.85
4.4.00.0030.0354.76
4.3.110.0030.0244.67
4.3.100.0060.0204.66
4.3.90.0050.0214.63
4.3.80.0080.0284.58
4.3.70.0070.0184.63
4.3.60.0050.0214.63
4.3.50.0080.0204.63
4.3.40.0060.0294.53
4.3.30.0070.0183.28
4.3.20.0060.0193.26
4.3.10.0050.0203.22
4.3.00.0030.0206.44

preferences:
44.1 ms | 401 KiB | 5 Q