3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = <<<XML <?xml version="1.0" encoding="ISO-8859-1"?> <PersonList> <Header> </Header> <Person> <Name id="35" atrib="LOL">Sonu Kapoor</Name> <Age>24</Age> <Gender>M</Gender> <PostalCode>54879</PostalCode> </Person> <Person> <Name>Jasmin</Name> <Age>28</Age> <Gender>M</Gender> <PostalCode>78745</PostalCode> </Person> <Person> <Name>Josef</Name> <Age>232</Age> <Gender>F</Gender> <PostalCode>53454</PostalCode> </Person> </PersonList> XML; /* $doc = new DOMDocument(); $doc->loadXML($content); $xp = new DOMXPath($doc); */ $xmlIdatziDok = new DOMDocument(); if($xmlIdatziDok->loadXML($content) === FALSE){die('Error');} $xPath_IdatziDok = new DOMXPath($xmlIdatziDok); foreach ($xPath_IdatziDok->query('//PersonList/Header/Person/Name') AS $Idaztekoa) { $IdaztekoaID = $Idaztekoa->getAttribute('id'); $IdaztekoaAtrib = $Idaztekoa->getAttribute('atrib'); if($IdaztekoaAtrib != "yes") { $Idazteko->Attribute('atrib','yes'); } } $doc->formatOutput = true; echo $doc->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.0060.00918.81
8.3.50.0100.00621.39
8.3.40.0100.01019.29
8.3.30.0110.00319.50
8.3.20.0070.00720.62
8.3.10.0040.00422.20
8.3.00.0060.00622.82
8.2.180.0150.00317.25
8.2.170.0080.00822.96
8.2.160.0100.00320.77
8.2.150.0000.00824.18
8.2.140.0110.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00420.16
8.2.110.0060.00321.69
8.2.100.0090.00318.09
8.2.90.0030.00519.55
8.2.80.0040.00418.25
8.2.70.0050.00317.88
8.2.60.0080.00018.41
8.2.50.0040.00418.13
8.2.40.0000.00818.47
8.2.30.0000.00718.39
8.2.20.0000.00818.08
8.2.10.0000.00818.24
8.2.00.0000.00818.19
8.1.280.0040.01125.92
8.1.270.0060.00319.16
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.55
8.1.230.0060.00619.43
8.1.220.0000.00818.28
8.1.210.0050.00318.77
8.1.200.0040.00717.85
8.1.190.0040.00418.16
8.1.180.0080.00019.24
8.1.170.0050.00319.01
8.1.160.0000.00822.54
8.1.150.0040.00419.02
8.1.140.0000.00717.88
8.1.130.0000.00718.19
8.1.120.0050.00217.92
8.1.110.0000.00917.80
8.1.100.0000.00717.94
8.1.90.0040.00417.92
8.1.80.0040.00417.96
8.1.70.0070.00017.81
8.1.60.0040.00418.11
8.1.50.0030.00518.02
8.1.40.0080.00017.85
8.1.30.0030.00618.16
8.1.20.0060.00317.92
8.1.10.0050.00318.09
8.1.00.0050.00317.90
8.0.300.0050.00218.77
8.0.290.0040.00417.25
8.0.280.0000.00818.91
8.0.270.0000.00717.69
8.0.260.0070.00017.20
8.0.250.0030.00317.48
8.0.240.0050.00317.49
8.0.230.0030.00317.47
8.0.220.0000.00717.18
8.0.210.0050.00217.39
8.0.200.0000.00717.38
8.0.190.0080.00017.37
8.0.180.0030.00317.24
8.0.170.0000.00817.22
8.0.160.0040.00417.32
8.0.150.0040.00417.38
8.0.140.0050.00217.19
8.0.130.0000.00613.83
8.0.120.0050.00217.18
8.0.110.0040.00417.33
8.0.100.0000.00917.40
8.0.90.0050.00217.38
8.0.80.0170.00317.41
8.0.70.0070.00017.23
8.0.60.0000.00917.22
8.0.50.0030.00617.41
8.0.30.0040.01517.50
8.0.20.0080.01217.62
8.0.10.0060.00317.50
8.0.00.0080.01317.25
7.4.330.0000.00615.00
7.4.320.0030.00317.00
7.4.300.0070.00016.86
7.4.290.0050.00516.95
7.4.280.0030.00316.97
7.4.270.0000.00716.73
7.4.260.0030.00317.02
7.4.250.0040.00416.92
7.4.240.0000.00816.94
7.4.230.0000.00817.02
7.4.220.0140.01116.88
7.4.210.0080.00616.95
7.4.200.0040.00416.78
7.4.190.0000.00717.07
7.4.160.0100.00716.89
7.4.150.0090.00917.40
7.4.140.0120.00617.86
7.4.130.0140.00816.90
7.4.120.0070.01217.00
7.4.110.0110.00816.90
7.4.100.0140.00617.00
7.4.90.0110.00717.00
7.4.80.0110.00616.93
7.4.70.0070.01116.85
7.4.60.0150.00617.22
7.4.50.0080.00016.70
7.4.40.0040.00922.77
7.4.30.0170.00716.96
7.4.00.0080.00715.23
7.3.330.0030.00313.61
7.3.320.0000.00513.60
7.3.310.0000.00716.46
7.3.300.0040.00416.68
7.3.290.0090.00516.71
7.3.280.0050.01416.67
7.3.270.0140.01117.40
7.3.260.0100.00716.86
7.3.250.0110.00917.05
7.3.240.0030.01417.06
7.3.230.0180.00016.98
7.3.210.0160.00916.72
7.3.200.0070.01819.39
7.3.190.0080.00816.78
7.3.180.0150.00416.63
7.3.170.0070.01016.90
7.3.160.0070.01016.91
7.3.120.0090.00915.06
7.3.110.0070.00914.95
7.3.100.0050.01015.15
7.3.90.0080.00415.05
7.3.80.0020.01014.95
7.3.70.0030.00815.15
7.3.60.0000.01314.95
7.3.50.0050.00714.85
7.3.40.0030.01215.00
7.3.30.0090.00615.07
7.3.20.0030.01316.83
7.3.10.0070.00516.79
7.3.00.0030.00916.76
7.2.330.0170.00316.93
7.2.320.0060.01816.93
7.2.310.0030.02017.15
7.2.300.0060.01116.93
7.2.290.0030.01317.14
7.2.250.0120.00815.21
7.2.240.0080.00715.22
7.2.230.0060.00915.17
7.2.220.0060.00815.09
7.2.210.0100.00515.22
7.2.200.0090.00615.09
7.2.190.0060.00615.20
7.2.180.0030.00915.43
7.2.170.0050.00915.17
7.2.130.0100.00716.92
7.2.120.0040.00817.17
7.2.110.0080.00416.99
7.2.100.0030.00817.08
7.2.90.0070.00716.82
7.2.80.0000.00917.15
7.2.70.0000.01417.03
7.2.60.0050.01016.99
7.2.50.0100.00317.05
7.2.40.0090.00616.98
7.2.30.0070.01017.10
7.2.20.0070.00716.98
7.2.10.0100.00717.06
7.2.00.0070.00718.55
7.1.330.0090.00615.84
7.1.320.0060.00815.96
7.1.310.0040.00915.97
7.1.300.0030.00715.85
7.1.290.0030.00815.99
7.1.280.0020.01115.87
7.1.270.0060.00415.90
7.1.260.0050.00715.85
7.1.250.0110.00015.91
7.1.200.0100.00315.89
7.1.70.0030.00717.34
7.1.60.0060.00617.29
7.1.50.0040.02116.84
7.1.00.0000.03722.61
7.0.200.0000.01717.11
7.0.140.0000.06722.32
7.0.60.0030.04320.09
7.0.50.0000.04718.05
7.0.40.0030.08320.53
7.0.30.0300.04020.46
7.0.20.0230.06020.37
7.0.10.0370.07320.22
7.0.00.0100.03320.39
5.6.280.0070.07021.04
5.6.210.0230.05320.79
5.6.200.0100.08318.34
5.6.190.0030.08020.89
5.6.180.3570.05020.83
5.6.170.0270.08020.64
5.6.160.0030.09320.66
5.6.150.0030.04318.39
5.6.140.0070.07718.34
5.6.130.0070.08718.37
5.6.120.0030.04721.24
5.6.110.0070.08021.25
5.6.100.0000.08721.16
5.6.90.0070.08721.29
5.6.80.0130.07320.56
5.6.70.0100.09020.58
5.5.350.0370.08020.67
5.5.340.0030.04018.17
5.5.330.0030.04320.69
5.5.320.0330.05320.39
5.5.310.0300.08020.39
5.5.300.0100.07718.12
5.5.290.0030.08718.20
5.5.280.0030.06320.97
5.5.270.0170.07720.94
5.5.260.0030.09721.09
5.5.250.0030.06320.81
5.5.240.0070.05020.32
5.4.450.0600.06019.42
5.4.440.0730.05719.77
5.4.430.0700.06019.86
5.4.420.0470.07019.55
5.4.410.0930.06019.24
5.4.400.0400.06018.99
5.4.390.0500.06018.93
5.4.380.0200.05318.84
5.4.370.0130.05718.78
5.4.360.0170.05018.91
5.4.350.0130.05718.91
5.4.340.0070.06018.91
5.4.320.0040.03912.74
5.4.310.0130.03712.74
5.4.300.0070.03512.75
5.4.290.0060.03812.74
5.4.280.0040.03612.64
5.4.270.0100.03312.64
5.4.260.0080.03712.64
5.4.250.0100.05719.02
5.4.240.0030.05718.95
5.4.230.0170.06318.98
5.4.220.0070.06018.99
5.4.210.0100.05319.16
5.4.200.0070.05318.98
5.4.190.0130.04718.86
5.4.180.0000.06019.04
5.4.170.0100.05319.25
5.4.160.0000.05718.96
5.4.150.0100.05319.02
5.4.140.0070.07716.72
5.4.130.0070.05016.51
5.4.120.0100.06316.68
5.4.110.0070.05716.75
5.4.100.0070.04716.73
5.4.90.0070.04716.70
5.4.80.0100.07016.69
5.4.70.0070.04716.67
5.4.60.0070.04716.54
5.4.50.0000.05316.62
5.4.40.0100.04316.70
5.4.30.0170.03716.70
5.4.20.0030.05016.70
5.4.10.0070.07016.74
5.4.00.0070.07016.15
5.3.290.0060.04313.00
5.3.280.0200.06314.70
5.3.270.0000.06014.91
5.3.260.0070.05314.87
5.3.250.0070.06014.80
5.3.240.0100.04714.69
5.3.230.0030.05314.70
5.3.220.0100.05014.79
5.3.210.0070.06014.63
5.3.200.0170.05314.64
5.3.190.0070.07714.67
5.3.180.0000.05714.70
5.3.170.0030.05314.61
5.3.160.0030.05314.65
5.3.150.0100.06714.81
5.3.140.0130.04314.74
5.3.130.0070.06314.68
5.3.120.0000.06014.62
5.3.110.0100.05014.77
5.3.100.0170.06014.14
5.3.90.0100.04714.32
5.3.80.0200.05714.14
5.3.70.0030.05314.16
5.3.60.0100.06014.09
5.3.50.0100.05013.99
5.3.40.0070.05314.00
5.3.30.0130.05714.04
5.3.20.0070.04713.74
5.3.10.0130.04713.73
5.3.00.0100.04713.67
5.2.170.0100.04011.23
5.2.160.0070.04011.39
5.2.150.0030.05311.24
5.2.140.0030.04311.26
5.2.130.0130.03311.27
5.2.120.0170.05011.20
5.2.110.0030.04311.22
5.2.100.0100.03311.22
5.2.90.0030.04011.18
5.2.80.0070.04011.21
5.2.70.0030.04711.16
5.2.60.0100.03711.24
5.2.50.0000.05011.19
5.2.40.0030.05311.19
5.2.30.0000.04711.09
5.2.20.0030.04011.11
5.2.10.0030.04011.02
5.2.00.0100.04310.94
5.1.60.0100.02710.36
5.1.50.0030.03710.40
5.1.40.0000.04010.11
5.1.30.0030.03710.57
5.1.20.0070.03310.54
5.1.10.0000.03710.32
5.1.00.0000.04010.33
5.0.50.0130.0208.71
5.0.40.0000.0308.81
5.0.30.0000.0478.46
5.0.20.0030.0278.36
5.0.10.0070.0238.33
5.0.00.0030.0408.32
4.4.90.0000.0236.26
4.4.80.0100.0136.26
4.4.70.0000.0236.26
4.4.60.0030.0206.26
4.4.50.0070.0176.26
4.4.40.0000.0336.26
4.4.30.0070.0206.26
4.4.20.0000.0236.26
4.4.10.0070.0206.63
4.4.00.0070.0306.63
4.3.110.0000.0276.63
4.3.100.0030.0236.63
4.3.90.0000.0306.63
4.3.80.0000.0376.63
4.3.70.0000.0306.63
4.3.60.0030.0276.63
4.3.50.0030.0206.63
4.3.40.0070.0276.60
4.3.30.0000.0236.58
4.3.20.0030.0206.57
4.3.10.0000.0236.57
4.3.00.0000.0236.72

preferences:
40.08 ms | 400 KiB | 5 Q