3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CustomDOMDocument extends DOMDocument { } function localScope() { $doc = new CustomDOMDocument; $doc->loadHtml('<p>Test123</p>'); $xpath = new DOMXPath($doc); return $xpath; } $doc = new CustomDOMDocument; $doc->loadHtml('<p>Test123</p>'); $xpath = new DOMXPath($doc); var_dump(get_class($xpath->document)); $xpath = new DOMXPath(new CustomDOMDocument); var_dump(get_class($xpath->document)); $xpath = localScope(); var_dump(get_class($xpath->document));

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.70.0130.00918.68
8.3.60.0090.00617.00
8.3.50.0190.01222.30
8.3.40.0040.01119.03
8.3.30.0070.00719.13
8.3.20.0070.00022.11
8.3.10.0080.00020.54
8.3.00.0040.00421.93
8.2.190.0110.00716.84
8.2.180.0000.01417.13
8.2.170.0150.00019.16
8.2.160.0100.00722.96
8.2.150.0080.00024.18
8.2.140.0040.00724.66
8.2.130.0040.00426.16
8.2.120.0120.00021.56
8.2.110.0060.00320.65
8.2.100.0040.00818.11
8.2.90.0040.00417.88
8.2.80.0030.00519.08
8.2.70.0040.00418.16
8.2.60.0060.00318.47
8.2.50.0050.00318.10
8.2.40.0040.00419.53
8.2.30.0070.00019.56
8.2.20.0000.00818.40
8.2.10.0040.00418.36
8.2.00.0080.00017.92
8.1.280.0170.00325.92
8.1.270.0000.00922.33
8.1.260.0000.00826.35
8.1.250.0170.00328.09
8.1.240.0000.00920.93
8.1.230.0030.00818.08
8.1.220.0080.00017.76
8.1.210.0000.00818.77
8.1.200.0070.00417.60
8.1.190.0000.00917.47
8.1.180.0090.00318.10
8.1.170.0040.00418.95
8.1.160.0040.00419.25
8.1.150.0060.00319.17
8.1.140.0040.00419.85
8.1.130.0030.00317.88
8.1.120.0000.00717.77
8.1.110.0000.00717.80
8.1.100.0070.00017.66
8.1.90.0040.00417.71
8.1.80.0040.00417.62
8.1.70.0040.00417.65
8.1.60.0030.00517.88
8.1.50.0000.00817.90
8.1.40.0050.00317.82
8.1.30.0040.00417.90
8.1.20.0050.00317.94
8.1.10.0000.00917.85
8.1.00.0040.00417.89
8.0.300.0030.00518.77
8.0.290.0020.00516.88
8.0.280.0000.00718.72
8.0.270.0000.00716.99
8.0.260.0070.00017.70
8.0.250.0000.00817.25
8.0.240.0030.00317.24
8.0.230.0000.00717.20
8.0.220.0110.00017.14
8.0.210.0000.00817.04
8.0.200.0000.00717.21
8.0.190.0030.00517.11
8.0.180.0020.00517.18
8.0.170.0000.00717.04
8.0.160.0060.00317.20
8.0.150.0000.00717.09
8.0.140.0040.00417.00
8.0.130.0000.00713.57
8.0.120.0080.00017.07
8.0.110.0000.00817.18
8.0.100.0000.00717.12
8.0.90.0060.00317.27
8.0.80.0160.00017.11
8.0.70.0060.00317.15
8.0.60.0040.00417.05
8.0.50.0000.00717.27
8.0.30.0100.00817.56
8.0.20.0140.00817.54
8.0.10.0000.00817.22
8.0.00.0170.00016.79
7.4.330.0060.00015.21
7.4.320.0030.00316.78
7.4.300.0000.00716.96
7.4.290.0080.00016.84
7.4.280.0050.00316.92
7.4.270.0030.00316.98
7.4.260.0040.00416.92
7.4.250.0000.00716.68
7.4.240.0000.00716.89
7.4.230.0040.00417.02
7.4.220.0120.01216.89
7.4.210.0060.00916.79
7.4.200.0030.00316.70
7.4.160.0070.00916.88
7.4.150.0220.00317.40
7.4.140.0090.01217.86
7.4.130.0100.00816.94
7.4.120.0090.01116.94
7.4.110.0060.01216.85
7.4.100.0100.01016.87
7.4.90.0070.01016.73
7.4.80.0030.01419.39
7.4.70.0130.00316.94
7.4.60.0100.00616.73
7.4.50.0070.00716.80
7.4.40.0060.00916.59
7.4.30.0080.00816.82
7.4.00.0040.00815.20
7.3.330.0030.00313.39
7.3.320.0050.00013.54
7.3.310.0030.00516.62
7.3.300.0000.00716.62
7.3.290.0070.00916.58
7.3.280.0100.01016.59
7.3.270.0080.00817.40
7.3.260.0020.01616.69
7.3.250.0110.01016.64
7.3.240.0080.01016.93
7.3.230.0020.01516.61
7.3.210.0100.01316.83
7.3.200.0100.00716.59
7.3.190.0090.00916.52
7.3.180.0130.00716.59
7.3.170.0090.00916.51
7.3.160.0060.01216.80
7.3.120.0060.00915.12
7.3.110.0030.01314.80
7.3.100.0060.01015.07
7.3.90.0070.01114.85
7.3.80.0090.00615.05
7.3.70.0070.01015.06
7.3.60.0040.01115.07
7.3.50.0040.00815.06
7.3.40.0030.01014.95
7.3.30.0030.01314.98
7.3.20.0090.00316.74
7.3.10.0050.00816.82
7.3.00.0020.01116.70
7.2.330.0090.00916.76
7.2.320.0140.00317.07
7.2.310.0070.01016.92
7.2.300.0070.01616.87
7.2.290.0090.00916.80
7.2.240.0070.00415.27
7.2.230.0040.00814.93
7.2.220.0080.00415.22
7.2.210.0060.00915.18
7.2.200.0030.01315.07
7.2.190.0060.00915.07
7.2.180.0040.01115.39
7.2.170.0060.01015.07
7.2.160.0060.00914.88
7.2.150.0070.01016.71
7.2.140.0030.00817.20
7.2.130.0040.01116.99
7.2.120.0070.00817.19
7.2.110.0070.00816.97
7.2.100.0060.00616.88
7.2.90.0110.00517.20
7.2.80.0040.00817.01
7.2.70.0050.00816.95
7.2.60.0100.00516.94
7.2.50.0040.01016.77
7.2.40.0050.00516.88
7.2.30.0090.00517.08
7.2.20.0100.00516.95
7.2.10.0090.00617.01
7.2.00.0080.00617.15
7.1.330.0080.00616.08
7.1.320.0080.00816.00
7.1.310.0070.01016.04
7.1.300.0070.01016.09
7.1.290.0090.00615.97
7.1.280.0110.00315.95
7.1.270.0070.00715.96
7.1.260.0030.01316.02
7.1.250.0030.00916.05
7.1.200.0140.00715.86
7.1.100.0060.00618.19
7.1.70.0070.00417.44
7.1.60.0060.00917.50
7.1.50.0130.01034.72
7.1.00.0030.07722.60
7.0.200.0260.00015.11
7.0.120.0000.07322.28
7.0.110.0000.08022.23
7.0.100.0000.06722.25
7.0.90.0100.07022.22
7.0.80.0000.07722.25
7.0.70.0070.07022.29
7.0.60.0100.05322.09
7.0.50.0000.07322.32
7.0.40.0030.07322.17
7.0.30.0070.07022.22
7.0.20.0030.07322.21
7.0.10.0070.07022.17
7.0.00.0030.07322.17
5.6.260.0100.06321.10
5.6.250.0030.06321.23
5.6.240.0070.06021.25
5.6.230.0030.07321.13
5.6.220.0030.07720.93
5.6.210.0030.07321.13
5.6.200.0030.07720.96
5.6.190.0030.07720.95
5.6.180.0030.07021.24
5.6.170.0000.07721.19
5.6.160.0030.07321.21
5.6.150.0000.06721.16
5.6.140.0000.08021.03
5.6.130.0030.07321.29
5.6.120.0070.06320.95
5.6.110.0000.08021.16
5.6.100.0070.07321.03
5.6.90.0100.06320.94
5.6.80.0030.06320.46
5.6.70.0070.06720.55
5.6.60.0000.07720.56
5.6.50.0130.06020.56
5.6.40.0000.06320.43
5.6.30.0000.07320.52
5.6.20.0000.07720.54
5.6.10.0070.06720.41
5.6.00.0030.07020.57

preferences:
69.76 ms | 401 KiB | 5 Q