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); $merged = $original; foreach($match as $result) { echo $result . "\n"; //$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.0110.00416.75
8.3.50.0120.00522.13
8.3.40.0090.00618.96
8.3.30.0110.00319.09
8.3.20.0050.00220.39
8.3.10.0000.00823.53
8.3.00.0060.00320.77
8.2.180.0070.01117.00
8.2.170.0080.00819.16
8.2.160.0100.00320.37
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0040.00421.03
8.2.110.0060.00322.33
8.2.100.0110.00018.28
8.2.90.0040.00419.40
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0030.00917.80
8.2.50.0060.00318.07
8.2.40.0050.00320.07
8.2.30.0030.00718.35
8.2.20.0050.00318.02
8.2.10.0000.00718.23
8.2.00.0000.00818.09
8.1.280.0150.00325.92
8.1.270.0040.00422.20
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00323.71
8.1.230.0000.01119.04
8.1.220.0030.00517.79
8.1.210.0060.00318.77
8.1.200.0030.00617.47
8.1.190.0030.00517.35
8.1.180.0080.00018.10
8.1.170.0030.00618.82
8.1.160.0000.00721.97
8.1.150.0040.00418.91
8.1.140.0040.00417.71
8.1.130.0070.00017.86
8.1.120.0000.00717.52
8.1.110.0050.00217.54
8.1.100.0040.00417.63
8.1.90.0040.00417.53
8.1.80.0060.00317.63
8.1.70.0070.00017.61
8.1.60.0060.00317.75
8.1.50.0000.00817.72
8.1.40.0000.00717.62
8.1.30.0030.00617.82
8.1.20.0040.00417.81
8.1.10.0000.00717.56
8.1.00.0040.00417.46
8.0.300.0000.00919.09
8.0.290.0040.00416.88
8.0.280.0070.00018.47
8.0.270.0070.00017.35
8.0.260.0060.00017.29
8.0.250.0000.00817.20
8.0.240.0030.00317.28
8.0.230.0070.00017.19
8.0.220.0030.00317.23
8.0.210.0040.00417.16
8.0.200.0030.00317.27
8.0.190.0000.00717.23
8.0.180.0040.00417.24
8.0.170.0000.00817.23
8.0.160.0050.00317.20
8.0.150.0040.00417.02
8.0.140.0040.00417.14
8.0.130.0050.00013.64
8.0.120.0000.00717.23
8.0.110.0000.00717.15
8.0.100.0040.00417.20
8.0.90.0030.00317.11
8.0.80.0150.00317.28
8.0.70.0030.00617.30
8.0.60.0040.00417.26
8.0.50.0070.00017.29
8.0.30.0130.00717.25
8.0.20.0060.01517.40
8.0.10.0000.00717.17
8.0.00.0130.00816.87
7.4.330.0050.00015.17
7.4.320.0070.00016.78
7.4.300.0000.00616.89
7.4.290.0030.00316.86
7.4.280.0000.00716.78
7.4.270.0070.00016.83
7.4.260.0060.00316.81
7.4.250.0040.00416.73
7.4.240.0040.00416.84
7.4.230.0070.00016.77
7.4.220.0130.01316.80
7.4.210.0060.00916.88
7.4.200.0000.00816.91
7.4.160.0150.00016.96
7.4.150.0070.01017.40
7.4.140.0070.01117.86
7.4.130.0110.00916.72
7.4.120.0070.01216.80
7.4.110.0090.01317.03
7.4.100.0120.01216.66
7.4.90.0100.00616.76
7.4.80.0090.00919.39
7.4.70.0200.00316.93
7.4.60.0060.01316.80
7.4.50.0030.00616.68
7.4.40.0100.00616.57
7.4.30.0120.00316.60
7.4.00.0110.00715.05
7.3.330.0030.00313.36
7.3.320.0000.00613.45
7.3.310.0070.00016.66
7.3.300.0030.00316.67
7.3.290.0070.00716.57
7.3.280.0080.01016.62
7.3.270.0070.01017.40
7.3.260.0060.01116.57
7.3.250.0080.00816.68
7.3.240.0100.00716.57
7.3.230.0110.01116.59
7.3.210.0030.01416.72
7.3.200.0120.00619.39
7.3.190.0090.00916.71
7.3.180.0030.01716.72
7.3.170.0030.01316.61
7.3.160.0070.01416.63
7.3.120.0070.00715.09
7.3.10.0150.00916.54
7.3.00.0060.00616.50
7.2.330.0070.01116.71
7.2.320.0100.00716.63
7.2.310.0170.00016.68
7.2.300.0150.00316.71
7.2.290.0070.01516.83
7.2.130.0190.00316.65
7.2.120.0130.00716.77
7.2.110.0110.01116.55
7.2.100.0170.00716.90
7.2.90.0210.00616.66
7.2.80.0120.00916.64
7.2.70.0140.00316.88
7.2.60.0180.00016.60
7.2.50.0240.00417.14
7.2.40.0170.00216.73
7.2.30.0220.00016.67
7.2.20.0180.00816.71
7.2.10.0070.00716.42
7.2.00.0070.00918.04
7.1.250.0110.00415.84
7.1.100.0000.01218.13
7.1.70.0030.00617.34
7.1.60.0100.01319.70
7.1.50.0070.01817.07
7.1.00.0000.08022.48
7.0.200.0030.00616.94
7.0.140.0070.07322.07
7.0.60.0070.08319.86
7.0.50.0000.04317.70
7.0.40.0130.05020.09
7.0.30.0230.05320.03
7.0.20.0430.07020.18
7.0.10.0070.04320.14
7.0.00.0100.04320.18
5.6.280.0030.07321.06
5.6.210.0100.07320.74
5.6.200.0070.03718.19
5.6.190.0070.07320.61
5.6.180.3600.03720.61
5.6.170.0330.05320.54
5.6.160.0170.07320.50
5.6.150.0070.06318.09
5.6.140.0070.08018.16
5.6.130.0070.07018.09
5.6.120.0030.04020.96
5.6.110.0130.07321.11
5.6.100.0130.05320.95
5.6.90.0100.08321.00
5.6.80.0100.07320.52
5.6.70.5000.03020.43
5.5.350.0200.06320.43
5.5.340.0000.04017.98
5.5.330.0070.04320.25
5.5.320.0430.07320.32
5.5.310.0270.04320.16
5.5.300.0070.06317.93
5.5.290.0100.08318.02
5.5.280.0070.08020.80
5.5.270.0100.04720.77
5.5.260.0070.04020.87
5.5.250.0100.06720.49
5.5.240.0130.04720.27
5.4.450.0270.04329.93
5.4.440.0400.03329.93
5.4.430.0400.04029.09
5.4.420.0270.05028.29
5.4.410.0270.04028.29
5.4.400.0330.04328.29
5.4.390.0330.03328.29
5.4.380.0170.05018.66
5.4.370.0100.05318.52
5.4.360.0230.04018.68
5.4.350.0100.06318.58
5.4.340.0030.06018.77
5.4.320.0080.03812.46
5.4.310.0120.03812.45
5.4.300.0120.03412.46
5.4.290.0080.03612.45
5.4.280.0050.04212.35
5.4.270.0070.05112.35
5.4.260.0060.05312.35
5.4.250.0040.04112.35
5.4.240.0110.04112.35
5.4.230.0040.04212.34
5.4.220.0040.03912.34
5.4.210.0070.03612.34
5.4.200.0130.03812.34
5.4.190.0080.03712.34
5.4.180.0060.03712.34
5.4.170.0090.03712.35
5.4.160.0090.03512.34
5.4.150.0070.03612.34
5.4.140.0070.03812.03
5.4.130.0020.04112.01
5.4.120.0090.03411.97
5.4.110.0120.03211.97
5.4.100.0090.03511.97
5.4.90.0070.03811.97
5.4.80.0050.04111.96
5.4.70.0060.03811.96
5.4.60.0070.03711.97
5.4.50.0070.04011.96
5.4.40.0100.04411.95
5.4.30.0040.04011.95
5.4.20.0050.03911.95
5.4.10.0070.04811.95
5.4.00.0060.05011.44
5.3.290.0080.03612.80
5.3.280.0060.04612.71
5.3.270.0050.05712.72
5.3.260.0090.04212.72
5.3.250.0080.04912.72
5.3.240.0060.04012.72
5.3.230.0070.04912.71
5.3.220.0080.04512.68
5.3.210.0080.03912.68
5.3.200.0060.04012.68
5.3.190.0040.04312.68
5.3.180.0070.03912.68
5.3.170.0060.04012.67
5.3.160.0070.03712.67
5.3.150.0080.03712.67
5.3.140.0060.03712.66
5.3.130.0050.04112.65
5.3.120.0060.04612.66
5.3.110.0060.04012.65
5.3.100.0020.04212.12
5.3.90.0090.03412.09
5.3.80.0060.04012.07
5.3.70.0080.03712.07
5.3.60.0120.03212.06
5.3.50.0070.03712.00
5.3.40.0070.04012.00
5.3.30.0060.04011.96
5.3.20.0060.04011.74
5.3.10.0050.03911.70
5.3.00.0060.04011.69
5.2.170.0050.0349.19
5.2.160.0040.0339.19
5.2.150.0040.0349.19
5.2.140.0040.0359.19
5.2.130.0060.0329.15
5.2.120.0050.0329.15
5.2.110.0060.0329.15
5.2.100.0060.0309.15
5.2.90.0070.0329.15
5.2.80.0050.0339.14
5.2.70.0080.0279.14
5.2.60.0070.0289.10
5.2.50.0070.0299.07
5.2.40.0060.0309.05
5.2.30.0060.0309.02
5.2.20.0060.0329.02
5.2.10.0040.0308.92
5.2.00.0080.0308.78
5.1.60.0050.0248.07
5.1.50.0070.0248.06
5.1.40.0060.0318.04
5.1.30.0080.0348.39
5.1.20.0040.0388.41
5.1.10.0100.0298.14
5.1.00.0040.0378.14
5.0.50.0030.0256.62
5.0.40.0050.0186.48
5.0.30.0050.0296.29
5.0.20.0040.0226.27
5.0.10.0020.0226.24
5.0.00.0060.0306.23
4.4.90.0040.0184.78
4.4.80.0030.0174.76
4.4.70.0020.0174.75
4.4.60.0040.0154.75
4.4.50.0010.0194.77
4.4.40.0030.0254.71
4.4.30.0040.0154.76
4.4.20.0040.0154.85
4.4.10.0010.0194.85
4.4.00.0060.0294.75
4.3.110.0020.0234.66
4.3.100.0030.0214.66
4.3.90.0030.0214.64
4.3.80.0030.0324.59
4.3.70.0050.0194.63
4.3.60.0050.0184.63
4.3.50.0080.0174.63
4.3.40.0110.0244.54
4.3.30.0040.0193.29
4.3.20.0010.0233.27
4.3.10.0040.0263.22
4.3.00.0030.01728.29

preferences:
36.26 ms | 400 KiB | 5 Q