3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<person> <child role="son1"> <child role="daughter1"/> </child> <child role="daughter2"> <child role="son2"> <child role="son3"/> </child> </child> </person>'; $document = new DOMDocument(); $document->loadXml($xml); $xpath = new DOMXpath($document); foreach ($xpath->evaluate('//child/@role') as $attr) { $result[] = $attr->value; } var_export($result);

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.0120.00318.47
8.3.50.0100.00616.77
8.3.40.0070.01419.22
8.3.30.0030.01319.00
8.3.20.0040.00419.75
8.3.10.0050.00322.24
8.3.00.0090.00021.02
8.2.180.0060.00918.79
8.2.170.0110.00719.16
8.2.160.0070.00722.96
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00018.59
8.2.120.0040.00426.35
8.2.110.0050.00522.51
8.2.100.0000.01118.28
8.2.90.0030.01118.00
8.2.80.0040.00419.29
8.2.70.0080.00417.75
8.2.60.0040.00417.88
8.2.50.0030.00617.63
8.2.40.0050.00619.97
8.2.30.0040.00419.53
8.2.20.0000.00818.52
8.2.10.0050.00318.46
8.2.00.0090.00018.04
8.1.280.0090.00925.92
8.1.270.0060.00319.30
8.1.260.0090.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00721.07
8.1.230.0060.00621.35
8.1.220.0040.00418.16
8.1.210.0000.00818.77
8.1.200.0080.00417.60
8.1.190.0080.00017.63
8.1.180.0000.00918.10
8.1.170.0040.00718.91
8.1.160.0050.00319.08
8.1.150.0040.00419.16
8.1.140.0000.00722.52
8.1.130.0050.00320.61
8.1.120.0040.00417.64
8.1.110.0080.00017.91
8.1.100.0030.00917.64
8.1.90.0040.00517.90
8.1.80.0040.00417.72
8.1.70.0070.00017.81
8.1.60.0000.00817.98
8.1.50.0020.00517.89
8.1.40.0100.00017.97
8.1.30.0030.00518.02
8.1.20.0030.00618.02
8.1.10.0040.00417.75
8.1.00.0030.00517.70
8.0.300.0040.00418.77
8.0.290.0020.00517.13
8.0.280.0000.00818.75
8.0.270.0070.00017.54
8.0.260.0000.00718.84
8.0.250.0040.00417.38
8.0.240.0000.00717.20
8.0.230.0000.00717.36
8.0.220.0070.00017.00
8.0.210.0040.00417.30
8.0.200.0040.00417.19
8.0.190.0040.00417.10
8.0.180.0050.00217.15
8.0.170.0030.00617.11
8.0.160.0040.00417.05
8.0.150.0070.00317.05
8.0.140.0000.00717.24
8.0.130.0030.00313.76
8.0.120.0030.00517.05
8.0.110.0040.00417.25
8.0.100.0070.00017.37
8.0.90.0080.00017.27
8.0.80.0080.00817.21
8.0.70.0080.00017.30
8.0.60.0030.00517.23
8.0.50.0000.00717.21
8.0.30.0130.00317.48
8.0.20.0170.00317.40
8.0.10.0000.00717.21
8.0.00.0170.00616.98
7.4.330.0000.00615.55
7.4.320.0030.00316.85
7.4.300.0050.00516.96
7.4.290.0050.00216.85
7.4.280.0000.00916.88
7.4.270.0000.00717.00
7.4.260.0000.00716.89
7.4.250.0000.00816.65
7.4.240.0070.00016.88
7.4.230.0030.00316.76
7.4.220.0000.00816.97
7.4.210.0050.01216.93
7.4.200.0040.00416.98
7.4.160.0140.00516.91
7.4.140.0090.00917.86
7.4.130.0120.00616.84
7.4.120.0110.00716.86
7.4.110.0110.00716.80
7.4.100.0040.01616.85
7.4.90.0100.00716.80
7.4.80.0110.00719.39
7.4.70.0200.00316.93
7.4.60.0090.00616.71
7.4.50.0040.01516.95
7.4.40.0090.00617.00
7.4.00.0060.00614.90
7.3.330.0050.00013.49
7.3.320.0000.00513.36
7.3.310.0060.00316.33
7.3.300.0030.00316.51
7.3.290.0000.00716.44
7.3.280.0030.01316.61
7.3.260.0130.00716.80
7.3.240.0090.01016.61
7.3.230.0060.01016.64
7.3.210.0100.00716.52
7.3.200.0110.00616.84
7.3.190.0060.01316.70
7.3.180.0160.00316.77
7.3.170.0070.01016.60
7.3.160.0190.00316.76
7.2.330.0090.00917.13
7.2.320.0100.01017.25
7.2.310.0100.00716.86
7.2.300.0140.00316.85
7.2.290.0000.01716.86
7.2.110.0830.00014.90
7.2.100.0780.00915.11
7.2.90.0760.00914.49
7.2.80.0750.00314.84
7.2.70.0830.01014.64
7.2.60.0570.00414.68
7.2.50.0730.00315.37
7.2.40.0560.00715.05
7.2.30.0570.00715.09
7.2.20.0530.00915.29
7.2.10.0560.00715.18
7.2.00.0580.00014.88
7.1.230.1040.00313.72
7.1.220.0650.01214.03
7.1.210.0680.01013.86
7.1.200.0530.01013.59
7.1.190.0710.00614.01
7.1.180.0950.00714.04
7.1.170.0600.00814.07
7.1.160.0520.01014.00
7.1.150.0510.00414.13
7.1.140.0490.00714.11
7.1.130.0490.00714.06
7.1.120.0520.01013.99
7.1.110.0550.00614.01
7.1.100.0740.00414.16
7.1.90.0430.01514.07
7.1.80.0570.00614.26
7.1.70.0540.01414.02
7.1.60.0660.00732.05
7.1.50.0750.01031.87
7.1.40.0760.00332.12
7.1.30.0660.01432.13
7.1.20.0770.00731.95
7.1.10.0440.01413.90
7.1.00.0550.00414.11
5.6.380.0100.01314.64

preferences:
54.93 ms | 400 KiB | 5 Q