3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "HD Alcoa Earnings Soar; Outlook Stays Upbeat BY By James R. Hagerty and Matthew Day PD 12 July 2011 LP Alcoa Inc.'s profit more than doubled in the second quarter. The giant aluminum producer managed to meet analysts' forecasts. However, profits wereless than expected TD Licence this article via our website: http://example.com"; function headerSplit($input) { static $delimsExpr = '/^(HD|BY|PD|LP|TD)/m'; static $whiteExpr = '/\s+/'; $parts = preg_split($delimsExpr, $input, -1, PREG_SPLIT_DELIM_CAPTURE); $result = array(); $i = 0; $l = count($parts); while ($i < $l) { $result[$parts[$i++]] = preg_replace($whiteExpr, ' ', trim($parts[$i++])); } return $result; } var_dump(headerSplit($string));

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.0150.00018.75
8.3.50.0220.00821.21
8.3.40.0040.01219.22
8.3.30.0100.00720.35
8.3.20.0000.00820.33
8.3.10.0040.00422.00
8.3.00.0060.00922.58
8.2.180.0110.00417.00
8.2.170.0070.00722.96
8.2.160.0080.01222.14
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00021.04
8.2.110.0030.00720.53
8.2.100.0080.00418.03
8.2.90.0000.00819.37
8.2.80.0030.00617.97
8.2.70.0050.00518.00
8.2.60.0030.00618.04
8.2.50.0040.00418.07
8.2.40.0030.00619.96
8.2.30.0040.00419.39
8.2.20.0050.00217.97
8.2.10.0080.00018.06
8.2.00.0040.00418.05
8.1.280.0150.00625.92
8.1.270.0050.00323.99
8.1.260.0090.00926.35
8.1.250.0080.00028.09
8.1.240.0060.00322.01
8.1.230.0030.00917.77
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0040.00417.60
8.1.190.0000.00817.55
8.1.180.0000.00819.26
8.1.170.0080.00018.66
8.1.160.0040.00418.91
8.1.150.0040.00418.71
8.1.140.0080.00017.58
8.1.130.0000.00717.91
8.1.120.0040.00417.64
8.1.110.0040.00417.64
8.1.100.0040.00417.65
8.1.90.0000.00717.65
8.1.80.0040.00417.50
8.1.70.0030.00317.61
8.1.60.0030.00917.65
8.1.50.0040.00417.63
8.1.40.0040.00417.61
8.1.30.0080.00017.80
8.1.20.0000.00817.79
8.1.10.0060.00317.82
8.1.00.0000.00817.60
8.0.300.0000.00718.77
8.0.290.0030.00617.13
8.0.280.0000.00718.54
8.0.270.0040.00417.29
8.0.260.0080.00017.07
8.0.250.0000.00717.23
8.0.240.0030.00617.07
8.0.230.0030.00317.05
8.0.220.0050.00217.14
8.0.210.0000.00817.03
8.0.200.0000.00817.09
8.0.190.0040.00417.23
8.0.180.0050.00317.05
8.0.170.0000.00817.11
8.0.160.0030.00317.07
8.0.150.0040.00417.15
8.0.140.0130.00017.11
8.0.130.0060.00013.50
8.0.120.0080.00017.05
8.0.110.0060.00317.11
8.0.100.0090.00017.03
8.0.90.0040.00417.04
8.0.80.0070.01117.07
8.0.70.0000.00717.22
8.0.60.0050.00317.10
8.0.50.0040.00417.11
8.0.30.0070.01217.20
8.0.20.0170.00217.40
8.0.10.0070.00017.26
8.0.00.0080.01017.00
7.4.330.0050.00015.02
7.4.320.0070.00016.73
7.4.300.0050.00316.74
7.4.290.0020.00516.72
7.4.280.0000.00716.79
7.4.270.0030.00316.64
7.4.260.0030.00313.46
7.4.250.0050.00316.70
7.4.240.0040.00316.78
7.4.230.0050.00316.74
7.4.220.0070.01116.94
7.4.210.0080.00716.80
7.4.200.0020.00516.80
7.4.190.0040.00416.84
7.4.160.0160.00016.69
7.4.150.0140.00417.40
7.4.140.0180.01517.86
7.4.130.0050.01216.65
7.4.120.0090.01216.73
7.4.110.0120.01216.58
7.4.100.0070.01116.88
7.4.90.0120.00616.75
7.4.80.0090.00919.39
7.4.70.0050.01116.68
7.4.60.0090.01516.60
7.4.50.0030.00616.69
7.4.40.0070.01022.77
7.4.30.0070.01016.75
7.4.00.0070.00715.10
7.3.330.0000.00513.36
7.3.320.0030.00313.65
7.3.310.0000.00716.68
7.3.300.0000.00716.61
7.3.290.0060.01216.61
7.3.280.0050.01316.61
7.3.270.0080.00817.40
7.3.260.0160.00916.87
7.3.250.0110.01016.66
7.3.240.0100.00716.57
7.3.230.0090.00616.50
7.3.210.0040.01416.85
7.3.200.0070.01119.39
7.3.190.0140.00316.66
7.3.180.0100.01016.46
7.3.170.0130.00616.63
7.3.160.0030.01716.68
7.3.120.0090.00314.79
7.2.330.0170.00316.73
7.2.320.0070.01016.94
7.2.310.0030.01316.95
7.2.300.0040.01416.80
7.2.290.0040.01416.95
7.2.00.0110.01119.07
7.1.100.0030.00917.97
7.1.70.0000.00817.27
7.1.60.0130.01019.21
7.1.50.0090.01617.11
7.1.00.0070.03322.43
7.0.200.0050.00216.89
7.0.140.0030.07722.05
7.0.60.0100.07719.98
7.0.50.0070.04317.90
7.0.40.0100.04020.29
7.0.30.0230.07020.17
7.0.20.0270.05320.12
7.0.10.0030.09020.10
7.0.00.0100.08720.21
5.6.280.0100.06721.12
5.6.210.0100.06720.55
5.6.200.0170.07718.16
5.6.190.0030.04320.54
5.6.180.0470.07320.48
5.6.170.0300.07020.71
5.6.160.0030.09020.52
5.6.150.0100.07718.21
5.6.140.0030.08718.18
5.6.130.0030.08018.15
5.6.120.0070.08320.96
5.6.110.0130.08021.13
5.6.100.0030.04021.04
5.6.90.0000.04321.08
5.6.80.0030.04020.41
5.5.350.0230.06720.34
5.5.340.0130.07718.03
5.5.330.0100.06720.35
5.5.320.3370.05320.24
5.5.310.0330.07720.27
5.5.300.0030.07317.94
5.5.290.0130.07318.02
5.5.280.0130.07720.80
5.5.270.0100.06020.79
5.5.260.0170.07320.89
5.5.250.0070.04020.56
5.5.240.0030.07320.26
5.4.450.2570.03719.17
5.4.440.2530.03719.57
5.4.430.2470.04719.41
5.4.420.2470.04019.27
5.4.410.2300.03319.18
5.4.400.2570.03319.25
5.4.390.2630.02719.15
5.4.380.2500.03319.16
5.4.370.2630.04719.09
5.4.360.2470.04318.95
5.4.350.2470.03719.19
5.4.340.2030.04318.87
5.4.320.2270.03718.98
5.4.310.2470.04318.98
5.4.300.2270.04019.31
5.4.290.2400.04718.87
5.4.280.2200.04319.20
5.4.270.2230.03719.22
5.4.260.2300.03319.08
5.4.250.2230.04019.14
5.4.240.2300.03019.14
5.4.230.2330.03719.21
5.4.220.2270.03318.97
5.4.210.2200.04019.01
5.4.200.2200.04019.30
5.4.190.2330.03718.83
5.4.180.2230.03719.23
5.4.170.0400.03719.15
5.4.160.0000.04019.04
5.4.150.0030.03719.07
5.4.140.0730.04016.55
5.4.130.2100.03716.43
5.4.120.2200.04016.38
5.4.110.2200.03716.41
5.4.100.2070.03716.63
5.4.90.2300.03316.56
5.4.80.2300.03716.57
5.4.70.2570.04016.31
5.4.60.2030.03016.45
5.4.50.1930.03716.15
5.4.40.1700.03716.25
5.4.30.2330.03316.53
5.4.20.2370.04016.34
5.4.10.2300.04016.22
5.4.00.2370.03015.94
5.3.290.2430.03014.67
5.3.280.2370.04014.64
5.3.270.2530.04014.50
5.3.260.2600.03714.62
5.3.250.2500.04014.52
5.3.240.2600.04014.59
5.3.230.2370.04014.71
5.3.220.2430.03314.47
5.3.210.2270.04014.65
5.3.200.2570.03714.54
5.3.190.2700.03714.71
5.3.180.2730.03314.80
5.3.170.2200.03714.55
5.3.160.2700.03314.57
5.3.150.2470.04014.55
5.3.140.2470.04014.45
5.3.130.2770.03714.46
5.3.120.2470.04714.52
5.3.110.2430.04014.69
5.3.100.2630.04314.13
5.3.90.2130.03313.95
5.3.80.2630.03014.09
5.3.70.2700.04314.08
5.3.60.2270.03314.02
5.3.50.2530.03713.86
5.3.40.2270.03014.18
5.3.30.2530.03713.91
5.3.20.2530.03713.77
5.3.10.2770.02713.66
5.3.00.2570.03013.75
5.2.170.2130.03011.06
5.2.160.2130.02311.38
5.2.150.2300.03011.13
5.2.140.2130.03011.05
5.2.130.2430.03011.09
5.2.120.2100.03311.03
5.2.110.2370.02711.00
5.2.100.1900.02311.18
5.2.90.2130.02711.11
5.2.80.2170.03311.02
5.2.70.2030.02311.18
5.2.60.2100.03011.12
5.2.50.2100.02711.09
5.2.40.1700.03310.93
5.2.30.1700.03010.93
5.2.20.1430.03711.19
5.2.10.1630.02710.98
5.2.00.1600.02710.79
5.1.60.1700.0279.89
5.1.50.1630.0209.88
5.1.40.1830.0309.87
5.1.30.1170.02710.45
5.1.20.1600.03010.47
5.1.10.1670.02010.04
5.1.00.1630.02310.20
5.0.50.0570.0278.48
5.0.40.0800.0208.39
5.0.30.0700.0338.38
5.0.20.0600.0238.25
5.0.10.0700.0208.05
5.0.00.0700.0378.15
4.4.90.0770.0137.96
4.4.80.0700.0137.96
4.4.70.0670.0177.96
4.4.60.0700.0137.96
4.4.50.0700.0137.96
4.4.40.0700.0237.96
4.4.30.0700.0177.96
4.4.20.0700.0177.96
4.4.10.0900.0237.96
4.4.00.0870.0377.96
4.3.110.0770.0207.96
4.3.100.0970.0177.96
4.3.90.0670.0177.96
4.3.80.0670.0237.96
4.3.70.0800.0137.96
4.3.60.0770.0137.96
4.3.50.0770.0237.96
4.3.40.0770.0137.96
4.3.30.0330.0177.96
4.3.20.0400.0207.96
4.3.10.0330.0207.96
4.3.00.0330.0177.96

preferences:
44.79 ms | 401 KiB | 5 Q