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_all($pat, $str, $match); var_dump($match); $merged = $original; $i = 0; foreach($match[1] as $result) { $merged[] = array("title" => $match[1][$i], "color" => $match[2][$i]); } 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.40.0070.01118.80
8.3.30.0140.00319.17
8.3.20.0040.00420.10
8.3.10.0080.00023.66
8.3.00.0050.00320.83
8.2.170.0090.00622.96
8.2.160.0070.00720.43
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0090.00020.98
8.2.110.0060.00320.35
8.2.100.0110.00018.03
8.2.90.0080.00418.13
8.2.80.0040.00419.04
8.2.70.0050.00317.93
8.2.60.0040.00418.04
8.2.50.0080.00018.10
8.2.40.0040.00422.22
8.2.30.0080.00418.50
8.2.20.0000.00818.09
8.2.10.0000.00718.28
8.2.00.0060.00318.08
8.1.270.0000.00822.14
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.92
8.1.230.0080.00419.10
8.1.220.0030.00517.91
8.1.210.0050.00318.77
8.1.200.0030.00717.60
8.1.190.0080.00017.35
8.1.180.0040.00418.10
8.1.170.0060.00318.65
8.1.160.0000.00722.11
8.1.150.0080.00018.84
8.1.140.0060.00317.58
8.1.130.0000.00717.87
8.1.120.0040.00417.53
8.1.110.0000.00817.52
8.1.100.0000.00717.54
8.1.90.0040.00417.47
8.1.80.0000.00717.58
8.1.70.0040.00417.55
8.1.60.0030.00617.75
8.1.50.0000.00917.73
8.1.40.0050.00317.67
8.1.30.0040.00417.78
8.1.20.0020.00517.77
8.1.10.0050.00317.69
8.1.00.0000.00817.52
8.0.300.0040.00419.93
8.0.290.0000.00816.88
8.0.280.0030.00318.46
8.0.270.0050.00317.31
8.0.260.0000.00617.19
8.0.250.0070.00017.11
8.0.240.0000.00717.21
8.0.230.0040.00417.06
8.0.220.0030.00317.16
8.0.210.0040.00417.06
8.0.200.0040.00417.15
8.0.190.0040.00417.15
8.0.180.0000.00817.10
8.0.170.0000.00817.00
8.0.160.0040.00417.15
8.0.150.0090.00317.13
8.0.140.0000.00717.08
8.0.130.0060.00013.54
8.0.120.0000.00817.18
8.0.110.0040.00417.09
8.0.100.0040.00417.20
8.0.90.0000.00717.23
8.0.80.0030.01717.12
8.0.70.0000.00717.02
8.0.60.0040.00417.22
8.0.50.0000.00817.07
8.0.30.0150.00717.24
8.0.20.0060.01317.40
8.0.10.0020.00517.20
8.0.00.0120.00817.12
7.4.330.0050.00015.10
7.4.320.0040.00416.70
7.4.300.0000.00816.93
7.4.290.0080.00016.87
7.4.280.0000.00716.91
7.4.270.0000.00716.80
7.4.260.0030.00616.69
7.4.250.0050.00216.80
7.4.240.0030.00416.85
7.4.230.0030.00316.64
7.4.220.0070.01016.91
7.4.210.0160.00316.88
7.4.200.0030.00316.69
7.4.160.0060.00916.66
7.4.150.0150.00717.40
7.4.140.0130.00817.86
7.4.130.0090.00916.70
7.4.120.0100.00816.77
7.4.110.0090.00916.90
7.4.100.0100.00916.71
7.4.90.0190.00016.69
7.4.80.0130.00319.39
7.4.70.0040.01316.71
7.4.60.0120.00616.64
7.4.50.0090.00016.67
7.4.40.0190.00316.76
7.4.30.0030.01216.73
7.4.00.0120.00615.36
7.3.330.0060.00013.22
7.3.320.0000.00613.42
7.3.310.0000.00716.54
7.3.300.0070.00016.48
7.3.290.0100.00416.53
7.3.280.0110.00816.52
7.3.270.0060.01217.40
7.3.260.0060.01116.68
7.3.250.0090.00916.58
7.3.240.0160.00316.63
7.3.230.0140.00316.71
7.3.210.0100.01016.66
7.3.200.0080.00819.39
7.3.190.0130.00316.82
7.3.180.0100.00716.80
7.3.170.0130.01716.47
7.3.160.0100.00616.52
7.3.120.0000.01614.70
7.3.10.0050.01116.93
7.3.00.0120.00516.98
7.2.330.0160.00316.74
7.2.320.0000.01816.96
7.2.310.0160.00316.76
7.2.300.0100.00716.73
7.2.290.0060.01316.83
7.2.130.0060.00917.08
7.2.120.0110.00517.13
7.2.110.0050.00817.13
7.2.100.0030.00917.13
7.2.90.0050.00817.14
7.2.80.0080.00817.21
7.2.70.0080.00717.06
7.2.60.0060.00717.08
7.2.50.0050.00717.21
7.2.40.0050.01117.26
7.2.30.0030.01117.10
7.2.20.0090.00717.11
7.2.10.0020.00917.28
7.2.00.0090.00617.04
7.1.250.0080.00315.88
7.1.200.0040.00815.79
7.1.70.0080.00017.07
7.1.60.0120.01219.70
7.1.50.0290.01034.93
7.1.00.0030.08022.59
7.0.200.0050.00316.96
7.0.140.0030.07022.12
7.0.60.0100.07319.86
7.0.50.0130.07317.90
7.0.40.0070.08020.17
7.0.30.0230.04020.14
7.0.20.0270.08020.25
7.0.10.0030.07320.17
7.0.00.0070.09020.27
5.6.280.0100.07021.02
5.6.210.0100.03720.75
5.6.200.0070.04018.14
5.6.190.0130.08020.64
5.6.180.3800.04720.45
5.6.170.0270.08020.47
5.6.160.0070.05720.71
5.6.150.0070.08018.12
5.6.140.0030.06018.13
5.6.130.0000.04318.11
5.6.120.0230.06321.05
5.6.110.0130.07721.01
5.6.100.0000.07021.13
5.6.90.0100.06720.87
5.6.80.0100.03720.38
5.6.70.0130.07020.36
5.5.350.0200.06720.44
5.5.340.0070.08017.98
5.5.330.0030.08720.18
5.5.320.3930.04320.38
5.5.310.0370.07020.23
5.5.300.0070.03717.95
5.5.290.0000.04318.00
5.5.280.0070.08720.87
5.5.270.0070.08020.77
5.5.260.0170.07720.75
5.5.250.0070.07720.68
5.5.240.0200.07720.27
5.4.450.0470.04329.93
5.4.440.0200.03729.93
5.4.430.0600.04029.68
5.4.420.0270.04329.10
5.4.410.0400.02728.29
5.4.400.0200.03728.29
5.4.390.0530.04028.29
5.4.380.0330.06318.83
5.4.370.0170.05018.55
5.4.360.0230.04318.57
5.4.350.0500.05018.78
5.4.340.0100.05718.60
5.4.320.0040.04412.49
5.4.310.0080.04012.48
5.4.300.0070.03712.49
5.4.290.0030.04312.48
5.4.280.0070.04012.38
5.4.270.0100.03712.38
5.4.260.0080.03812.38
5.4.250.0050.04112.38
5.4.240.0150.03912.38
5.4.230.0090.03712.38
5.4.220.0050.04312.38
5.4.210.0110.03712.37
5.4.200.0100.04312.38
5.4.190.0090.03912.37
5.4.180.0090.03912.37
5.4.170.0080.04412.38
5.4.160.0140.04412.38
5.4.150.0100.04312.38
5.4.140.0110.04512.05
5.4.130.0100.04012.04
5.4.120.0060.04912.00
5.4.110.0090.04912.00
5.4.100.0090.04612.00
5.4.90.0080.04812.00
5.4.80.0090.04012.00
5.4.70.0110.03512.00
5.4.60.0080.03311.99
5.4.50.0070.03412.00
5.4.40.0050.03711.98
5.4.30.0080.03511.98
5.4.20.0070.03811.98
5.4.10.0110.04311.98
5.4.00.0110.05011.47
5.3.290.0040.04812.80
5.3.280.0090.04112.71
5.3.270.0070.04412.73
5.3.260.0070.04012.72
5.3.250.0070.03912.72
5.3.240.0080.03712.72
5.3.230.0060.03912.71
5.3.220.0070.03812.68
5.3.210.0090.03912.68
5.3.200.0080.03712.68
5.3.190.0060.04012.68
5.3.180.0100.03512.67
5.3.170.0100.03412.67
5.3.160.0070.03612.68
5.3.150.0070.03612.68
5.3.140.0060.04012.66
5.3.130.0090.03912.66
5.3.120.0070.04112.66
5.3.110.0070.05112.66
5.3.100.0100.04612.12
5.3.90.0080.03912.11
5.3.80.0040.03812.09
5.3.70.0110.03612.09
5.3.60.0100.03612.08
5.3.50.0080.03412.03
5.3.40.0040.04112.03
5.3.30.0080.03411.99
5.3.20.0060.04011.77
5.3.10.0080.03911.73
5.3.00.0070.03711.72
5.2.170.0050.0319.21
5.2.160.0030.0329.22
5.2.150.0060.0359.22
5.2.140.0040.0329.21
5.2.130.0050.0359.18
5.2.120.0050.0309.18
5.2.110.0070.0339.18
5.2.100.0060.0369.18
5.2.90.0070.0309.18
5.2.80.0070.0309.18
5.2.70.0040.0349.18
5.2.60.0120.0369.13
5.2.50.0080.0379.10
5.2.40.0050.0309.08
5.2.30.0040.0319.06
5.2.20.0080.0349.05
5.2.10.0050.0308.94
5.2.00.0090.0308.80
5.1.60.0050.0268.07
5.1.50.0070.0258.07
5.1.40.0040.0308.05
5.1.30.0070.0358.39
5.1.20.0070.0278.42
5.1.10.0060.0278.14
5.1.00.0110.0218.15
5.0.50.0050.0216.63
5.0.40.0060.0186.48
5.0.30.0070.0326.30
5.0.20.0060.0206.27
5.0.10.0030.0266.24
5.0.00.0070.0316.24
4.4.90.0070.0194.78
4.4.80.0030.0174.76
4.4.70.0050.0224.76
4.4.60.0010.0184.75
4.4.50.0040.0174.77
4.4.40.0050.0364.71
4.4.30.0050.0194.75
4.4.20.0050.0174.84
4.4.10.0070.0144.84
4.4.00.0020.0264.76
4.3.110.0030.0164.67
4.3.100.0050.0144.67
4.3.90.0030.0154.63
4.3.80.0020.0274.58
4.3.70.0050.0154.63
4.3.60.0020.0174.63
4.3.50.0040.0194.63
4.3.40.0040.0314.54
4.3.30.0060.0193.30
4.3.20.0050.0203.27
4.3.10.0060.0183.23
4.3.00.0070.01328.29

preferences:
41.8 ms | 400 KiB | 5 Q