3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare (strict_types = 1); $doc = new \DOMDocument('1.0'); $doc->loadXML('<foo><bar>baz</bar></foo>'); $xpath = new \DOMXPath($doc); if (version_compare(PHP_VERSION, '7.0.2') === 0) { $node = $xpath->query('/foo')->item(0)->cloneNode(1); } else { $node = $xpath->query('/foo')->item(0)->cloneNode(true); }

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.0150.00617.13
8.3.50.0130.00316.61
8.3.40.0090.00619.09
8.3.30.0090.00618.98
8.3.20.0050.00320.85
8.3.10.0080.00022.13
8.3.00.0050.00324.03
8.2.180.0170.00318.91
8.2.170.0100.01022.96
8.2.160.0080.00620.73
8.2.150.0080.00024.18
8.2.140.0050.00224.66
8.2.130.0080.00021.18
8.2.120.0080.00026.35
8.2.110.0100.00019.55
8.2.100.0120.00018.17
8.2.90.0040.00419.48
8.2.80.0030.00617.97
8.2.70.0060.00618.00
8.2.60.0050.00318.30
8.2.50.0030.00518.09
8.2.40.0050.00322.64
8.2.30.0070.00019.75
8.2.20.0000.00718.05
8.2.10.0030.00518.36
8.2.00.0080.00018.39
8.1.280.0090.00625.92
8.1.270.0070.01122.69
8.1.260.0000.00828.09
8.1.250.0000.00728.09
8.1.240.0030.00622.91
8.1.230.0080.00418.26
8.1.220.0080.00018.04
8.1.210.0090.00018.77
8.1.200.0030.00617.73
8.1.190.0040.00417.73
8.1.180.0050.00318.10
8.1.170.0030.00518.84
8.1.160.0000.00721.09
8.1.150.0080.00019.18
8.1.140.0040.00419.88
8.1.130.0040.00418.02
8.1.120.0040.00417.70
8.1.110.0040.00417.69
8.1.100.0000.00717.93
8.1.90.0060.00617.86
8.1.80.0050.00317.66
8.1.70.0030.00317.93
8.1.60.0060.00617.97
8.1.50.0060.00317.84
8.1.40.0040.00717.96
8.1.30.0060.00318.02
8.1.20.0060.00317.96
8.1.10.0000.00817.85
8.1.00.0030.00518.03
8.0.300.0000.00718.77
8.0.290.0080.00017.00
8.0.280.0000.00718.78
8.0.270.0070.00017.67
8.0.260.0030.00317.58
8.0.250.0030.00317.25
8.0.240.0040.00417.36
8.0.230.0070.00017.18
8.0.220.0000.00917.23
8.0.210.0000.00717.05
8.0.200.0060.00017.16
8.0.190.0040.00417.36
8.0.180.0080.00317.32
8.0.170.0080.00017.14
8.0.160.0070.00017.30
8.0.150.0030.00317.15
8.0.140.0040.00417.19
8.0.130.0030.00313.78
8.0.120.0000.00917.27
8.0.110.0000.00817.31
8.0.100.0070.00017.20
8.0.90.0040.00417.25
8.0.80.0100.01017.21
8.0.70.0070.00017.16
8.0.60.0000.00717.24
8.0.50.0000.00717.36
8.0.30.0090.00717.41
8.0.20.0100.00917.50
8.0.10.0040.00417.27
8.0.00.0120.00517.10
7.4.330.0000.00517.18
7.4.320.0040.00417.11
7.4.300.0030.00316.95
7.4.290.0000.00717.00
7.4.280.0080.00016.96
7.4.270.0030.00316.89
7.4.260.0000.00716.91
7.4.250.0000.00816.97
7.4.240.0000.00717.02
7.4.230.0000.00716.88
7.4.220.0170.00017.12
7.4.210.0090.00716.95
7.4.200.0030.00316.98
7.4.160.0090.00616.77
7.4.150.0120.00817.40
7.4.140.0110.01017.86
7.4.130.0110.00516.80
7.4.120.0130.00516.77
7.4.110.0060.01016.93
7.4.100.0150.00916.93
7.4.90.0030.01517.04
7.4.80.0160.00319.39
7.4.70.0100.00716.89
7.4.60.0120.00917.02
7.4.50.0030.00917.01
7.4.40.0080.01416.80
7.4.30.0090.00916.81
7.4.00.0070.00715.11
7.3.330.0050.00013.35
7.3.320.0030.00313.36
7.3.310.0030.00316.55
7.3.300.0030.00316.52
7.3.290.0030.00316.56
7.3.280.0110.00816.65
7.3.270.0090.01217.40
7.3.260.0090.00916.68
7.3.250.0070.01116.72
7.3.240.0080.00916.65
7.3.230.0120.01016.80
7.3.210.0160.00616.90
7.3.200.0110.00719.39
7.3.190.0130.00716.58
7.3.180.0090.00616.47
7.3.170.0090.01216.53
7.3.160.0100.00616.63
7.2.330.0130.01016.80
7.2.320.0120.00917.01
7.2.310.0120.00916.79
7.2.300.0100.00716.64
7.2.290.0100.00716.90
7.2.60.0060.00916.96
7.2.00.0000.01319.56
7.1.200.0060.00316.01
7.1.100.0070.00718.07
7.1.70.0040.00716.98
7.1.60.0070.01819.40
7.1.50.0100.01317.12
7.1.00.0070.07022.66
7.0.200.0100.01014.86
7.0.60.0330.06020.11
7.0.50.0030.05318.04
7.0.40.0030.07720.23
7.0.30.0270.08020.21
7.0.20.0300.07720.44
7.0.10.0030.04320.20
7.0.00.0100.04320.20
5.6.280.0100.05321.03
5.6.210.0030.07020.75
5.6.200.0000.05718.32
5.6.190.0100.06720.59
5.6.180.0330.05020.93
5.6.170.0430.06020.55
5.6.160.0070.08320.68
5.6.150.0070.08018.26
5.6.140.0100.04018.32
5.6.130.0030.04018.32
5.6.120.0130.07721.25
5.6.110.0070.06021.29
5.6.100.0230.05021.15
5.6.90.0100.08321.09
5.6.80.0100.05720.63
5.5.350.0270.07720.54
5.5.340.0070.08018.16
5.5.330.0070.07720.37
5.5.320.0170.05320.42
5.5.310.0200.05720.38
5.5.300.0030.06018.18
5.5.290.0030.06718.20
5.5.280.0170.06720.99
5.5.270.0030.06020.93
5.5.260.0070.03720.91
5.5.250.0100.08020.90
5.5.240.0030.03720.30

preferences:
51.06 ms | 401 KiB | 5 Q