3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument; $xpath = new DOMXPath($doc); $frag = $doc->createDocumentFragment(); $frag->appendXML(' <div id="article"> <p>Some text</p> <p>More text</p> <pre><code> echo $variable; </code></pre> </div> '); $text_nodes = $xpath->query('descendant::text()[not(ancestor::pre)]', $frag); foreach ($text_nodes as $text_node) { $text_node->data = strrev($text_node->data); } echo $doc->saveHTML($frag);

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.40.0040.01219.15
8.3.30.0110.00319.23
8.3.20.0030.00619.15
8.3.10.0040.00419.59
8.3.00.0060.00322.11
8.2.170.0080.00822.96
8.2.160.0110.00420.63
8.2.150.0090.00624.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00320.16
8.2.110.0100.00022.70
8.2.100.0080.00418.09
8.2.90.0090.00018.53
8.2.80.0040.00418.47
8.2.70.0050.00317.88
8.2.60.0040.00418.00
8.2.50.0030.00618.00
8.2.40.0050.00319.63
8.2.30.0000.00820.15
8.2.20.0040.00418.02
8.2.10.0040.00418.05
8.2.00.0050.00318.18
8.1.270.0080.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00024.30
8.1.230.0090.00321.27
8.1.220.0060.00318.14
8.1.210.0060.00318.92
8.1.200.0080.00017.85
8.1.190.0040.00417.72
8.1.180.0030.00518.10
8.1.170.0040.00417.85
8.1.160.0000.00819.25
8.1.150.0040.00419.06
8.1.140.0000.00717.82
8.1.130.0000.00818.24
8.1.120.0040.00317.91
8.1.110.0080.00017.90
8.1.100.0000.00917.70
8.1.90.0030.00617.83
8.1.80.0000.00817.93
8.1.70.0030.00317.77
8.1.60.0000.00718.03
8.1.50.0000.00817.95
8.1.40.0000.00817.95
8.1.30.0040.00418.07
8.1.20.0030.00518.07
8.1.10.0040.00418.05
8.1.00.0000.00817.76
8.0.300.0000.00820.13
8.0.290.0000.00717.00
8.0.280.0020.00518.75
8.0.270.0000.00817.54
8.0.260.0030.00717.18
8.0.250.0020.00517.36
8.0.240.0040.00417.38
8.0.230.0030.00517.30
8.0.220.0000.00717.32
8.0.210.0030.00617.17
8.0.200.0060.00017.23
8.0.190.0070.00017.24
8.0.180.0040.00417.14
8.0.170.0070.00017.23
8.0.160.0000.00817.41
8.0.150.0030.00517.25
8.0.140.0000.00717.13
8.0.130.0030.00313.59
8.0.120.0000.00717.13
8.0.110.0040.00417.26
8.0.100.0000.00717.20
8.0.90.0040.00417.09
8.0.80.0130.00717.16
8.0.70.0040.00417.14
8.0.60.0000.00717.14
8.0.50.0040.00417.31
8.0.30.0090.00917.37
8.0.20.0110.01317.50
8.0.10.0050.00217.32
8.0.00.0090.00916.94
7.4.330.0000.00515.04
7.4.320.0050.00216.99
7.4.300.0030.00316.88
7.4.290.0050.00316.90
7.4.280.0000.00816.86
7.4.270.0040.00416.94
7.4.260.0050.00013.64
7.4.250.0000.00816.92
7.4.240.0030.00317.03
7.4.230.0070.00016.87
7.4.220.0060.01216.78
7.4.210.0020.01516.92
7.4.200.0000.00716.96
7.4.190.0000.00716.93
7.4.160.0040.01216.68
7.4.150.0130.00617.40
7.4.140.0100.01017.86
7.4.130.0100.00716.76
7.4.120.0140.00316.93
7.4.110.0100.00816.80
7.4.100.0090.01216.94
7.4.90.0090.00916.79
7.4.80.0140.00319.37
7.4.70.0100.00616.80
7.4.60.0090.00916.76
7.4.50.0030.00616.96
7.4.40.0080.00822.52
7.4.30.0090.00916.78
7.4.00.0060.01015.13
7.3.330.0030.00313.54
7.3.320.0060.00013.39
7.3.310.0040.00416.72
7.3.300.0030.00316.52
7.3.290.0090.00616.59
7.3.280.0070.01016.63
7.3.270.0100.00717.40
7.3.260.0100.01018.24
7.3.250.0110.00616.72
7.3.240.0120.00616.78
7.3.230.0120.00616.63
7.3.210.0080.00816.64
7.3.200.0070.01619.39
7.3.190.0090.00916.93
7.3.180.0130.00316.95
7.3.170.0090.00917.01
7.3.160.0100.00616.66
7.3.120.0100.00514.82
7.3.110.0030.01415.11
7.3.100.0030.01215.01
7.3.90.0030.00915.10
7.3.80.0040.00715.18
7.3.70.0070.00714.77
7.3.60.0030.01014.75
7.3.50.0090.00315.11
7.3.40.0050.00514.96
7.3.30.0060.00915.07
7.3.20.0040.01116.73
7.3.10.0060.00616.79
7.3.00.0060.00916.79
7.2.330.0100.00717.09
7.2.320.0070.01117.04
7.2.310.0110.00716.88
7.2.300.0040.01317.11
7.2.290.0000.01617.25
7.2.250.0110.00415.28
7.2.240.0090.00915.26
7.2.230.0090.00615.08
7.2.220.0100.00715.12
7.2.210.0110.00415.41
7.2.200.0070.00315.34
7.2.190.0100.00715.06
7.2.180.0080.00815.24
7.2.170.0000.01215.28
7.2.60.0060.01016.65
7.2.00.0100.00319.76
7.1.330.0080.00415.89
7.1.320.0000.01415.80
7.1.310.0040.01115.96
7.1.300.0100.00616.02
7.1.290.0070.01115.69
7.1.280.0070.00716.05
7.1.270.0110.00415.79
7.1.260.0080.00616.09
7.1.200.0200.00415.61
7.1.100.0000.01118.43
7.1.70.0030.00717.52
7.1.60.0140.01019.40
7.1.50.0090.01217.16
7.1.00.0000.07022.68
7.0.200.0030.00516.99
7.0.140.0000.07722.29
7.0.60.0200.05321.98
7.0.50.0270.07322.23
7.0.40.0200.08020.20
7.0.30.0170.06720.17
7.0.20.0230.07320.20
7.0.10.0200.07320.20
7.0.00.0170.06720.13
5.6.280.0100.06721.03
5.6.210.0200.07720.79
5.6.200.0230.07021.31
5.6.190.0230.07021.23
5.6.180.0130.04321.17
5.6.170.0200.08321.24
5.6.160.0270.05721.20
5.6.150.0230.04721.17
5.6.140.0270.07721.07
5.6.130.0300.07721.24
5.6.120.0300.07021.23
5.6.110.0200.06021.25
5.6.100.0170.06321.25
5.6.90.0230.07321.23
5.6.80.0230.06720.66
5.6.70.0200.06720.62
5.6.60.0200.07720.54
5.6.50.0130.04720.55
5.6.40.0130.04020.63
5.6.30.0200.03720.54
5.6.20.0130.03320.52
5.6.10.0170.03020.47
5.6.00.0100.03720.52
5.5.350.0300.07320.48
5.5.340.0100.05020.92
5.5.330.0270.05721.09
5.5.320.0170.06020.99
5.5.310.0170.05021.05
5.5.300.0230.07020.96
5.5.290.0230.06020.99
5.5.280.0270.08021.02
5.5.270.0270.07321.04
5.5.260.0200.08020.97
5.5.250.0300.07020.64
5.5.240.0230.07320.38
5.5.230.0200.06020.30
5.5.220.0330.07020.29
5.5.210.0400.05720.29
5.5.200.0200.07320.31
5.5.190.0230.03320.20
5.5.180.0230.03320.25
5.5.160.0200.03020.22
5.5.150.0130.03720.48
5.5.140.0230.03720.32
5.5.130.0130.04020.18
5.5.120.0130.04320.34
5.5.110.0170.04320.32
5.5.100.0100.03320.09
5.5.90.0130.03020.19
5.5.80.0230.03020.17
5.5.70.0100.03720.14
5.5.60.0170.02720.28
5.5.50.0100.03320.17
5.5.40.0070.03720.23
5.5.30.0200.02720.31
5.5.20.0130.03720.19
5.5.10.0130.03020.28
5.5.00.0100.03320.25
5.4.450.0200.07719.63
5.4.440.0230.07719.57
5.4.430.0230.06319.63
5.4.420.0200.05319.48
5.4.410.0300.06319.20
5.4.400.0230.06719.35
5.4.390.0270.06319.21
5.4.380.0300.07019.39
5.4.370.0200.06719.26
5.4.360.0200.04319.24
5.4.350.0200.03719.08
5.4.340.0170.03719.07
5.4.320.0200.03319.25
5.4.310.0170.03719.26
5.4.300.0130.03319.11
5.4.290.0130.03019.30
5.4.280.0170.03719.40
5.4.270.0130.04019.11
5.4.260.0170.03719.29
5.4.250.0170.03019.11
5.4.240.0070.03719.11
5.4.230.0170.02719.07
5.4.220.0070.03719.15
5.4.210.0130.03019.25
5.4.200.0130.03019.14
5.4.190.0130.03019.13
5.4.180.0100.03319.12
5.4.170.0130.03719.30
5.4.160.0170.03319.03
5.4.150.0170.03719.24
5.4.140.0100.03016.64
5.4.130.0170.04716.54
5.4.120.0270.06316.53
5.4.110.0200.06716.51
5.4.100.0230.06016.65
5.4.90.0130.05016.75
5.4.80.0300.06716.50
5.4.70.0170.07716.50
5.4.60.0130.06316.58
5.4.50.0170.05316.61
5.4.40.0270.06716.48
5.4.30.0200.07316.42
5.4.20.0230.06716.48
5.4.10.0230.06016.71
5.4.00.0170.07715.77
5.3.290.0170.03714.80
5.3.280.0100.03314.73
5.3.270.0130.03014.79
5.3.260.0100.03314.66
5.3.250.0200.03314.73
5.3.240.0170.02714.74
5.3.230.0200.07014.76
5.3.220.0270.07014.80
5.3.210.0200.07714.61
5.3.200.0230.07314.66
5.3.190.0130.06714.67
5.3.180.0200.03714.70
5.3.170.0130.07314.78
5.3.160.0230.06014.78
5.3.150.0270.07014.72
5.3.140.0300.06314.62
5.3.130.0200.07314.69
5.3.120.0200.07714.65
5.3.110.0200.07314.55
5.3.100.0200.07314.23
5.3.90.0270.05014.18
5.3.80.0130.04714.15
5.3.70.0200.06314.10
5.3.60.0230.06714.14
5.3.50.0230.06714.04
5.3.40.0230.06714.13
5.3.30.0200.06714.04
5.3.20.0130.08013.84
5.3.10.0230.07313.84
5.3.00.0300.06313.84
5.2.170.0200.06013.84
5.2.160.0100.06313.84
5.2.150.0170.06013.84
5.2.140.0200.06013.84
5.2.130.0100.06713.84
5.2.120.0170.05713.84
5.2.110.0170.05013.84
5.2.100.0130.04713.84
5.2.90.0170.05313.84
5.2.80.0170.06013.84
5.2.70.0170.05713.84
5.2.60.0130.05313.84
5.2.50.0170.05713.84
5.2.40.0100.06013.84
5.2.30.0100.06713.84
5.2.20.0100.05713.84
5.2.10.0100.04713.84
5.2.00.0170.05713.84
5.1.60.0130.05313.84
5.1.50.0100.05313.84
5.1.40.0070.05313.84
5.1.30.0200.04713.84
5.1.20.0130.05313.84
5.1.10.0100.04013.84
5.1.00.0130.05313.84
5.0.50.0000.04313.84
5.0.40.0030.04013.84
5.0.30.0000.07313.84
5.0.20.0070.03713.84
5.0.10.0070.03313.84
5.0.00.0030.06313.84
4.4.90.0030.03313.84
4.4.80.0030.03313.84
4.4.70.0000.03313.84
4.4.60.0070.02713.84
4.4.50.0000.02713.84
4.4.40.0070.05313.84
4.4.30.0030.03313.84
4.4.20.0000.03713.84
4.4.10.0000.03713.84
4.4.00.0000.05313.84
4.3.110.0000.03713.84
4.3.100.0000.03313.84
4.3.90.0000.03713.84
4.3.80.0000.05313.84
4.3.70.0000.03713.84
4.3.60.0100.02713.84
4.3.50.0030.03313.84
4.3.40.0000.03313.84
4.3.30.0000.03713.84
4.3.20.0070.03313.84
4.3.10.0000.03713.84
4.3.00.0030.03013.84

preferences:
42.59 ms | 400 KiB | 5 Q