3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = '<user><prop name="A"><sub name="X"></sub></prop><prop name="B"><sub name="Y"></sub></prop></user>'; $xml = new DomDocument; $xml->loadXML($data); $xpath = new DomXpath($xml); $subY = $xpath->query('//sub[@name="Y"]'); $design = $doc->createElement('design', $xml); $design->setAttribute('name', 'J'); $design->setAttribute('path', 'folder'); $subY->appendChild($design); echo $xml->saveXML();

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.00018.68
8.3.50.0070.01022.17
8.3.40.0180.00019.07
8.3.30.0110.01119.21
8.3.20.0080.00019.15
8.3.10.0080.00021.25
8.3.00.0040.00423.80
8.2.180.0130.01017.25
8.2.170.0110.00322.96
8.2.160.0100.00320.89
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0030.00526.16
8.2.120.0040.00421.18
8.2.110.0030.00720.64
8.2.100.0090.00317.99
8.2.90.0080.00019.42
8.2.80.0000.00819.66
8.2.70.0030.00517.88
8.2.60.0000.00818.18
8.2.50.0080.00018.07
8.2.40.0040.00418.34
8.2.30.0000.00919.79
8.2.20.0080.00017.98
8.2.10.0080.00018.20
8.2.00.0060.00618.14
8.1.280.0110.00425.92
8.1.270.0080.00023.99
8.1.260.0040.01126.35
8.1.250.0040.00428.09
8.1.240.0060.00322.70
8.1.230.0080.00423.00
8.1.220.0080.00018.77
8.1.210.0000.00819.07
8.1.200.0060.00317.46
8.1.190.0040.00417.90
8.1.180.0030.00618.10
8.1.170.0030.00618.75
8.1.160.0050.00219.13
8.1.150.0000.00818.89
8.1.140.0040.00417.71
8.1.130.0000.00718.19
8.1.120.0000.00717.64
8.1.110.0030.00517.86
8.1.100.0040.00417.56
8.1.90.0040.00417.56
8.1.80.0030.00617.61
8.1.70.0070.00017.67
8.1.60.0030.00617.88
8.1.50.0040.00417.73
8.1.40.0030.00617.95
8.1.30.0000.00817.90
8.1.20.0080.00018.07
8.1.10.0000.00817.93
8.1.00.0080.00017.90
8.0.300.0000.00820.32
8.0.290.0070.00017.43
8.0.280.0030.00318.57
8.0.270.0030.00317.53
8.0.260.0060.00017.24
8.0.250.0050.00317.38
8.0.240.0060.00317.35
8.0.230.0040.00417.17
8.0.220.0000.00717.26
8.0.210.0040.00417.28
8.0.200.0000.00617.37
8.0.190.0050.00217.18
8.0.180.0050.00217.28
8.0.170.0040.00417.30
8.0.160.0000.00717.12
8.0.150.0070.00017.32
8.0.140.0040.00417.28
8.0.130.0000.00513.77
8.0.120.0040.00417.09
8.0.110.0030.00617.09
8.0.100.0000.00717.37
8.0.90.0050.00317.13
8.0.80.0030.01317.21
8.0.70.0040.00417.30
8.0.60.0040.00417.22
8.0.50.0030.00517.30
8.0.30.0130.00917.43
8.0.20.0110.00817.48
8.0.10.0040.00417.19
8.0.00.0120.00717.08
7.4.330.0000.00517.04
7.4.320.0030.00516.85
7.4.300.0030.00316.80
7.4.290.0050.00216.81
7.4.280.0000.00716.88
7.4.270.0030.00316.81
7.4.260.0030.00313.59
7.4.250.0040.00416.88
7.4.240.0030.00316.77
7.4.230.0030.00316.88
7.4.220.0120.01216.78
7.4.210.0030.01216.88
7.4.200.0030.00316.94
7.4.190.0000.00716.86
7.4.160.0100.00616.89
7.4.150.0110.00717.40
7.4.140.0110.00717.86
7.4.130.0070.00916.86
7.4.120.0050.01316.77
7.4.110.0070.01016.94
7.4.100.0120.00617.02
7.4.90.0120.00616.82
7.4.80.0100.00719.39
7.4.70.0150.00616.81
7.4.60.0110.00617.12
7.4.50.0040.00416.70
7.4.40.0070.01022.77
7.4.30.0130.00417.03
7.4.00.0090.00914.97
7.3.330.0050.00013.53
7.3.320.0030.00313.26
7.3.310.0030.00316.79
7.3.300.0080.00016.56
7.3.290.0000.01716.57
7.3.280.0110.00516.66
7.3.270.0110.00617.40
7.3.260.0090.00818.24
7.3.250.0080.00916.96
7.3.240.0160.00716.83
7.3.230.0070.01016.80
7.3.210.0130.00616.66
7.3.200.0120.01119.39
7.3.190.0070.01716.64
7.3.180.0130.00316.69
7.3.170.0090.00616.57
7.3.160.0090.00616.69
7.3.120.0030.01214.93
7.3.110.0040.01314.96
7.3.100.0100.00714.75
7.3.90.0030.00714.79
7.3.80.0070.00414.99
7.3.70.0000.00814.82
7.3.60.0070.00714.86
7.3.50.0090.00015.17
7.3.40.0090.00615.02
7.3.30.0000.01114.65
7.3.20.0030.01016.88
7.3.10.0070.00316.70
7.3.00.0040.01116.70
7.2.330.0130.00417.05
7.2.320.0090.01316.71
7.2.310.0070.01117.05
7.2.300.0090.01616.79
7.2.290.0100.00616.88
7.2.250.0060.01315.31
7.2.240.0090.00915.19
7.2.230.0090.00615.32
7.2.220.0060.00615.22
7.2.210.0090.00615.09
7.2.200.0090.00314.96
7.2.190.0040.01115.32
7.2.180.0060.00915.05
7.2.170.0060.00314.97
7.2.60.0000.01216.80
7.2.00.0030.01418.97
7.1.330.0100.00716.19
7.1.320.0060.00615.86
7.1.310.0090.00315.73
7.1.300.0030.00615.73
7.1.290.0110.00416.02
7.1.280.0030.01415.75
7.1.270.0070.00415.68
7.1.260.0040.01115.87
7.1.200.0000.01415.77
7.1.100.0050.00818.12
7.1.70.0000.01017.04
7.1.60.0070.01719.08
7.1.50.0060.01316.96
7.1.00.0070.03022.46
7.0.200.0000.00816.84
7.0.140.0000.07322.26
7.0.110.0430.05720.09
7.0.100.0570.06720.08
7.0.90.0500.06720.11
7.0.80.0570.05020.20
7.0.70.0570.07020.11
7.0.60.0400.05720.22
7.0.50.0470.03720.08
7.0.40.0030.04719.97
7.0.30.0030.04019.90
7.0.20.0170.07020.05
7.0.10.0070.06019.88
7.0.00.0030.06719.91
5.6.280.0030.07321.23
5.6.260.0130.07720.90
5.6.250.0000.05320.84
5.6.240.0030.05020.74
5.6.230.0030.07020.76
5.6.220.0100.06720.83
5.6.210.0030.04020.74
5.6.200.0070.03321.01
5.6.190.0000.08020.77
5.6.180.0030.04020.82
5.6.170.0100.07720.82
5.6.160.0000.05320.83
5.6.150.0070.04320.76
5.6.140.0130.05720.82
5.6.130.0000.06720.82
5.6.120.0030.08020.73
5.6.110.0100.07020.69
5.6.100.0070.07720.79
5.6.90.0100.07720.80
5.6.80.0070.07720.12
5.6.70.0070.06720.34
5.6.60.0130.07020.08
5.6.50.0130.06020.12
5.6.40.0070.03720.09
5.6.30.0130.06720.17
5.6.20.0070.05320.08
5.6.10.0000.04020.32
5.6.00.0100.07320.14
5.5.380.0070.04317.75
5.5.370.0100.06017.71
5.5.360.0100.07017.71
5.5.350.0070.06317.58
5.5.340.0030.06318.27
5.5.330.0000.04018.01
5.5.320.0100.07018.30
5.5.310.0030.04318.03
5.5.300.0100.03018.36
5.5.290.0030.04718.36
5.5.280.0100.06318.01
5.5.270.0030.06318.26
5.5.260.0100.06718.29
5.5.250.0070.07717.98
5.5.240.0030.05717.53
5.5.230.0030.08317.54
5.5.220.0030.07017.75
5.5.210.0000.08317.54
5.5.200.0030.06017.42
5.5.190.0070.03717.73
5.5.180.0030.07317.53
5.5.160.0030.03317.48
5.5.150.0030.04017.72
5.5.140.0070.03717.37
5.5.130.0100.06017.72
5.5.120.0000.06317.52
5.5.110.0030.04017.22
5.5.100.0030.07317.63
5.5.90.0100.06017.26
5.5.80.0130.04317.26
5.5.70.0100.07317.57
5.5.60.0170.05017.25
5.5.50.0030.03717.43
5.5.40.0030.05017.30
5.5.30.0070.07717.51
5.5.20.0100.06017.77
5.5.10.0100.07317.54
5.5.00.0100.07017.60
5.4.450.0130.06719.42
5.4.440.0030.06319.55
5.4.430.0070.07719.46
5.4.420.0030.05319.70
5.4.410.0070.08019.37
5.4.400.0100.03719.13
5.4.390.0100.08019.42
5.4.380.0030.06719.11
5.4.370.0100.02719.26
5.4.360.0070.07719.26
5.4.350.0100.07019.36
5.4.340.0130.06319.29
5.4.320.0070.07019.21
5.4.310.0070.06019.45
5.4.300.0000.04019.17
5.4.290.0000.08019.45
5.4.280.0000.05319.24
5.4.270.0070.08019.42
5.4.260.0070.07719.38
5.4.250.0100.03719.16
5.4.240.0070.07719.21
5.4.230.0030.07719.41
5.4.220.0000.04319.16
5.4.210.0200.02719.09
5.4.200.0000.05019.16
5.4.190.0100.03719.16
5.4.180.0030.08019.16
5.4.170.0000.08019.38
5.4.160.0070.06019.40
5.4.150.0030.03719.11
5.4.140.0000.04016.89
5.4.130.0070.06316.46
5.4.120.0030.05716.42
5.4.110.0000.04316.58
5.4.100.0030.04716.48
5.4.90.0070.03316.34
5.4.80.0070.03016.46
5.4.70.0030.07316.31
5.4.60.0030.04016.60
5.4.50.0000.07316.42
5.4.40.0070.03016.41
5.4.30.0100.07016.30
5.4.20.0130.06316.61
5.4.10.0030.06716.78
5.4.00.0030.03716.14
5.3.290.0130.02714.72
5.3.280.0000.08014.80
5.3.270.0100.05014.71
5.3.260.0070.07014.70
5.3.250.0030.03714.71
5.3.240.0030.06314.64
5.3.230.0000.04314.82
5.3.220.0030.04014.67
5.3.210.0100.07714.72
5.3.200.0070.07314.63
5.3.190.0030.03314.68
5.3.180.0000.07014.63
5.3.170.0030.08014.64
5.3.160.0030.06314.69
5.3.150.0000.07314.56
5.3.140.0030.04014.75
5.3.130.0070.07314.70
5.3.120.0030.03714.59
5.3.110.0030.04714.76
5.3.100.0070.04314.14
5.3.90.0030.04314.23
5.3.80.0030.08014.23
5.3.70.0030.06014.22
5.3.60.0070.06714.15
5.3.50.0030.04014.08
5.3.40.0070.06714.04
5.3.30.0070.03314.00
5.3.20.0100.06013.78
5.3.10.0030.06013.88
5.3.00.0100.04313.71
5.2.170.0030.03312.53
5.2.160.0000.06312.53
5.2.150.0000.05312.53
5.2.140.0000.04712.53
5.2.130.0100.05712.53
5.2.120.0100.05312.53
5.2.110.0100.05012.53
5.2.100.0030.04012.53
5.2.90.0070.03712.53
5.2.80.0070.03312.53
5.2.70.0100.02712.53
5.2.60.0070.06012.53
5.2.50.0070.06012.53
5.2.40.0100.05712.53
5.2.30.0070.05312.53
5.2.20.0070.03312.53
5.2.10.0100.04712.53
5.2.00.0000.04012.53
5.1.60.0070.02312.53
5.1.50.0000.03312.53
5.1.40.0070.04312.53
5.1.30.0070.04012.53
5.1.20.0000.05712.53
5.1.10.0100.02312.53
5.1.00.0100.05012.53
5.0.50.0030.04312.53
5.0.40.0030.01712.53
5.0.30.0000.03712.53
5.0.20.0030.01712.53
5.0.10.0000.02012.53
5.0.00.0000.03012.53
4.4.90.0000.02712.53
4.4.80.0070.03012.53
4.4.70.0070.03312.53
4.4.60.0030.03012.53
4.4.50.0000.02712.53
4.4.40.0070.04012.53
4.4.30.0030.03312.53
4.4.20.0000.03012.53
4.4.10.0030.03312.53
4.4.00.0000.04712.53
4.3.110.0030.02012.53
4.3.100.0000.01712.53
4.3.90.0000.01712.53
4.3.80.0000.02712.53
4.3.70.0000.02012.53
4.3.60.0070.01012.53
4.3.50.0070.01712.53
4.3.40.0030.02712.53
4.3.30.0070.01312.53
4.3.20.0000.03712.53
4.3.10.0000.03012.53
4.3.00.0000.01712.53

preferences:
42.6 ms | 401 KiB | 5 Q