3v4l.org

run code in 300+ PHP versions simultaneously
<?php $output = '<results> <error> <string>i</string> <description>Make I uppercase</description> <precontext></precontext> <suggestions> <option>I</option> </suggestions> <type>grammar</type> </error> </results>'; $dom = new DOMDocument(); $dom->loadXml($output); $params = $dom->getElementsByTagName('error'); // Find Sections $k=0; foreach ($params as $param) //go to each section 1 by 1 { if ($param->getElementsByTagName('type')->length && $param->getElementsByTagName('type')[0]->nodeValue === 'grammar') { echo $param->getElementsByTagName('description')[0]->nodeValue; }else{ echo "other type"; } }

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.4.120.0110.00820.68
8.4.110.0150.00522.72
8.4.100.0120.00817.75
8.4.90.0130.00818.81
8.4.80.0060.00319.84
8.4.70.0110.00918.10
8.4.60.0110.00618.87
8.4.50.0070.01324.43
8.4.40.0170.00319.66
8.4.30.0110.01120.53
8.4.20.0060.01318.01
8.4.10.0100.01019.66
8.3.250.0170.00421.30
8.3.240.0120.00416.82
8.3.230.0130.00616.66
8.3.220.0050.00217.21
8.3.210.0080.00716.55
8.3.200.0030.00616.74
8.3.190.0130.00717.23
8.3.180.0080.01118.77
8.3.170.0070.01117.47
8.3.160.0110.01118.42
8.3.150.0050.00319.17
8.3.140.0090.00316.88
8.3.130.0040.00416.73
8.3.120.0090.00020.84
8.3.110.0130.00618.84
8.3.100.0070.01318.66
8.3.90.0140.00726.77
8.3.80.0090.00019.36
8.3.70.0150.00018.55
8.3.60.0100.00718.55
8.3.50.0080.00723.84
8.3.40.0090.00618.95
8.3.30.0060.00918.84
8.3.20.0080.00021.01
8.3.10.0040.00422.04
8.3.00.0080.00021.93
8.2.290.0110.00620.49
8.2.280.0110.00718.82
8.2.270.0000.01017.52
8.2.260.0090.00916.92
8.2.250.0030.00618.74
8.2.240.0000.00817.35
8.2.230.0030.00620.94
8.2.220.0060.00324.06
8.2.210.0060.00626.77
8.2.200.0070.00318.88
8.2.190.0090.00916.82
8.2.180.0060.01218.54
8.2.170.0070.00722.96
8.2.160.0070.01022.38
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00420.88
8.2.110.0110.00021.25
8.2.100.0060.00619.58
8.2.90.0040.00417.88
8.2.80.0030.00618.88
8.2.70.0090.00017.74
8.2.60.0030.00618.05
8.2.50.0000.00918.07
8.2.40.0020.00518.41
8.2.30.0050.00320.06
8.2.20.0000.00818.43
8.2.10.0050.00319.62
8.2.00.0040.00419.64
8.1.330.0100.01024.04
8.1.320.0110.00718.71
8.1.310.0030.00617.15
8.1.300.0050.00218.63
8.1.290.0030.00630.84
8.1.280.0070.01025.92
8.1.270.0030.00520.84
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00024.04
8.1.230.0070.01017.78
8.1.220.0040.00418.03
8.1.210.0050.00318.77
8.1.200.0000.01017.48
8.1.190.0030.00617.48
8.1.180.0080.00018.10
8.1.170.0050.00318.76
8.1.160.0040.00419.07
8.1.150.0040.00419.19
8.1.140.0040.00421.00
8.1.130.0000.00720.48
8.1.120.0000.00717.74
8.1.110.0030.00617.61
8.1.100.0040.00417.70
8.1.90.0070.00017.66
8.1.80.0050.00217.74
8.1.70.0000.00817.65
8.1.60.0090.00017.83
8.1.50.0030.00517.58
8.1.40.0030.00617.67
8.1.30.0060.00317.89
8.1.20.0000.00817.95
8.1.10.0000.00817.92
8.1.00.0060.00317.77
8.0.300.0040.00418.77
8.0.290.0040.00416.86
8.0.280.0040.00418.70
8.0.270.0030.00318.12
8.0.260.0000.00720.21
8.0.250.0000.00717.12
8.0.240.0040.00817.21
8.0.230.0030.00317.25
8.0.220.0030.00317.02
8.0.210.0030.00316.96
8.0.200.0040.00417.13
8.0.190.0040.00417.10
8.0.180.0060.00317.16
8.0.170.0050.00517.16
8.0.160.0000.00817.09
8.0.150.0060.00317.04
8.0.140.0120.00017.02
8.0.130.0000.00513.50
8.0.120.0020.00516.99
8.0.110.0000.00716.97
8.0.100.0070.00017.17
8.0.90.0030.00617.23
8.0.80.0050.01217.11
8.0.70.0050.00217.16
8.0.60.0070.00017.14
8.0.50.0000.00716.98
8.0.30.0120.00917.40
8.0.20.0110.00817.30
8.0.10.0040.00417.11
8.0.00.0090.00917.10
7.4.330.0050.00016.90
7.4.320.0000.00616.76
7.4.300.0070.00016.69
7.4.290.0000.00716.82
7.4.280.0040.00416.73
7.4.270.0050.00516.87
7.4.260.0000.00513.60
7.4.250.0030.00316.70
7.4.240.0020.00516.73
7.4.230.0040.00416.88
7.4.220.0030.00316.71
7.4.210.0060.00916.86
7.4.200.0000.00816.56
7.4.130.0110.00716.63
7.4.120.0090.00916.75
7.4.110.0070.01016.92
7.4.100.0130.00316.77
7.4.90.0100.00616.68
7.4.80.0100.00619.39
7.4.70.0170.00616.75
7.4.60.0040.01316.75
7.4.50.0050.00516.64
7.4.40.0140.00316.79
7.4.10.0090.00715.01
7.4.00.0060.00914.82
7.3.330.0040.00416.60
7.3.320.0060.00013.46
7.3.310.0070.00016.62
7.3.300.0000.00716.56
7.3.290.0050.01216.56
7.3.280.0080.01316.32
7.3.260.0110.01116.66
7.3.230.0130.01016.52
7.3.210.0070.01416.54
7.3.200.0130.00716.73
7.3.190.0080.00816.89
7.3.180.0100.00716.83
7.3.170.0030.01316.73
7.3.160.0110.01116.84
7.3.130.0070.01114.79
7.3.120.0130.00314.75
7.3.110.0110.00314.80
7.3.100.0140.00014.90
7.3.90.0030.01114.80
7.3.80.0090.00615.04
7.3.70.0090.00914.95
7.3.60.0030.01014.80
7.3.50.0110.00314.60
7.3.40.0100.00714.67
7.3.30.0060.00914.62
7.3.20.0100.00614.63
7.3.10.0100.00714.85
7.3.00.0100.01114.95
7.2.330.0070.01017.02
7.2.320.0110.01316.92
7.2.310.0100.00716.91
7.2.300.0070.01416.99
7.2.290.0100.00716.77
7.2.260.0100.00314.79
7.2.250.0110.00715.36
7.2.240.0100.00314.70
7.2.230.0100.01015.05
7.2.220.0110.00414.75
7.2.210.0060.00914.92
7.2.200.0040.01114.91
7.2.190.0140.00414.67
7.2.180.0120.00414.71
7.2.170.0060.00814.86
7.2.160.0030.01414.90
7.2.150.0120.00915.16
7.2.140.0080.00815.01
7.2.130.0110.01115.23
7.2.120.0050.01115.13
7.2.110.0080.00714.78
7.2.100.1220.00914.74
7.2.90.0090.00914.93
7.2.80.0130.00614.99
7.2.70.0100.00514.89
7.2.60.0120.00315.07
7.2.50.0130.00315.06
7.2.40.0030.01314.83
7.2.30.0170.00015.25
7.2.20.0060.00915.01
7.2.10.0130.00315.38
7.2.00.0100.00715.23

preferences:
18.68 ms | 403 KiB | 5 Q