3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = <<<DATA <?xml version="1.0"?> <devices> <device name="TEMP" index="0" available="1" type="" id="xxx"> <field type="2" max="50" min="-20" niceName="Temperature (C)" value="24.75" key="TempC"/> <field type="2" max="122" min="-4" niceName="Temperature (F)" value="76.55" key="TempF"/> </device> <device name="TEMP" index="0" available="1" type="" id="xxx"> <field type="2" max="50" min="-20" niceName="Temperature (C)" value="24.75" key="TempC"/> <field type="2" max="122" min="-4" niceName="Temperature (F)" value="76.56" key="TempF"/> </device> </devices> DATA; $xml = simplexml_load_string($data); echo '<h2>Server Temperature</h2>'; foreach ($xml->device as $device) { foreach ($device->field as $field) { $att = $field->attributes(); if ((string)$att->key === "TempF") { echo 'Temp: ' . $field->attributes()->value . "<br>"; } } }

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.5.10.0110.00816.75
8.5.00.0120.01220.34
8.4.150.0010.00114.05
8.4.140.0130.00817.59
8.4.130.0070.00417.85
8.4.120.0110.01017.82
8.4.110.0090.01118.84
8.4.100.0110.00918.84
8.4.90.0110.00921.10
8.4.80.0080.00617.96
8.4.70.0040.00518.14
8.4.60.0040.00518.99
8.4.50.0110.00920.75
8.4.40.0110.00019.55
8.4.30.0060.01320.55
8.4.20.0150.00618.00
8.4.10.0000.01022.56
8.3.280.0120.00718.54
8.3.270.0150.00616.47
8.3.260.0120.00716.86
8.3.250.0140.00519.15
8.3.240.0090.00917.04
8.3.230.0160.00316.76
8.3.220.0110.00717.31
8.3.210.0110.00916.75
8.3.200.0030.00516.67
8.3.190.0100.00619.15
8.3.180.0110.00816.98
8.3.170.0070.01417.54
8.3.160.0060.01218.48
8.3.150.0040.01516.86
8.3.140.0110.00716.89
8.3.130.0120.00816.75
8.3.120.0080.00019.05
8.3.110.0070.00320.94
8.3.100.0140.00016.64
8.3.90.0070.00726.77
8.3.80.0030.01016.61
8.3.70.0040.01418.43
8.3.60.0100.00717.00
8.3.50.0100.00824.53
8.3.40.0040.01619.09
8.3.30.0040.01119.01
8.3.20.0080.00024.18
8.3.10.0000.00724.66
8.3.00.0040.00426.16
8.2.290.0130.00620.88
8.2.280.0100.00918.66
8.2.270.0120.00617.34
8.2.260.0100.00016.71
8.2.250.0060.00318.50
8.2.240.0030.00618.98
8.2.230.0030.00722.58
8.2.220.0130.00624.06
8.2.210.0080.00026.77
8.2.200.0090.00016.75
8.2.190.0150.00617.00
8.2.180.0070.00725.92
8.2.170.0110.00419.21
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00421.31
8.2.110.0060.00321.09
8.2.100.0110.00017.97
8.2.90.0080.00017.73
8.2.80.0040.00418.94
8.2.70.0040.00417.75
8.2.60.0050.00317.93
8.2.50.0030.00618.05
8.2.40.0060.00320.20
8.2.30.0050.00218.34
8.2.20.0000.00818.26
8.2.10.0040.00419.44
8.2.00.0040.00419.54
8.1.330.0110.00821.85
8.1.320.0140.00516.30
8.1.310.0070.00018.61
8.1.300.0090.00018.13
8.1.290.0120.00330.84
8.1.280.0180.00725.92
8.1.270.0040.00424.05
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0070.00322.95
8.1.230.0110.00019.38
8.1.220.0040.00418.02
8.1.210.0030.00518.77
8.1.200.0000.00917.48
8.1.190.0000.00917.48
8.1.180.0000.00818.10
8.1.170.0050.00318.88
8.1.160.0070.00319.16
8.1.150.0030.00619.05
8.1.140.0060.00219.10
8.1.130.0050.00220.34
8.1.120.0000.00717.60
8.1.110.0030.00617.58
8.1.100.0080.00017.54
8.1.90.0070.00017.71
8.1.80.0070.00017.61
8.1.70.0030.00317.56
8.1.60.0000.00817.74
8.1.50.0040.00417.74
8.1.40.0080.00017.60
8.1.30.0030.00617.96
8.1.20.0040.00417.79
8.1.10.0040.00417.57
8.1.00.0030.00517.63
8.0.300.0040.00418.77
8.0.290.0070.00017.00
8.0.280.0030.00518.66
8.0.270.0030.00318.13
8.0.260.0000.00618.79
8.0.250.0030.00317.24
8.0.240.0030.00317.13
8.0.230.0030.00517.09
8.0.220.0030.00317.04
8.0.210.0050.00317.21
8.0.200.0000.00617.14
8.0.190.0040.00417.15
8.0.180.0030.00617.14
8.0.170.0030.00617.24
8.0.160.0050.00317.06
8.0.150.0030.00616.98
8.0.140.0040.00417.16
8.0.130.0000.00513.69
8.0.120.0080.00017.18
8.0.110.0000.00817.27
8.0.100.0070.00017.08
8.0.90.0020.00517.20
8.0.80.0090.00617.13
8.0.70.0070.00016.95
8.0.60.0070.00017.03
8.0.50.0040.00417.15
8.0.30.0140.00317.36
8.0.20.0110.00817.21
8.0.10.0390.00717.16
8.0.00.0350.01417.51
7.4.330.0000.00515.55
7.4.320.0060.00016.76
7.4.300.0030.00316.73
7.4.290.0000.00916.59
7.4.280.0080.00016.72
7.4.270.0000.00716.70
7.4.260.0000.00613.46
7.4.250.0040.00416.81
7.4.240.0030.00416.74
7.4.230.0030.00316.55
7.4.220.0030.00616.71
7.4.210.0100.00916.78
7.4.200.0040.00416.60
7.4.150.0210.01316.78
7.4.140.0260.00916.70
7.4.130.0290.01316.81
7.4.120.0300.00416.64
7.4.110.0290.01316.71
7.4.100.0310.01016.51
7.4.90.0300.00416.83
7.4.80.0340.00316.63
7.4.70.0310.00416.79
7.4.60.0330.00816.76
7.4.50.0170.01716.97
7.4.40.0270.00416.99
7.4.30.0250.00816.67
7.4.20.0290.01016.50
7.4.10.0240.01416.74
7.4.00.0140.00716.69
7.3.330.0030.00616.41
7.3.320.0000.00613.19
7.3.310.0000.00716.54
7.3.300.0030.00316.52
7.3.290.0100.00716.48
7.3.270.0350.00916.47
7.3.260.0180.01516.48
7.3.250.0140.01916.69
7.3.240.0250.01216.43
7.3.230.0210.01416.49
7.3.220.0280.00716.68
7.3.210.0220.01516.49
7.3.200.0300.00616.57
7.3.190.0250.01116.70
7.3.180.0350.00716.40
7.3.170.0170.01716.62
7.3.160.0260.00716.49
7.3.150.0290.01216.41
7.3.140.0340.00816.75
7.3.130.0330.00916.70
7.3.120.0270.00616.57
7.3.110.0320.01316.77
7.3.100.0320.01116.40
7.3.90.0200.01716.45
7.3.80.0180.01816.49
7.3.70.0320.00616.53
7.3.60.0320.00516.37
7.3.50.0300.01116.40
7.3.40.0180.01416.33
7.3.30.0190.01516.56
7.3.20.0310.00816.68
7.3.10.0320.00516.61
7.3.00.0280.01016.69

preferences:
191.8 ms | 403 KiB | 5 Q