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 = "000three!000red0!000four000white!0000five!000black0!"; $pat = "/\d+(\D+)\d+(\D+)\d!/um"; preg_match($pat, $str, $match); $merged = $original; foreach($match as $result) { echo $result; //$merged[] = array("title" => $result, "color" => $result); } //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.0100.01016.75
8.3.50.0110.00722.03
8.3.40.0070.01418.95
8.3.30.0070.00719.13
8.3.20.0060.00320.34
8.3.10.0050.00323.78
8.3.00.0000.00820.77
8.2.180.0080.00816.75
8.2.170.0180.00322.96
8.2.160.0140.00020.25
8.2.150.0000.00924.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00920.79
8.2.110.0030.00620.52
8.2.100.0040.00818.16
8.2.90.0040.00419.22
8.2.80.0080.00017.97
8.2.70.0030.00617.72
8.2.60.0070.00417.80
8.2.50.0090.00318.07
8.2.40.0000.00920.19
8.2.30.0090.00018.27
8.2.20.0020.00518.04
8.2.10.0040.00418.20
8.2.00.0080.00017.89
8.1.280.0100.01025.92
8.1.270.0040.00423.83
8.1.260.0040.01126.35
8.1.250.0080.00028.09
8.1.240.0110.00023.89
8.1.230.0080.00420.97
8.1.220.0000.00917.79
8.1.210.0050.00318.77
8.1.200.0030.00717.48
8.1.190.0000.00817.47
8.1.180.0030.00518.10
8.1.170.0000.00818.78
8.1.160.0040.00422.07
8.1.150.0030.00618.85
8.1.140.0040.00417.60
8.1.130.0000.00817.83
8.1.120.0030.00317.69
8.1.110.0080.00017.63
8.1.100.0000.00717.63
8.1.90.0070.00017.58
8.1.80.0020.00517.57
8.1.70.0070.00017.54
8.1.60.0060.00317.74
8.1.50.0000.00717.70
8.1.40.0090.00017.72
8.1.30.0040.00417.82
8.1.20.0040.00417.71
8.1.10.0040.00417.66
8.1.00.0080.00017.52
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0000.00718.47
8.0.270.0000.00717.29
8.0.260.0030.00317.21
8.0.250.0000.00717.16
8.0.240.0000.00617.07
8.0.230.0050.00217.13
8.0.220.0000.00617.06
8.0.210.0030.00317.07
8.0.200.0000.00617.17
8.0.190.0000.00717.21
8.0.180.0030.00317.16
8.0.170.0040.00417.14
8.0.160.0000.00717.12
8.0.150.0040.00717.07
8.0.140.0040.00416.97
8.0.130.0000.00513.49
8.0.120.0050.00317.16
8.0.110.0000.00817.07
8.0.100.0040.00417.16
8.0.90.0070.00017.21
8.0.80.0030.01217.11
8.0.70.0050.00217.04
8.0.60.0030.00617.07
8.0.50.0040.00417.04
8.0.30.0110.00917.43
8.0.20.0050.01617.40
8.0.10.0040.00417.11
8.0.00.0080.01017.09
7.4.330.0000.00515.19
7.4.320.0030.00316.79
7.4.300.0030.00316.88
7.4.290.0040.00416.87
7.4.280.0030.00516.76
7.4.270.0040.00416.80
7.4.260.0100.00016.76
7.4.250.0020.00516.81
7.4.240.0030.00416.85
7.4.230.0000.00716.77
7.4.220.0180.00716.80
7.4.210.0040.01116.75
7.4.200.0000.00716.67
7.4.160.0090.00916.61
7.4.150.0210.00417.40
7.4.140.0120.00517.86
7.4.130.0050.01516.83
7.4.120.0080.00916.78
7.4.110.0100.00716.86
7.4.100.0070.01716.63
7.4.90.0130.00316.80
7.4.80.0150.00619.39
7.4.70.0090.00916.70
7.4.60.0090.00616.85
7.4.50.0000.00716.66
7.4.40.0080.01216.61
7.4.30.0090.00616.71
7.4.00.0070.00715.01
7.3.330.0030.00313.43
7.3.320.0030.00413.47
7.3.310.0000.00716.61
7.3.300.0030.00316.56
7.3.290.0090.00616.57
7.3.280.0070.00916.56
7.3.270.0090.00917.40
7.3.260.0140.00416.61
7.3.250.0090.00816.58
7.3.240.0150.00916.48
7.3.230.0040.01216.85
7.3.210.0170.00316.37
7.3.200.0120.00819.39
7.3.190.0090.00916.83
7.3.180.0130.00316.45
7.3.170.0080.00816.84
7.3.160.0080.00816.64
7.3.120.0030.01214.95
7.2.330.0140.00716.62
7.2.320.0040.01316.93
7.2.310.0220.00016.73
7.2.300.0110.00716.88
7.2.290.0130.01016.78
7.2.00.0200.00319.61
7.1.100.0030.01018.35
7.1.70.0040.00417.45
7.1.60.0190.00619.70
7.1.50.0320.00734.99
7.1.00.0030.07722.50
7.0.200.0000.00717.09
7.0.140.0070.06321.99
7.0.60.0170.07719.87
7.0.50.0070.03717.90
7.0.40.0070.07320.22
7.0.30.0270.04020.23
7.0.20.0300.07320.22
7.0.10.0000.06320.22
7.0.00.0000.05020.31
5.6.280.0030.07721.01
5.6.210.0130.07020.54
5.6.200.0100.07718.22
5.6.190.0030.08320.41
5.6.180.3400.04020.79
5.6.170.0300.06720.71
5.6.160.0100.06020.44
5.6.150.0070.04318.15
5.6.140.0030.05718.10
5.6.130.0070.05718.14
5.6.120.0030.04321.03
5.6.110.0100.08321.00
5.6.100.0200.06720.99
5.6.90.0030.04021.10
5.6.80.0130.07720.30
5.6.70.3770.03320.35
5.5.350.0230.07720.50
5.5.340.0100.07717.92
5.5.330.0100.08020.36
5.5.320.0000.05020.31
5.5.310.0230.06320.14
5.5.300.0070.06017.91
5.5.290.0030.08317.95
5.5.280.0100.08020.96
5.5.270.0030.08320.83
5.5.260.0130.05020.88
5.5.250.0070.03720.58
5.5.240.0330.05020.07
5.4.450.0370.03729.93
5.4.440.0330.04329.93
5.4.430.0270.03329.68
5.4.420.0370.03729.10
5.4.410.0130.04028.29
5.4.400.0200.03728.29
5.4.390.0270.04328.29
5.4.380.0100.06018.69
5.4.370.0130.05318.50
5.4.360.0070.05718.68
5.4.350.0170.05718.69
5.4.340.0130.05318.59
5.4.320.0100.03712.45
5.4.310.0070.03712.45
5.4.300.0050.04012.46
5.4.290.0110.04412.45
5.4.280.0070.04312.35
5.4.270.0070.03912.35
5.4.260.0090.03912.35
5.4.250.0060.04012.35
5.4.240.0100.04512.35
5.4.230.0050.04112.34
5.4.220.0060.04112.34
5.4.210.0060.04612.34
5.4.200.0080.04012.34
5.4.190.0090.04812.34
5.4.180.0070.04112.34
5.4.170.0050.03912.35
5.4.160.0060.03712.34
5.4.150.0020.04512.34
5.4.140.0080.04112.03
5.4.130.0040.04012.02
5.4.120.0060.05211.97
5.4.110.0070.04911.97
5.4.100.0070.04511.97
5.4.90.0060.03711.96
5.4.80.0080.03511.96
5.4.70.0090.03511.96
5.4.60.0030.03811.96
5.4.50.0060.03511.96
5.4.40.0060.03511.95
5.4.30.0080.03311.95
5.4.20.0050.03611.95
5.4.10.0090.03811.95
5.4.00.0060.03811.44
5.3.290.0070.03912.80
5.3.280.0080.04312.71
5.3.270.0060.04512.72
5.3.260.0070.04412.72
5.3.250.0060.04512.72
5.3.240.0070.04012.72
5.3.230.0060.04312.71
5.3.220.0060.04312.68
5.3.210.0070.04012.68
5.3.200.0070.03612.68
5.3.190.0090.03912.68
5.3.180.0040.04312.67
5.3.170.0090.05712.67
5.3.160.0170.04712.67
5.3.150.0100.05312.67
5.3.140.0090.05612.66
5.3.130.0100.05312.66
5.3.120.0110.05212.66
5.3.110.0090.04212.66
5.3.100.0150.03312.12
5.3.90.0060.03912.08
5.3.80.0100.03812.07
5.3.70.0050.03912.07
5.3.60.0060.04012.07
5.3.50.0060.03812.00
5.3.40.0090.03512.00
5.3.30.0090.03411.95
5.3.20.0050.04111.73
5.3.10.0090.03511.70
5.3.00.0090.03811.69
5.2.170.0070.0329.19
5.2.160.0040.0319.19
5.2.150.0060.0329.19
5.2.140.0030.0339.20
5.2.130.0090.0259.15
5.2.120.0040.0299.14
5.2.110.0060.0299.15
5.2.100.0040.0309.15
5.2.90.0050.0299.15
5.2.80.0060.0299.15
5.2.70.0050.0309.15
5.2.60.0060.0329.10
5.2.50.0080.0309.07
5.2.40.0060.0309.05
5.2.30.0080.0319.03
5.2.20.0060.0299.02
5.2.10.0090.0258.92
5.2.00.0070.0278.78
5.1.60.0050.0248.06
5.1.50.0030.0268.06
5.1.40.0040.0288.04
5.1.30.0080.0238.39
5.1.20.0060.0268.41
5.1.10.0070.0268.14
5.1.00.0080.0238.14
5.0.50.0010.0246.62
5.0.40.0050.0186.48
5.0.30.0050.0396.29
5.0.20.0080.0246.26
5.0.10.0040.0246.24
5.0.00.0060.0366.23
4.4.90.0020.0194.78
4.4.80.0040.0164.76
4.4.70.0070.0144.76
4.4.60.0040.0164.76
4.4.50.0030.0164.77
4.4.40.0030.0254.70
4.4.30.0030.0164.75
4.4.20.0040.0164.84
4.4.10.0050.0154.85
4.4.00.0090.0214.76
4.3.110.0060.0144.67
4.3.100.0010.0184.67
4.3.90.0040.0184.63
4.3.80.0040.0284.59
4.3.70.0030.0144.63
4.3.60.0030.0144.63
4.3.50.0040.0144.63
4.3.40.0030.0244.54
4.3.30.0020.0173.28
4.3.20.0030.0163.26
4.3.10.0010.0183.21
4.3.00.0030.01728.29

preferences:
51.45 ms | 401 KiB | 5 Q