3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = ' some content here <a href="/uploads/2014/04/Draft-99990-Details.doc">Draft 99995 Details</a> more text here <a href="/uploads/2014/04/01090-vs-G01010-series.pdf">01095 vs G01015 Series</a> and some final text here '; $dom = new DOMDocument; $dom->loadHTML($html); $replacement = 'FOO'; foreach ($dom->getElementsByTagName('a') as $node) { $href = $node->getAttribute('href'); $node->setAttribute('href', preg_replace('/([a-z])?\d{5}/i', $replacement, $href)); } $html = preg_replace('~<(?:!DOCTYPE|/?(?:html|body))[^>]*>\s*~i', '', $dom->saveHTML()); echo $html;

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.0060.00916.88
8.3.50.0070.01218.77
8.3.40.0160.00319.34
8.3.30.0110.00319.15
8.3.20.0040.00419.15
8.3.10.0030.00620.88
8.3.00.0060.00319.75
8.2.180.0150.00316.75
8.2.170.0140.00722.96
8.2.160.0080.00819.14
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0090.00019.22
8.2.110.0070.00321.27
8.2.100.0060.00618.22
8.2.90.0060.00319.88
8.2.80.0040.00419.41
8.2.70.0000.01118.25
8.2.60.0060.00318.15
8.2.50.0050.00318.07
8.2.40.0000.00818.40
8.2.30.0030.00518.40
8.2.20.0030.00618.00
8.2.10.0070.00018.06
8.2.00.0030.00618.27
8.1.280.0070.00725.92
8.1.270.0000.00923.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.00322.54
8.1.230.0070.00421.40
8.1.220.0040.00418.05
8.1.210.0030.00820.79
8.1.200.0100.00017.73
8.1.190.0000.00817.78
8.1.180.0030.00618.10
8.1.170.0000.00819.16
8.1.160.0060.00319.24
8.1.150.0080.00019.03
8.1.140.0000.00717.88
8.1.130.0030.00318.20
8.1.120.0020.00517.90
8.1.110.0000.00817.85
8.1.100.0070.00017.89
8.1.90.0040.00417.90
8.1.80.0040.00417.81
8.1.70.0070.00017.79
8.1.60.0060.00318.00
8.1.50.0030.00517.87
8.1.40.0050.00317.87
8.1.30.0020.00518.01
8.1.20.0000.00818.03
8.1.10.0040.00417.93
8.1.00.0000.00817.96
8.0.300.0050.00220.21
8.0.290.0000.00917.13
8.0.280.0030.00618.64
8.0.270.0030.00517.64
8.0.260.0030.00317.31
8.0.250.0000.00717.35
8.0.240.0030.00317.38
8.0.230.0030.00317.30
8.0.220.0000.00717.29
8.0.210.0080.00017.29
8.0.200.0000.00617.32
8.0.190.0000.00817.28
8.0.180.0050.00217.38
8.0.170.0030.00617.20
8.0.160.0000.00717.34
8.0.150.0000.00817.12
8.0.140.0100.00017.23
8.0.130.0030.00313.74
8.0.120.0030.00517.28
8.0.110.0000.00717.38
8.0.100.0040.00417.30
8.0.90.0000.00817.15
8.0.80.0100.00717.27
8.0.70.0000.00717.32
8.0.60.0070.00017.27
8.0.50.0050.00317.22
8.0.30.0120.00917.20
8.0.20.0120.00617.45
8.0.10.0000.00917.53
8.0.00.0150.00617.18
7.4.330.0000.00513.35
7.4.320.0030.00317.00
7.4.300.0070.00016.90
7.4.290.0030.00317.03
7.4.280.0030.00517.06
7.4.270.0030.00317.07
7.4.260.0030.00313.72
7.4.250.0060.00317.03
7.4.240.0000.00716.99
7.4.230.0000.00717.05
7.4.220.0150.00917.11
7.4.210.0180.00417.11
7.4.200.0080.00017.09
7.4.190.0070.00016.81
7.4.160.0140.00317.19
7.4.150.0070.01317.02
7.4.140.0090.00916.69
7.4.130.0100.01017.03
7.4.120.0160.00317.05
7.4.110.0080.01217.05
7.4.100.0130.00316.83
7.4.90.0120.00617.04
7.4.80.0070.01016.96
7.4.70.0150.00317.00
7.4.60.0100.01116.94
7.4.50.0050.00016.91
7.4.40.0100.00716.68
7.4.30.0060.00916.73
7.4.00.0000.00915.38
7.3.330.0030.00313.61
7.3.320.0050.00513.39
7.3.310.0000.00716.73
7.3.300.0070.00016.70
7.3.290.0070.00916.71
7.3.280.0080.01216.66
7.3.270.0120.00416.65
7.3.260.0150.00417.09
7.3.250.0080.01016.93
7.3.240.0110.01217.08
7.3.230.0100.01317.05
7.3.210.0120.00617.04
7.3.200.0180.00619.39
7.3.190.0030.02016.75
7.3.180.0130.00416.95
7.3.170.0140.00716.77
7.3.160.0070.01016.97
7.3.120.0060.00615.36
7.2.330.0090.00917.13
7.2.320.0160.00717.05
7.2.310.0110.01417.05
7.2.300.0120.00617.26
7.2.290.0100.00717.18
7.2.60.0060.00917.27
7.1.200.0120.00416.05
7.1.70.0000.00817.39
7.1.60.0160.00919.31
7.1.50.0060.01617.17
7.1.00.0030.03722.45
7.0.200.0490.00715.09
7.0.140.0030.07322.14
7.0.120.0000.03722.13
7.0.60.0030.09020.10
7.0.50.0030.05017.94
7.0.40.0070.03717.81
7.0.30.0000.05317.87
7.0.20.0100.06017.82
7.0.10.0070.07317.73
7.0.00.0070.04017.82
5.6.280.0000.07721.05
5.6.210.0100.08020.55
5.6.200.0030.07318.23
5.6.190.0030.04718.15
5.6.180.0070.07318.25
5.6.170.0070.08018.23
5.6.160.0070.08018.25
5.6.150.0100.05018.23
5.6.140.0000.08718.24
5.6.130.0100.05018.25
5.6.120.0070.08018.20
5.6.110.0070.06318.22
5.6.100.0170.07018.21
5.6.90.0070.08018.17
5.6.80.0030.06717.64
5.6.70.0030.08317.58
5.6.60.0100.04017.65
5.6.50.0100.04017.64
5.6.40.0100.06717.51
5.6.30.0030.08017.66
5.6.20.0030.08017.58
5.6.10.0000.05717.58
5.6.00.0030.05317.61
5.5.350.0230.06020.31
5.5.340.0030.05318.09
5.5.330.0000.04318.06
5.5.320.0170.05018.06
5.5.310.0100.07718.05
5.5.300.0070.08018.09
5.5.290.0130.07718.08
5.5.280.0070.07018.02
5.5.270.0070.08318.09
5.5.260.0070.06718.07
5.5.250.0030.08317.73
5.5.240.0100.06717.41
5.5.230.0030.08017.42
5.5.220.0130.07317.41
5.5.210.0070.03717.38
5.5.200.0070.06317.41
5.5.190.0070.06717.39
5.5.180.0070.05717.45
5.5.160.0070.04717.34
5.5.150.0070.08017.33
5.5.140.0130.07017.37
5.5.130.0100.07317.44
5.5.120.0100.07717.39
5.5.110.0100.07317.34
5.5.100.0070.04017.31
5.5.90.0030.08317.27
5.5.80.0070.06317.34
5.5.70.0130.07317.27
5.5.60.0070.06717.34
5.5.50.0070.07317.19
5.5.40.0100.07017.32
5.5.30.0070.08017.23
5.5.20.0100.06017.18
5.5.10.0070.06017.22
5.5.00.0070.07717.33
5.4.450.0100.08019.39
5.4.440.0100.03319.41
5.4.430.0030.04019.42
5.4.420.0070.05319.40
5.4.410.0030.04319.29
5.4.400.0030.07018.91
5.4.390.0070.07319.06
5.4.380.0170.06319.11
5.4.370.0100.03319.11
5.4.360.0070.07318.97
5.4.350.0100.07018.96
5.4.340.0100.05319.10
5.4.320.0100.03719.06
5.4.310.0100.07019.09
5.4.300.0070.08019.16
5.4.290.0170.07019.11
5.4.280.0070.07019.05
5.4.270.0100.04719.28
5.4.260.0070.06319.07
5.4.250.0030.07319.10
5.4.240.0000.07719.09
5.4.230.0030.06019.09
5.4.220.0030.05019.18
5.4.210.0130.07018.89
5.4.200.0030.06719.18
5.4.190.0130.07019.18
5.4.180.0070.06719.09
5.4.170.0030.08719.19
5.4.160.0070.06018.95
5.4.150.0030.04319.08
5.4.140.0070.06316.61
5.4.130.0100.07016.50
5.4.120.0030.08016.38
5.4.110.0000.06016.48
5.4.100.0030.04716.41
5.4.90.0000.05316.41
5.4.80.0100.06316.41
5.4.70.0000.07716.47
5.4.60.0030.05316.52
5.4.50.0070.06716.36
5.4.40.0130.07316.53
5.4.30.0070.07716.50
5.4.20.0070.05016.38
5.4.10.0030.07716.42
5.4.00.0100.05715.73
5.3.290.0070.03714.82
5.3.280.0070.04714.45
5.3.270.0100.07714.64
5.3.260.0100.07714.62
5.3.250.0030.05314.76
5.3.240.0100.06714.66
5.3.230.0070.08014.64
5.3.220.0070.07714.60
5.3.210.0070.06714.59
5.3.200.0000.05714.63
5.3.190.0070.08014.63
5.3.180.0070.07014.52
5.3.170.0000.04714.63
5.3.160.0100.07714.61
5.3.150.0030.05714.57
5.3.140.0070.07314.61
5.3.130.0030.07714.60
5.3.120.0100.07314.63
5.3.110.0100.07714.59
5.3.100.0000.08014.10
5.3.90.0130.03713.87
5.3.80.0030.08014.08
5.3.70.0100.05014.02
5.3.60.0070.05314.03
5.3.50.0000.04713.99
5.3.40.0030.08013.96
5.3.30.0070.07713.93
5.3.20.0100.05713.73
5.3.10.0030.05013.80
5.3.00.0100.06313.49
5.2.170.0030.05011.17
5.2.160.0100.05311.21
5.2.150.0030.04711.19
5.2.140.0070.06011.25
5.2.130.0070.06011.17
5.2.120.0070.05311.20
5.2.110.0030.06311.13
5.2.100.0070.05711.17
5.2.90.0100.05311.32
5.2.80.0130.03011.19
5.2.70.0030.06711.00
5.2.60.0030.04311.07
5.2.50.0200.05311.12
5.2.40.0000.04710.91
5.2.30.0130.05310.88
5.2.20.0070.03011.08
5.2.10.0000.05710.83
5.2.00.0100.03010.82
5.1.60.0130.0439.97
5.1.50.0030.0339.97
5.1.40.0000.02710.09
5.1.30.0030.03310.44
5.1.20.0000.02710.32
5.1.10.0000.02710.19
5.1.00.0100.01710.16
5.0.50.0030.0208.65
5.0.40.0000.0208.51
5.0.30.0070.0278.43
5.0.20.0000.0208.37
5.0.10.0030.0178.23
5.0.00.0030.0278.21
4.4.90.0030.0337.72
4.4.80.0030.0207.72
4.4.70.0000.0407.72
4.4.60.0030.0277.72
4.4.50.0000.0377.72
4.4.40.0000.0407.72
4.4.30.0000.0207.72
4.4.20.0000.0207.72
4.4.10.0000.0177.72
4.4.00.0000.0237.72
4.3.110.0070.0107.72
4.3.100.0000.0137.72
4.3.90.0030.0107.72
4.3.80.0000.0237.72
4.3.70.0070.0107.72
4.3.60.0000.0137.72
4.3.50.0000.0307.72
4.3.40.0000.0237.72
4.3.30.0000.0177.72
4.3.20.0000.0207.72
4.3.10.0000.0137.72
4.3.00.0000.0177.72

preferences:
66.78 ms | 400 KiB | 5 Q