3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<EOF this is the <a href='#'>test link</a> here and <a href='#'>there</a>. EOF; $dom = new DOMDocument(); $dom->loadHTML($html); $atags=$dom->getElementsByTagName('a'); foreach($atags as $atag) { $text = $atag->firstChild->cloneNode(); $r = $atag->parentNode->replaceChild($text, $atag); } echo $dom->saveHTML();

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.0080.00818.68
8.3.50.0110.00322.13
8.3.40.0150.00019.09
8.3.30.0110.00419.06
8.3.20.0060.00318.90
8.3.10.0050.00321.21
8.3.00.0030.00623.89
8.2.180.0060.01225.92
8.2.170.0060.00922.96
8.2.160.0140.00720.52
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0040.00420.04
8.2.110.0060.00622.50
8.2.100.0040.00817.97
8.2.90.0040.00419.38
8.2.80.0040.00418.29
8.2.70.0080.00017.88
8.2.60.0030.00618.16
8.2.50.0030.01018.07
8.2.40.0000.00818.47
8.2.30.0040.00421.46
8.2.20.0040.00417.77
8.2.10.0000.00818.17
8.2.00.0000.00718.18
8.1.280.0070.00725.92
8.1.270.0000.00723.99
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00322.61
8.1.230.0000.01121.14
8.1.220.0000.00918.77
8.1.210.0090.00319.20
8.1.200.0000.00817.60
8.1.190.0000.00817.66
8.1.180.0000.00818.10
8.1.170.0030.00518.82
8.1.160.0030.00619.18
8.1.150.0050.00318.90
8.1.140.0040.00417.74
8.1.130.0000.00817.99
8.1.120.0040.00417.72
8.1.110.0050.00317.66
8.1.100.0050.00317.62
8.1.90.0050.00217.63
8.1.80.0050.00317.63
8.1.70.0030.00317.62
8.1.60.0030.00617.86
8.1.50.0050.00217.74
8.1.40.0060.00317.70
8.1.30.0020.00517.75
8.1.20.0000.00917.84
8.1.10.0000.00717.80
8.1.00.0050.00217.79
8.0.300.0060.00620.10
8.0.290.0070.00017.30
8.0.280.0000.00718.54
8.0.270.0040.00417.39
8.0.260.0060.00316.97
8.0.250.0000.00817.25
8.0.240.0000.00817.27
8.0.230.0000.00717.23
8.0.220.0030.00617.25
8.0.210.0030.00617.13
8.0.200.0000.00717.24
8.0.190.0000.00817.22
8.0.180.0000.00717.22
8.0.170.0040.00417.21
8.0.160.0040.00417.12
8.0.150.0000.00717.00
8.0.140.0050.00517.02
8.0.130.0050.00013.59
8.0.120.0040.00417.08
8.0.110.0030.00517.18
8.0.100.0080.00017.13
8.0.90.0040.00417.27
8.0.80.0000.01417.07
8.0.70.0070.00316.93
8.0.60.0040.00416.99
8.0.50.0030.00717.16
8.0.30.0100.00917.48
8.0.20.0090.01217.43
8.0.10.0020.00517.33
8.0.00.0050.01317.08
7.4.330.0050.00014.86
7.4.320.0030.00316.88
7.4.300.0000.00616.69
7.4.290.0000.00816.72
7.4.280.0070.00016.68
7.4.270.0040.00416.76
7.4.260.0030.00313.64
7.4.250.0000.00816.63
7.4.240.0040.00416.82
7.4.230.0050.00216.52
7.4.220.0100.01616.84
7.4.210.0060.00916.85
7.4.200.0070.00016.90
7.4.190.0000.00717.02
7.4.160.0100.01016.84
7.4.150.0180.00317.40
7.4.140.0120.00817.86
7.4.130.0090.01016.91
7.4.120.0100.00616.69
7.4.110.0100.00716.58
7.4.100.0060.01216.56
7.4.90.0060.01416.96
7.4.80.0090.00619.39
7.4.70.0110.01116.66
7.4.60.0120.00616.93
7.4.50.0000.01016.62
7.4.40.0060.00922.52
7.4.30.0080.00816.48
7.4.00.0000.01314.93
7.3.330.0000.00513.41
7.3.320.0050.00013.31
7.3.310.0030.00316.43
7.3.300.0040.00416.43
7.3.290.0080.01116.56
7.3.280.0080.01016.56
7.3.270.0150.00317.40
7.3.260.0110.00718.24
7.3.250.0150.00616.68
7.3.240.0060.00916.54
7.3.230.0100.01016.82
7.3.210.0070.01016.80
7.3.200.0090.01319.39
7.3.190.0100.01016.45
7.3.180.0060.00916.81
7.3.170.0030.01316.61
7.3.160.0100.01016.52
7.3.120.0130.00314.95
7.2.330.0300.02816.88
7.2.320.0070.01016.98
7.2.310.0110.00716.87
7.2.300.0060.00916.76
7.2.290.0180.00416.74
7.2.60.0060.00917.18
7.2.00.0030.00919.46
7.1.200.0060.00615.86
7.1.100.0060.01018.00
7.1.70.0000.00717.01
7.1.60.0140.01019.40
7.1.50.0000.01716.91
7.1.00.0030.07022.52
7.0.200.0070.00017.05
7.0.140.0100.06722.06
7.0.60.0030.04321.78
7.0.50.0000.04717.84
7.0.40.0030.04320.20
7.0.30.0230.05020.26
7.0.20.0230.03720.11
7.0.10.0070.08020.25
7.0.00.0170.07320.28
5.6.280.0130.06020.99
5.6.210.0100.08020.66
5.6.200.0130.07718.30
5.6.190.0030.06320.66
5.6.180.0230.08320.66
5.6.170.0400.07020.60
5.6.160.0130.08320.55
5.6.150.0100.05718.23
5.6.140.0000.06718.19
5.6.130.0130.07718.28
5.6.120.0170.06720.94
5.6.110.0170.07721.03
5.6.100.0000.09021.17
5.6.90.0130.08021.18
5.6.80.0170.05320.47
5.5.350.0070.04720.41
5.5.340.0100.08318.03
5.5.330.0270.06720.37
5.5.320.0600.07020.35
5.5.310.0300.07320.49
5.5.300.0030.05317.95
5.5.290.0030.06018.05
5.5.280.0130.05020.80
5.5.270.0170.06720.69
5.5.260.0130.07720.93
5.5.250.0170.07020.48
5.5.240.0130.05720.27
5.4.450.3930.04019.57
5.4.440.3130.04319.57
5.4.430.3700.04019.28
5.4.420.4070.04319.51
5.4.410.3970.03719.34
5.4.400.3770.03718.97
5.4.390.3830.03719.24
5.4.380.3870.04319.27
5.4.370.4500.05019.05
5.4.360.4070.04318.97
5.4.350.3970.03719.01
5.4.340.3400.03319.04
5.4.320.3470.04019.16
5.4.310.4130.03019.28
5.4.300.4630.04019.23
5.4.290.4130.03319.12
5.4.280.4530.04719.14
5.4.270.4600.04019.11
5.4.260.4400.04319.23
5.4.250.3830.03019.30
5.4.240.3800.03719.18
5.4.230.3670.03319.11
5.4.220.5900.03719.15
5.4.210.3730.03719.11
5.4.200.2330.04019.16
5.4.190.0030.08019.33
5.4.180.5700.04019.05
5.4.170.4400.03719.11
5.4.160.2470.03319.09
5.4.150.2170.04019.10
5.4.140.1870.03016.47
5.4.130.3500.03716.47
5.4.120.3830.03016.41
5.4.110.2500.03316.38
5.4.100.3130.04316.55
5.4.90.2530.04316.32
5.4.80.0030.03716.68
5.4.70.3600.02716.46
5.4.60.3230.03716.33
5.4.50.3230.03316.67
5.4.40.3770.03016.29
5.4.30.3600.03716.33
5.4.20.3770.04016.35
5.4.10.3900.04016.45
5.4.00.3700.03715.92
5.3.290.3770.03714.64
5.3.280.4500.03314.49
5.3.270.4830.03714.56
5.3.260.3730.03014.64
5.3.250.2070.02714.66
5.3.240.3200.03714.63
5.3.230.3670.03314.50
5.3.220.4070.04014.66
5.3.210.3700.03714.59
5.3.200.2630.04014.61
5.3.190.0030.03714.63
5.3.180.0030.04014.56
5.3.170.1730.04014.57
5.3.160.3030.03314.59
5.3.150.3400.03714.58
5.3.140.3530.03714.61
5.3.130.3900.03714.62
5.3.120.3030.04014.56
5.3.110.3930.03314.58
5.3.100.3970.04014.05
5.3.90.3700.04013.99
5.3.80.4270.04314.12
5.3.70.4700.02714.02
5.3.60.3970.03714.11
5.3.50.3830.03313.96
5.3.40.4230.04313.84
5.3.30.3900.04313.96
5.3.20.3770.03313.69
5.3.10.4070.06313.67
5.3.00.3830.03313.53
5.2.170.3330.03011.10
5.2.160.3270.03011.22
5.2.150.3000.03011.22
5.2.140.3200.03311.20
5.2.130.2830.02011.17
5.2.120.3430.03011.04
5.2.110.3300.02711.10
5.2.100.3030.03011.08
5.2.90.3570.02711.11
5.2.80.3030.03011.13
5.2.70.3570.04011.14
5.2.60.3200.03711.11
5.2.50.3830.03010.91
5.2.40.3230.03311.00
5.2.30.2970.03311.02
5.2.20.2830.02711.04
5.2.10.2570.02710.98
5.2.00.2830.02310.80
5.1.60.2730.02710.06
5.1.50.2770.02710.07
5.1.40.2470.02010.11
5.1.30.2670.02010.41
5.1.20.2470.02310.58
5.1.10.2730.03010.12
5.1.00.2430.02710.29
5.0.50.1300.0208.63
5.0.40.1530.0238.52
5.0.30.1500.0278.30
5.0.20.1470.0208.19
5.0.10.1800.0138.29
5.0.00.1800.0338.38
4.4.90.1400.0175.92
4.4.80.1430.0205.83
4.4.70.1400.0175.79
4.4.60.1330.0175.77
4.4.50.1430.0175.90
4.4.40.1400.0335.90
4.4.30.1270.0175.82
4.4.20.1200.0175.91
4.4.10.1200.0205.87
4.4.00.1330.0205.84
4.3.110.1670.0175.84
4.3.100.1800.0135.80
4.3.90.1630.0135.71
4.3.80.1870.0305.76
4.3.70.1730.0135.68
4.3.60.1970.0135.80
4.3.50.1600.0135.79
4.3.40.1770.0275.73
4.3.30.0870.0175.67
4.3.20.0870.0105.67
4.3.10.1030.0175.67
4.3.00.0730.0175.68

preferences:
54.35 ms | 401 KiB | 5 Q