3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<root> <parent> <child name='Child1' /> <child name='Child2' /> <subparent> <childa name='Child3'>conteudo<childa/> </subparent> </parent> <child name='Child4' /> </root>"; $xml = simplexml_load_string( $xml); foreach( $xml->xpath( './/childa') as $child) { echo $child-. "\n"; }

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)
5.6.80.0100.07720.40
5.5.240.0030.07720.24
5.4.400.0230.06718.89
5.4.390.0300.06318.63
5.4.380.0270.06718.73
5.4.370.0430.07018.80
5.4.360.0330.07718.80
5.4.350.0370.05018.57
5.4.340.0430.05318.80
5.4.320.0300.05718.69
5.4.310.0230.06718.50
5.4.300.0430.05018.84
5.4.290.0330.05718.52
5.4.280.0270.06318.69
5.4.270.0330.05718.80
5.4.260.0370.06018.58
5.4.250.0330.05318.51
5.4.240.0430.04718.50
5.4.230.0230.06018.60
5.4.220.0400.05718.71
5.4.210.0330.05018.46
5.4.200.0430.04716.79
5.4.190.0430.05018.61
5.4.180.0270.06318.60
5.4.170.0330.05718.73
5.4.160.0400.04318.76
5.4.150.0270.06018.81
5.4.140.0200.06716.32
5.4.130.0270.05316.45
5.4.120.0370.05716.23
5.4.110.0330.05316.25
5.4.100.0430.04716.27
5.4.90.0270.06016.32
5.4.80.0430.05316.18
5.4.70.0370.05316.21
5.4.60.0270.05316.23
5.4.50.0300.05016.40
5.4.40.0270.05716.30
5.4.30.0370.06016.41
5.4.20.0330.07016.21
5.4.10.0500.04716.25
5.4.00.0330.05015.78
5.3.290.0470.04714.70
5.3.280.0430.04714.55
5.3.270.0230.06714.57
5.3.260.0300.07014.68
5.3.250.0500.04714.70
5.3.240.0330.05314.61
5.3.230.0370.04714.60
5.3.220.0230.06314.55
5.3.210.0430.05314.57
5.3.200.0430.05014.48
5.3.190.0270.05714.48
5.3.180.0230.06314.61
5.3.170.0270.06014.58
5.3.160.0270.05714.55
5.3.150.0270.06014.61
5.3.140.0430.04714.53
5.3.130.0270.06314.46
5.3.120.0230.06314.54
5.3.110.0270.06014.46
5.3.100.0170.06314.13
5.3.90.0230.05713.94
5.3.80.0270.05314.00
5.3.70.0270.05314.11
5.3.60.0230.05714.01
5.3.50.0200.06014.04
5.3.40.0530.05714.04
5.3.30.0300.04713.89
5.3.20.0400.06013.67
5.3.10.0430.05313.65
5.3.00.0330.05013.58
5.2.170.0270.05711.09
5.2.160.0230.04311.12
5.2.150.0470.04311.12
5.2.140.0330.04011.11
5.2.130.0230.04311.06
5.2.120.0330.03711.04
5.2.110.0400.03011.07
5.2.100.0270.04311.26
5.2.90.0270.04311.11
5.2.80.0270.04311.15
5.2.70.0270.05711.08
5.2.60.0300.05311.03
5.2.50.0370.04011.00
5.2.40.0230.05010.95
5.2.30.0130.05310.89
5.2.20.0130.04710.96
5.2.10.0270.04310.86
5.2.00.0170.05710.81
5.1.60.0230.04010.07
5.1.50.0130.0409.95
5.1.40.0230.0309.98
5.1.30.0230.03310.34
5.1.20.0170.04010.35
5.1.10.0130.04310.10
5.1.00.0200.04010.17
5.0.50.0130.0308.61
5.0.40.0100.0308.48
5.0.30.0200.0378.27
5.0.20.0130.0338.27
5.0.10.0130.0338.34
5.0.00.0100.0438.27
4.4.90.0100.0307.03
4.4.80.0200.0207.03
4.4.70.0130.0207.03
4.4.60.0100.0277.03
4.4.50.0070.0277.03
4.4.40.0100.0377.03
4.4.30.0070.0237.03
4.4.20.0070.0277.03
4.4.10.0130.0237.03
4.4.00.0100.0377.03
4.3.110.0070.0277.03
4.3.100.0070.0237.03
4.3.90.0100.0237.03
4.3.80.0100.0377.03
4.3.70.0130.0277.03
4.3.60.0130.0207.03
4.3.50.0070.0277.03
4.3.40.0070.0377.03
4.3.30.0070.0207.03
4.3.20.0030.0277.03
4.3.10.0130.0137.03
4.3.00.0000.0236.79

preferences:
145.04 ms | 1394 KiB | 7 Q