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 | PREG_SPLIT_NO_EMPTY); $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.0160.00718.43
8.3.50.0070.01222.11
8.3.40.0110.00418.86
8.3.30.0090.00619.09
8.3.20.0050.00318.93
8.3.10.0040.00420.66
8.3.00.0040.00421.86
8.2.180.0110.00418.66
8.2.170.0090.00622.96
8.2.160.0070.00722.22
8.2.150.0100.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00319.59
8.2.110.0140.00320.39
8.2.100.0130.00018.03
8.2.90.0050.00319.21
8.2.80.0040.00418.05
8.2.70.0000.00817.88
8.2.60.0050.00318.00
8.2.50.0040.00418.10
8.2.40.0000.00820.45
8.2.30.0040.00418.09
8.2.20.0040.00417.88
8.2.10.0030.00617.99
8.2.00.0000.00817.89
8.1.280.0150.00625.92
8.1.270.0060.00323.99
8.1.260.0040.00426.35
8.1.250.0070.01128.09
8.1.240.0080.00020.90
8.1.230.0070.00419.22
8.1.220.0030.00617.74
8.1.210.0100.00018.77
8.1.200.0000.00917.47
8.1.190.0080.00417.48
8.1.180.0080.00018.10
8.1.170.0000.00818.59
8.1.160.0040.00422.14
8.1.150.0030.00618.72
8.1.140.0050.00317.62
8.1.130.0070.00017.77
8.1.120.0000.00717.49
8.1.110.0060.00317.65
8.1.100.0000.00717.67
8.1.90.0070.00017.63
8.1.80.0000.00717.61
8.1.70.0000.00717.66
8.1.60.0000.00817.67
8.1.50.0060.00317.66
8.1.40.0000.00817.65
8.1.30.0060.00317.82
8.1.20.0040.00417.71
8.1.10.0000.00817.73
8.1.00.0040.00417.59
8.0.300.0030.00518.77
8.0.290.0060.00316.75
8.0.280.0050.00318.42
8.0.270.0000.00718.17
8.0.260.0040.00418.48
8.0.250.0070.00017.14
8.0.240.0080.00017.13
8.0.230.0070.00316.99
8.0.220.0000.00717.03
8.0.210.0080.00017.05
8.0.200.0040.00416.99
8.0.190.0040.00417.05
8.0.180.0000.00717.16
8.0.170.0060.00317.02
8.0.160.0040.00417.02
8.0.150.0060.00316.87
8.0.140.0090.00016.92
8.0.130.0030.00313.52
8.0.120.0000.00817.05
8.0.110.0000.00816.94
8.0.100.0040.00416.89
8.0.90.0050.00317.10
8.0.80.0180.00317.09
8.0.70.0040.00417.02
8.0.60.0040.00416.95
8.0.50.0000.00716.89
8.0.30.0130.00717.24
8.0.20.0160.00817.40
8.0.10.0040.00417.30
8.0.00.0110.00817.09
7.4.330.0000.00515.04
7.4.320.0030.00316.80
7.4.300.0030.00316.75
7.4.290.0000.00716.83
7.4.280.0000.00816.73
7.4.270.0000.00716.75
7.4.260.0000.00613.62
7.4.250.0030.00616.73
7.4.240.0020.00516.65
7.4.230.0070.00016.93
7.4.220.0070.01116.89
7.4.210.0080.00816.80
7.4.200.0000.00716.86
7.4.190.0040.00416.80
7.4.160.0100.00616.77
7.4.150.0100.01417.40
7.4.140.0120.01017.86
7.4.130.0060.01416.67
7.4.120.0110.00616.58
7.4.110.0030.01416.59
7.4.100.0070.01116.79
7.4.90.0150.00716.73
7.4.80.0130.01019.04
7.4.70.0070.01016.66
7.4.60.0120.00616.51
7.4.50.0030.00516.51
7.4.40.0000.01922.27
7.4.30.0060.00916.57
7.4.00.0100.00415.38
7.3.330.0020.00213.45
7.3.320.0050.00013.46
7.3.310.0030.00316.35
7.3.300.0030.00316.54
7.3.290.0060.00916.53
7.3.280.0090.00716.51
7.3.270.0090.00917.40
7.3.260.0110.00818.24
7.3.250.0040.01516.72
7.3.240.0110.01116.74
7.3.230.0090.00916.57
7.3.210.0130.00616.73
7.3.200.0130.01019.39
7.3.190.0150.00316.87
7.3.180.0100.00816.54
7.3.170.0100.00716.80
7.3.160.0140.00316.50
7.3.120.0130.00315.14
7.2.330.0090.00916.77
7.2.320.0110.00716.77
7.2.310.0140.00816.74
7.2.300.0040.01316.90
7.2.290.0140.00316.85
7.2.00.0030.01019.49
7.1.100.0040.00918.61
7.1.70.0030.00617.43
7.1.60.0100.01419.40
7.1.50.0070.00716.94
7.1.00.0030.07022.44
7.0.200.0000.00816.77
7.0.140.0070.07022.00
7.0.60.0100.03720.02
7.0.50.0070.05317.87
7.0.40.0030.04320.26
7.0.30.0000.05020.27
7.0.20.0030.04720.16
7.0.10.0100.06720.42
7.0.00.0100.08020.13
5.6.280.0030.07021.10
5.6.210.0100.07320.73
5.6.200.0030.04318.15
5.6.190.0030.04020.47
5.6.180.0000.04320.41
5.6.170.0170.04020.55
5.6.160.0100.08020.63
5.6.150.0100.07720.36
5.6.140.0130.07320.34
5.6.130.0070.05320.23
5.6.120.0170.07320.40
5.6.110.0070.04020.32
5.6.100.0030.08320.23
5.6.90.0100.08020.15
5.6.80.0100.04719.89
5.6.70.0130.06019.87
5.6.60.0070.05319.78
5.6.50.0070.08019.81
5.6.40.0000.04719.70
5.6.30.0130.05719.76
5.6.20.0030.06019.54
5.6.10.0100.07719.59
5.6.00.0100.03719.54
5.5.350.4270.04320.33
5.5.340.0030.08717.98
5.5.330.0000.04320.25
5.5.320.0030.04020.21
5.5.310.0000.04320.19
5.5.300.0000.04720.13
5.5.290.0070.08719.98
5.5.280.0070.08020.30
5.5.270.0130.04020.19
5.5.260.0100.08720.12
5.5.250.0100.03719.94
5.5.240.0100.08319.71
5.5.230.0100.07719.61
5.5.220.0100.08019.41
5.5.210.0070.06719.54
5.5.200.0070.06319.49
5.5.190.0100.06019.66
5.5.180.0070.07319.47
5.5.160.0030.08719.46
5.5.150.0030.07019.67
5.5.140.0100.06019.67
5.5.130.0130.05019.48
5.5.120.0000.04319.55
5.5.110.0130.07319.47
5.5.100.0030.07019.55
5.5.90.0070.07019.22
5.5.80.0030.07719.42
5.5.70.0100.04319.23
5.5.60.0070.06019.44
5.5.50.0170.07319.21
5.5.40.0030.06319.38
5.5.30.0030.05319.32
5.5.20.0070.04719.21
5.5.10.0100.07319.43
5.5.00.0030.04319.45
5.4.450.0030.04019.47
5.4.440.0030.04319.48
5.4.430.0070.07319.45
5.4.420.0100.04019.40
5.4.410.0030.04719.36
5.4.400.0170.06318.90
5.4.390.0070.08019.07
5.4.380.0100.06019.16
5.4.370.0170.04718.93
5.4.360.0070.07319.00
5.4.350.0130.07319.15
5.4.340.0100.04319.00
5.4.320.0070.07718.98
5.4.310.0100.04319.12
5.4.300.0030.08019.14
5.4.290.0070.07019.14
5.4.280.0030.04718.91
5.4.270.0030.04019.24
5.4.260.0100.06719.20
5.4.250.0100.07319.11
5.4.240.0100.07319.24
5.4.230.0070.05018.86
5.4.220.0070.07319.23
5.4.210.0130.05719.23
5.4.200.0100.06719.25
5.4.190.0100.05319.13
5.4.180.0130.04719.16
5.4.170.0070.05319.21
5.4.160.0100.06018.91
5.4.150.0030.06718.83
5.4.140.0070.04316.55
5.4.130.0100.06316.41
5.4.120.0130.06316.45
5.4.110.0030.04016.35
5.4.100.0000.04316.48
5.4.90.0130.07016.45
5.4.80.0100.04716.45
5.4.70.0030.07316.57
5.4.60.0030.04716.34
5.4.50.0100.07316.31
5.4.40.0070.07316.34
5.4.30.0200.02316.47
5.4.20.0030.05316.38
5.4.10.0070.06016.40
5.4.00.0000.04315.84
5.3.290.0130.05714.72
5.3.280.0200.06714.66
5.3.270.0100.06314.64
5.3.260.0100.07714.68
5.3.250.0030.08014.60
5.3.240.0100.03314.60
5.3.230.0100.05014.65
5.3.220.0030.06314.61
5.3.210.0070.03714.57
5.3.200.0000.07014.56
5.3.190.0070.07314.57
5.3.180.0030.07714.57
5.3.170.0030.08014.48
5.3.160.0030.07714.57
5.3.150.0070.07314.59
5.3.140.0130.07314.64
5.3.130.0070.08314.47
5.3.120.0100.07314.70
5.3.110.0100.07314.55
5.3.100.0070.06714.09
5.3.90.0100.07314.02
5.3.80.0030.07314.17
5.3.70.0100.06714.07
5.3.60.0070.04313.95
5.3.50.0070.04013.96
5.3.40.0030.07713.96
5.3.30.0070.03713.94
5.3.20.0130.07013.62
5.3.10.0070.06013.66
5.3.00.0070.03713.56
5.2.170.0130.04011.15
5.2.160.0070.06311.22
5.2.150.0070.05311.31
5.2.140.0030.06711.14
5.2.130.0070.06011.11
5.2.120.0000.04011.17
5.2.110.0030.04311.20
5.2.100.0100.05011.16
5.2.90.0030.07011.05
5.2.80.0030.04711.14
5.2.70.0030.06711.15
5.2.60.0070.06311.08
5.2.50.0070.05310.98
5.2.40.0130.05711.03
5.2.30.0000.03711.03
5.2.20.0030.03011.11
5.2.10.0100.05710.92
5.2.00.0070.05710.73
5.1.60.0030.04310.05
5.1.50.0000.05010.15
5.1.40.0070.05010.02
5.1.30.0170.03710.50
5.1.20.0200.01310.50
5.1.10.0000.03010.11
5.1.00.0000.05010.18
5.0.50.0030.0308.60
5.0.40.0030.0478.43
5.0.30.0000.0478.22
5.0.20.0030.0378.20
5.0.10.0100.0238.22
5.0.00.0070.0378.07
4.4.90.0070.0106.25
4.4.80.0030.0376.25
4.4.70.0000.0176.25
4.4.60.0030.0376.25
4.4.50.0000.0376.25
4.4.40.0000.0476.25
4.4.30.0030.0336.25
4.4.20.0030.0176.25
4.4.10.0000.0276.25
4.4.00.0000.0576.25
4.3.110.0000.0336.25
4.3.100.0000.0206.25
4.3.90.0000.0336.25
4.3.80.0000.0536.25
4.3.70.0000.0336.25
4.3.60.0030.0376.25
4.3.50.0030.0306.25
4.3.40.0030.0476.25
4.3.30.0000.0406.25
4.3.20.0000.0306.25
4.3.10.0030.0336.25
4.3.00.0030.0306.25

preferences:
53.74 ms | 401 KiB | 5 Q