3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = '<?xml version="1.0" encoding="utf-8" ?> <note> <to> <form>D</form> <heading>E</heading> <body>F</body> </to> <to> <form>A</form> <heading>B</heading> <body>C</body> </to> </note>'; $xml = simplexml_load_string($data); foreach ($xml->to as $to) { if ($to->form == 'A') { // našel jsem <to>, ve kterém je <form>A</form> // a tady s ním můžu pracovat echo "heading: ".$to->heading."\nbody: ".$to->body; } }

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.1.130.0070.00017.65
8.1.120.0070.00017.62
8.1.110.0040.00417.58
8.1.100.0040.00417.59
8.1.90.0040.00417.68
8.1.80.0000.00717.62
8.1.70.0050.00317.73
8.1.60.0030.00517.73
8.1.50.0000.00817.73
8.1.40.0040.00417.67
8.1.30.0060.00317.84
8.1.20.0050.00217.85
8.1.10.0070.00017.77
8.1.00.0080.00017.59
8.0.260.0030.00316.90
8.0.250.0040.00417.07
8.0.240.0000.00817.17
8.0.230.0030.00617.11
8.0.220.0030.00617.14
8.0.210.0030.00616.99
8.0.200.0030.00317.23
8.0.190.0070.00017.05
8.0.180.0040.00416.98
8.0.170.0020.00517.04
8.0.160.0050.00317.17
8.0.150.0040.00417.03
8.0.140.0040.00417.01
8.0.130.0050.00013.61
8.0.120.0030.00616.97
8.0.110.0000.00817.11
8.0.100.0000.00717.10
8.0.90.0080.00017.03
8.0.80.0040.01017.13
8.0.70.0050.00216.96
8.0.60.0000.00717.21
8.0.50.0000.00716.94
8.0.30.0090.00817.17
8.0.20.0090.01517.40
8.0.10.0040.00417.08
8.0.00.0070.01016.78
7.4.330.0020.00215.08
7.4.320.0030.00316.81
7.4.300.0000.00616.74
7.4.290.0040.00416.84
7.4.280.0050.00516.81
7.4.270.0000.00816.65
7.4.260.0030.00316.73
7.4.250.0040.00416.75
7.4.240.0000.00716.74
7.4.230.0040.00416.65
7.4.220.0060.01216.86
7.4.210.0060.01016.80
7.4.200.0070.00016.77
7.4.160.0130.01016.40
7.4.150.0150.00317.40
7.4.140.0150.01017.86
7.4.130.0050.01316.69
7.4.120.0090.00816.59
7.4.110.0030.01316.89
7.4.100.0070.01016.69
7.4.90.0140.00416.85
7.4.80.0070.01019.39
7.4.70.0090.01016.69
7.4.60.0100.01416.66
7.4.50.0080.00816.82
7.4.40.0130.00316.45
7.4.30.0170.00016.58
7.4.00.0050.00815.00
7.3.330.0000.00513.23
7.3.320.0030.00313.15
7.3.310.0070.00016.34
7.3.300.0030.00316.36
7.3.290.0040.00416.32
7.3.280.0110.00716.40
7.3.270.0200.00317.40
7.3.260.0080.01216.63
7.3.250.0090.00916.43
7.3.240.0050.01116.49
7.3.230.0120.01216.70
7.3.210.0040.01216.64
7.3.200.0030.01519.39
7.3.190.0160.00016.48
7.3.180.0180.00016.48
7.3.170.0160.00016.69
7.3.160.0140.00316.50
7.3.120.0070.01314.54
7.3.110.0090.00614.93
7.3.100.0040.00815.06
7.3.90.0000.00814.91
7.3.80.0040.01114.79
7.3.70.0070.00314.68
7.3.60.0110.00414.64
7.3.50.0030.01014.86
7.3.40.0060.00914.93
7.3.30.0080.00814.71
7.3.20.0040.01416.57
7.3.10.0040.01116.66
7.3.00.0090.00316.81
7.2.330.0160.00016.66
7.2.320.0110.01016.93
7.2.310.0070.01017.02
7.2.300.0100.00716.92
7.2.290.0070.01016.71
7.2.250.0060.01315.07
7.2.240.0100.01015.05
7.2.230.0070.01015.55
7.2.220.0100.00315.39
7.2.210.0030.01215.49
7.2.200.0070.00715.07
7.2.190.0060.00615.01
7.2.180.0030.00815.13
7.2.170.0080.00415.13
7.2.60.0060.00616.85
7.1.330.0130.00315.98
7.1.320.0040.01215.90
7.1.310.0110.00416.20
7.1.300.0060.00616.00
7.1.290.0060.00615.68
7.1.280.0070.00715.94
7.1.270.0070.00315.61
7.1.260.0110.00415.90
7.1.200.0000.01515.57
7.1.70.0040.00717.00
7.1.60.0130.00619.26
7.1.00.0030.07322.53
7.0.200.0540.00714.61
7.0.90.0500.09019.92
7.0.80.0230.08020.19
7.0.70.0530.08720.03
7.0.60.0430.06019.96
7.0.50.0430.07720.41
7.0.40.0070.07320.19
7.0.30.0100.05320.22
7.0.20.0100.07720.07
7.0.10.0100.08320.03
7.0.00.0070.05720.11
5.6.230.0070.08320.68
5.6.220.0070.08720.87
5.6.210.0070.03320.84
5.6.200.0000.09021.12
5.6.190.0100.08321.15
5.6.180.0100.05321.18
5.6.170.0070.08321.23
5.6.160.0030.08721.16
5.6.150.0000.05321.00
5.6.140.0170.07021.00
5.6.130.0130.07021.13
5.6.120.0070.07021.08
5.6.110.0170.08020.99
5.6.100.0100.08721.07
5.6.90.0070.05021.09
5.6.80.0000.08720.52
5.6.70.0070.04720.55
5.6.60.0070.08020.43
5.6.50.0100.07020.61
5.6.40.0130.07020.59
5.6.30.0030.06320.45
5.6.20.0100.07320.63
5.6.10.0030.04320.56
5.6.00.0170.03020.52
5.5.370.0100.08020.60
5.5.360.0100.07320.40
5.5.350.0130.03720.45
5.5.340.0230.06320.80
5.5.330.0000.05020.90
5.5.320.0030.07320.77
5.5.310.0130.05020.77
5.5.300.0070.07720.99
5.5.290.0030.07720.82
5.5.280.0100.08020.74
5.5.270.0070.07720.73
5.5.260.0100.07720.93
5.5.250.0030.07320.82
5.5.240.0030.08720.42
5.5.230.0030.08020.37
5.5.220.0100.08020.39
5.5.210.0030.04320.41
5.5.200.0030.08020.39
5.5.190.0130.07320.19
5.5.180.0070.07020.15
5.5.160.0030.07320.36
5.5.150.0000.04020.28
5.5.140.0030.08020.23
5.5.130.0030.03720.21
5.5.120.0030.07320.37
5.5.110.0030.04720.17
5.5.100.0030.07720.11
5.5.90.0130.07020.01
5.5.80.0130.07020.13
5.5.70.0070.08320.11
5.5.60.0030.07720.05
5.5.50.0170.05720.23
5.5.40.0070.06720.00
5.5.30.0000.08020.09
5.5.20.0100.07320.07
5.5.10.0100.09720.05
5.5.00.0100.07320.05

preferences:
165.74 ms | 406 KiB | 5 Q