3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr = <<<XML <Property> <images> <image number="1"> <image>http://www.blah.net/shared/depot/3168/biens/149506/images/627783.jpg </image> <image number="2"> <image>http://www.blah.net/shared/depot/3168/biens/149506/images/627794.jpg</image> </image> <image number="3"> <image>http://www.blah.net/shared/depot/3168/biens/149506/images/627792.jpg </image> </images> </Property> XML; $xml = simplexml_load_string($xmlstr); //var_dump($xml); foreach ($xml->images->image as $image) { // create an array $images with number as index and url as value var_dump ($image); //$i=$image['number']; $images[$i]=(string)$image; } var_dump($images); ?>

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.0090.00618.54
8.3.50.0120.00722.11
8.3.40.0060.01218.93
8.3.30.0090.00619.30
8.3.20.0000.00720.45
8.3.10.0000.00823.90
8.3.00.0080.00022.83
8.2.180.0120.00618.72
8.2.170.0100.00322.96
8.2.160.0140.00022.42
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.01126.16
8.2.120.0080.00019.73
8.2.110.0060.00322.37
8.2.100.0110.00018.22
8.2.90.0050.00319.34
8.2.80.0000.00918.29
8.2.70.0030.00517.75
8.2.60.0000.00818.29
8.2.50.0090.00018.07
8.2.40.0040.00418.28
8.2.30.0040.00418.24
8.2.20.0040.00417.88
8.2.10.0000.00718.09
8.2.00.0000.00917.95
8.1.280.0000.01525.92
8.1.270.0040.00423.98
8.1.260.0000.00826.35
8.1.250.0040.01128.09
8.1.240.0030.00624.04
8.1.230.0040.00719.37
8.1.220.0040.00418.03
8.1.210.0050.00318.77
8.1.200.0030.00617.61
8.1.190.0000.00817.68
8.1.180.0030.00618.10
8.1.170.0000.00818.84
8.1.160.0030.00722.32
8.1.150.0080.00318.74
8.1.140.0040.00417.68
8.1.130.0030.00518.18
8.1.120.0030.00617.63
8.1.110.0000.00717.71
8.1.100.0000.00717.76
8.1.90.0040.00417.55
8.1.80.0000.00717.82
8.1.70.0070.00017.70
8.1.60.0030.00717.93
8.1.50.0000.00817.87
8.1.40.0030.00617.79
8.1.30.0030.00617.71
8.1.20.0000.00817.98
8.1.10.0000.00817.70
8.1.00.0040.00417.75
8.0.300.0000.00718.77
8.0.290.0070.00017.55
8.0.280.0040.00418.58
8.0.270.0040.00417.58
8.0.260.0000.00718.77
8.0.250.0030.00317.36
8.0.240.0030.00317.15
8.0.230.0000.00817.09
8.0.220.0070.00017.27
8.0.210.0030.00317.17
8.0.200.0000.00617.32
8.0.190.0040.00417.10
8.0.180.0110.00017.20
8.0.170.0030.00517.34
8.0.160.0020.00517.09
8.0.150.0030.00317.06
8.0.140.0040.00417.04
8.0.130.0050.00313.81
8.0.120.0040.00417.14
8.0.110.0040.00417.22
8.0.100.0070.00017.06
8.0.90.0000.00717.07
8.0.80.0000.01517.16
8.0.70.0040.00416.94
8.0.60.0040.00417.09
8.0.50.0040.00417.09
8.0.30.0100.01017.26
8.0.20.0060.01217.54
8.0.10.0040.00417.47
8.0.00.0100.00816.90
7.4.330.0000.00515.58
7.4.320.0030.00316.76
7.4.300.0030.00316.84
7.4.290.0000.00716.87
7.4.280.0040.00416.90
7.4.270.0040.00416.79
7.4.260.0030.00516.88
7.4.250.0080.00016.87
7.4.240.0040.00416.88
7.4.230.0040.00416.96
7.4.220.0030.01516.74
7.4.210.0060.01016.83
7.4.200.0000.00816.99
7.4.190.0000.00716.75
7.4.160.0130.00316.58
7.4.150.0140.00317.40
7.4.140.0080.01217.86
7.4.130.0130.00516.74
7.4.120.0110.00816.82
7.4.110.0100.00716.75
7.4.100.0140.00416.78
7.4.90.0080.00816.68
7.4.80.0070.01716.78
7.4.70.0050.01416.82
7.4.60.0080.00816.72
7.4.50.0060.00317.00
7.4.40.0070.00722.77
7.4.30.0000.01716.60
7.3.330.0000.00513.41
7.3.320.0050.00013.47
7.3.310.0050.00316.40
7.3.300.0000.00616.47
7.3.290.0050.01016.44
7.3.280.0080.01016.44
7.3.270.0110.00617.40
7.3.260.0100.01016.50
7.3.250.0100.01116.72
7.3.240.0130.01016.73
7.3.230.0100.00616.64
7.3.210.0070.01116.60
7.3.200.0150.00819.39
7.3.190.0130.00616.56
7.3.180.0120.00416.64
7.3.170.0070.01316.51
7.3.160.0130.00316.79
7.2.330.0090.00916.51
7.2.320.0130.01016.45
7.2.310.0130.00916.51
7.2.300.0060.01516.18
7.2.290.0060.01016.51
5.4.130.0160.04812.04
5.4.120.0180.04012.00
5.4.110.0160.04311.99
5.4.100.0150.04411.99
5.4.90.0180.04111.99
5.4.80.0130.04711.99
5.4.70.0190.03911.99
5.4.60.0190.05311.99
5.4.50.0140.04211.99
5.4.40.0160.04011.98
5.4.30.0170.04311.97
5.4.20.0150.04111.97
5.4.10.0160.04211.97
5.4.00.0150.04111.46
5.3.230.0230.04212.70
5.3.220.0280.06512.68
5.3.210.0230.07212.68
5.3.200.0160.04712.68
5.3.190.0150.04712.67
5.3.180.0210.05612.67
5.3.170.0160.04612.67
5.3.160.0150.04612.67
5.3.150.0190.04212.67
5.3.140.0140.04812.66
5.3.130.0160.04512.66
5.3.120.0240.06912.66
5.3.110.0210.04312.66
5.3.100.0220.04412.12
5.3.90.0160.04512.08
5.3.80.0150.04512.07
5.3.70.0250.07412.08
5.3.60.0160.04512.06
5.3.50.0170.04312.00
5.3.40.0180.04612.00
5.3.30.0180.04311.95
5.3.20.0160.04311.71
5.3.10.0190.04311.68
5.3.00.0190.04311.66

preferences:
35.24 ms | 401 KiB | 5 Q