3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml=simplexml_load_string(<<<XML <?xml version="1.0"?> <products><product><product_code>0084064919005</product_code><name>Spy Men's Hielo Sunglasses</name><stock>1</stock><regular_price>94.95</regular_price><sale_price>44.93</sale_price><brand>Spy Optic Inc </brand><gender/><category>Sunglasses</category><product_description>The Spy Men's Hielo Sunglasses are a classic hit maker. The frames are custom built out of high quality propionate, a lightweight durable material. An 8 base curve ARC lens gives you perfect clarity without distortion and gives you 100% UV protection.</product_description><buy_url>http://www.sunandski.com/ProductDetails.asp?ProductCode=0084064919005</buy_url><large_image_url>imgs/products/lrg/0084064919005.jpg</large_image_url><remote_image_url>http://www.sunandski.com/v/vspfiles/photos/0084064919005-2T.jpg</remote_image_url><small_image_url>http://www.sunandski.com/v/vspfiles/photos/0084064919005-1.jpg</small_image_url><size/><savings>53</savings></product><product><product_code>0084064919010</product_code><name>Spy Men's Hsx Sunglasses</name><stock>10</stock><regular_price>104.95</regular_price><sale_price>49.93</sale_price><brand>Spy Optic Inc </brand><gender/><category>Sunglasses</category><product_description>The Spy Men's Hsx Sunglasses is packed with all the features and style you expect from the Spy line of sunglasses. The frames are made out of ultra-lightweight and durable Grilamid. An 8x4-base toric arc lenses give you vision without distortion. These glasses are scratch and impact resistant so that they will be your favorite for a long time to come.</product_description><buy_url>http://www.sunandski.com/ProductDetails.asp?ProductCode=0084064919010</buy_url><large_image_url>imgs/products/lrg/0084064919010.jpg</large_image_url><remote_image_url>http://www.sunandski.com/v/vspfiles/photos/0084064919010-2T.jpg</remote_image_url><small_image_url>http://www.sunandski.com/v/vspfiles/photos/0084064919010-1.jpg</small_image_url><size/><savings>53</savings></product><product><product_code>0084064919011</product_code><name>Spy Men's Hsx Sunglasses</name><stock>6</stock><regular_price>149.95</regular_price><sale_price>69.93</sale_price><brand>Spy Optic Inc </brand><gender/><category>Sunglasses</category><product_description>The Spy Men's Hsx Sunglasses are made from lightweight durable Grilamid. It has 8x4 base Toric Arc Lenses give you superior vision without distortion. It offers 100% UV Protection to spare your eyes from the sun s harmful rays. Metal detailing give these glasses extra style.</product_description><buy_url>http://www.sunandski.com/ProductDetails.asp?ProductCode=0084064919011</buy_url><large_image_url>imgs/products/lrg/0084064919011.jpg</large_image_url><remote_image_url>http://www.sunandski.com/v/vspfiles/photos/0084064919011-2T.jpg</remote_image_url><small_image_url>http://www.sunandski.com/v/vspfiles/photos/0084064919011-1.jpg</small_image_url><size/><savings>54</savings></product> </products> XML ); $arr=array(); foreach($xml->product as $aTask) { $arr[]=$aTask; } //print_r($arr); usort($arr,function($a,$b){ return sort($a->category)-strtotime($b->category); }); //print_r($arr); $xml=simplexml_load_string(<<<XML <?xml version="1.0"?> <products> </products> XML ); foreach($arr as $aTask) { $tTask=$xml->addChild($aTask->getName()); $tTask->addChild($aTask->date->getName(),(string)$aTask->name); $tTask->addChild($aTask->title->getName(),(string)$aTask->category); $tTask->addChild($aTask->description->getName(),(string)$aTask->product_description); } echo $xml->asXML();

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.40.0070.01119.22
8.3.30.0110.00320.46
8.3.20.0060.00320.77
8.3.10.0040.00421.29
8.3.00.0040.00423.83
8.2.170.0120.00622.96
8.2.160.0100.01020.76
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.26
8.2.110.0040.00719.64
8.2.100.0060.00618.05
8.2.90.0080.00019.53
8.2.80.0040.00417.97
8.2.70.0080.00017.88
8.2.60.0050.00318.17
8.2.50.0050.00518.07
8.2.40.0030.00618.40
8.2.30.0040.00419.81
8.2.20.0050.00218.02
8.2.10.0030.00618.05
8.2.00.0040.00418.11
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0030.00623.88
8.1.230.0090.00321.10
8.1.220.0090.00018.77
8.1.210.0030.00819.17
8.1.200.0060.00317.72
8.1.190.0000.00817.91
8.1.180.0040.00418.10
8.1.170.0000.00918.88
8.1.160.0060.00319.14
8.1.150.0030.00718.83
8.1.140.0080.00017.77
8.1.130.0000.00717.91
8.1.120.0030.00517.69
8.1.110.0000.00817.64
8.1.100.0040.00417.70
8.1.90.0030.00517.57
8.1.80.0040.00417.68
8.1.70.0040.00417.59
8.1.60.0050.00517.76
8.1.50.0000.00817.76
8.1.40.0030.00617.66
8.1.30.0040.00417.79
8.1.20.0080.00017.86
8.1.10.0070.00017.75
8.1.00.0040.00417.71
8.0.300.0000.01120.29
8.0.290.0040.00417.29
8.0.280.0060.00318.59
8.0.270.0040.00417.58
8.0.260.0040.00417.07
8.0.250.0040.00417.21
8.0.240.0030.00617.28
8.0.230.0000.00817.27
8.0.220.0000.00717.10
8.0.210.0070.00017.10
8.0.200.0000.00717.29
8.0.190.0080.00017.17
8.0.180.0050.00317.29
8.0.170.0000.00717.24
8.0.160.0000.00717.21
8.0.150.0000.00717.03
8.0.140.0080.00317.07
8.0.130.0000.00713.60
8.0.120.0000.00817.20
8.0.110.0040.00417.21
8.0.100.0040.00417.24
8.0.90.0040.00417.09
8.0.80.0030.01317.07
8.0.70.0070.00017.05
8.0.60.0030.00617.09
8.0.50.0050.00217.21
8.0.30.0130.01017.49
8.0.20.0120.00617.40
8.0.10.0070.00017.12
8.0.00.0090.00917.06
7.4.330.0060.00015.31
7.4.320.0070.00017.03
7.4.300.0060.00016.80
7.4.290.0000.00817.09
7.4.280.0000.00816.94
7.4.270.0030.00317.06
7.4.260.0070.00013.70
7.4.250.0050.00317.04
7.4.240.0050.00216.93
7.4.230.0070.00016.98
7.4.220.0070.01117.02
7.4.210.0100.00716.95
7.4.200.0050.00217.14
7.4.190.0000.00717.18
7.4.160.0150.00316.97
7.4.150.0210.00017.40
7.4.140.0100.00817.86
7.4.130.0070.01116.94
7.4.120.0100.00817.12
7.4.110.0060.01217.18
7.4.100.0030.01617.09
7.4.90.0060.01616.98
7.4.80.0100.00719.39
7.4.70.0110.00717.07
7.4.60.0070.01116.90
7.4.50.0030.00617.07
7.4.40.0070.01022.77
7.4.30.0070.01017.14
7.4.00.0060.01115.32
7.3.330.0040.00413.69
7.3.320.0050.00013.77
7.3.310.0000.00716.84
7.3.300.0000.00816.80
7.3.290.0110.00316.87
7.3.280.0070.00816.82
7.3.270.0130.00617.40
7.3.260.0120.00918.24
7.3.250.0130.00816.81
7.3.240.0100.01416.96
7.3.230.0060.01217.09
7.3.210.0090.00917.09
7.3.200.0030.01917.02
7.3.190.0130.00516.77
7.3.180.0110.00617.27
7.3.170.0080.01017.13
7.3.160.0130.00316.99
7.3.120.0100.00315.18
7.3.10.0120.00316.85
7.3.00.0060.00616.92
7.2.330.0090.00917.09
7.2.320.0090.00917.13
7.2.310.0150.00617.09
7.2.300.0130.00317.33
7.2.290.0120.00917.29
7.2.130.0100.00717.23
7.2.120.0100.00717.05
7.2.110.0040.00817.22
7.2.100.0070.00717.41
7.2.90.0080.00317.15
7.2.80.0080.00817.02
7.2.70.0030.00617.39
7.2.60.0060.01217.05
7.2.50.0100.00317.34
7.2.40.0060.00617.44
7.2.30.0090.00017.36
7.2.20.0110.00317.34
7.2.10.0000.01117.35
7.2.00.0020.01418.49
7.1.250.0000.00816.26
7.1.100.0060.00918.33
7.1.70.0000.00917.18
7.1.60.0130.01019.17
7.1.50.0100.01317.39
7.1.00.0000.07022.59
7.0.200.0070.01015.45
7.0.140.0100.06722.16
7.0.90.0330.05320.11
7.0.80.0570.03720.05
7.0.70.0600.08020.13
7.0.60.0530.05020.01
7.0.50.0570.06720.46
7.0.40.0030.08320.18
7.0.30.0100.05720.05
7.0.20.0070.09320.14
7.0.10.0200.06020.16
7.0.00.0070.09020.05
5.6.280.0000.07721.11
5.6.230.0070.08020.58
5.6.220.0070.08020.81
5.6.210.0130.07320.89
5.6.200.0030.04721.13
5.6.190.0100.05021.12
5.6.180.0030.08321.21
5.6.170.0070.09021.14
5.6.160.0100.08321.16
5.6.150.0030.09021.29
5.6.140.0070.08321.22
5.6.130.0000.06321.17
5.6.120.0100.05721.24
5.6.110.0130.07321.17
5.6.100.0070.05021.00
5.6.90.0200.06321.14
5.6.80.0030.06320.60
5.6.70.0100.05320.50
5.6.60.0170.06720.61
5.6.50.0130.08020.54
5.6.40.0030.08720.62
5.6.30.0170.06720.39
5.6.20.0030.08320.39
5.6.10.0030.08020.57
5.6.00.0030.08020.49
5.5.370.0130.07320.46
5.5.360.0030.08720.47
5.5.350.0130.05320.39
5.5.340.0200.04020.90
5.5.330.0130.08021.00
5.5.320.0100.08020.91
5.5.310.0130.07320.96
5.5.300.0000.08720.93
5.5.290.0070.08021.04
5.5.280.0130.07320.96
5.5.270.0070.08321.00
5.5.260.0030.08720.90
5.5.250.0100.04020.72
5.5.240.0070.07020.39
5.5.230.0130.04720.37
5.5.220.0130.04020.26
5.5.210.0100.04020.43
5.5.200.0100.05020.27
5.5.190.0100.07720.31
5.5.180.0130.04320.32
5.5.160.0100.07320.23
5.5.150.0000.08720.42
5.5.140.0100.08020.28
5.5.130.0100.07320.25
5.5.120.0100.05020.22
5.5.110.0070.08020.25
5.5.100.0030.07720.29
5.5.90.0030.08320.27
5.5.80.0030.08320.14
5.5.70.0070.05320.16
5.5.60.0130.06720.25
5.5.50.0000.07720.11
5.5.40.0100.06020.20
5.5.30.0000.08720.29
5.5.20.0130.03720.28
5.5.10.0070.06720.23
5.5.00.0100.03720.10
5.4.450.0100.07719.30
5.4.440.0070.08319.61
5.4.430.0030.06719.56
5.4.420.0070.05019.61
5.4.410.0130.03719.50
5.4.400.0130.07319.19
5.4.390.0170.06719.14
5.4.380.0030.08019.30
5.4.370.0100.03719.18
5.4.360.0070.08319.14
5.4.350.0100.08019.14
5.4.340.0070.06719.25
5.4.320.0070.07019.13
5.4.310.0000.04719.13
5.4.300.0070.07319.29
5.4.290.0200.06319.27
5.4.280.0070.07018.94
5.4.270.0030.07719.03
5.4.260.0070.06719.25
5.4.250.0070.08319.30
5.4.240.0030.05718.96
5.4.230.0070.07319.29
5.4.220.0100.07719.12
5.4.210.0070.06019.03
5.4.200.0030.06019.25
5.4.190.0030.08318.95
5.4.180.0100.07719.33
5.4.170.0200.06019.12
5.4.160.0130.06719.10
5.4.150.0030.08319.27
5.4.140.0030.05316.58
5.4.130.0030.05716.64
5.4.120.0100.07316.61
5.4.110.0030.04716.65
5.4.100.0030.04716.61
5.4.90.0170.06016.59
5.4.80.0130.03716.64
5.4.70.0100.04716.52
5.4.60.0030.04316.60
5.4.50.0030.04716.61
5.4.40.0100.06316.63
5.4.30.0070.07016.51
5.4.20.0130.06716.54
5.4.10.0200.04316.60
5.4.00.0030.05316.13
5.3.290.0030.07714.86
5.3.280.0130.07014.88
5.3.270.0100.07014.81
5.3.260.0100.06714.82
5.3.250.0100.07314.85
5.3.240.0130.06714.77
5.3.230.0100.04714.67
5.3.220.0130.07014.73
5.3.210.0070.08014.84
5.3.200.0000.05014.66
5.3.190.0100.07714.66
5.3.180.0100.05314.71
5.3.170.0070.07314.75
5.3.160.0000.04314.76
5.3.150.0130.07314.80
5.3.140.0100.07314.71
5.3.130.0070.05714.79
5.3.120.0000.04714.79
5.3.110.0000.07314.70
5.3.100.0070.05314.18
5.3.90.0030.05714.10
5.3.80.0070.08014.23
5.3.70.0030.06314.29
5.3.60.0130.04714.16
5.3.50.0070.07014.23
5.3.40.0000.05314.09
5.3.30.0000.04314.19
5.3.20.0100.04013.88
5.3.10.0130.07313.80
5.3.00.0100.07313.80
5.2.170.0070.04313.68
5.2.160.0030.06313.68
5.2.150.0100.03713.68
5.2.140.0000.04313.68
5.2.130.0100.05313.68
5.2.120.0030.04313.68
5.2.110.0000.03313.68
5.2.100.0070.04313.68
5.2.90.0000.07013.68
5.2.80.0070.03013.68
5.2.70.0070.06013.68
5.2.60.0070.06013.68
5.2.50.0030.05313.68
5.2.40.0070.06313.68
5.2.30.0130.05313.68
5.2.20.0070.05313.68
5.2.10.0100.05713.68
5.2.00.0070.05713.68
5.1.60.0070.04013.68
5.1.50.0100.05013.68
5.1.40.0130.04313.68
5.1.30.0030.05013.68
5.1.20.0100.05013.68
5.1.10.0070.04013.68
5.1.00.0070.04013.68
5.0.50.0100.03013.68
5.0.40.0030.02713.68
5.0.30.0030.06313.68
5.0.20.0070.03313.68
5.0.10.0000.03313.68
5.0.00.0030.04313.68
4.4.90.0000.02713.68
4.4.80.0030.02013.68
4.4.70.0030.03713.68
4.4.60.0070.03013.68
4.4.50.0070.02313.68
4.4.40.0000.04013.68
4.4.30.0070.03313.68
4.4.20.0000.03313.68
4.4.10.0000.03013.68
4.4.00.0000.05313.68
4.3.110.0070.03313.68
4.3.100.0000.03713.68
4.3.90.0000.02313.68
4.3.80.0030.05013.68
4.3.70.0000.03713.68
4.3.60.0000.02313.68
4.3.50.0070.02013.68
4.3.40.0030.05013.68
4.3.30.0000.03713.68
4.3.20.0000.04013.68
4.3.10.0000.03313.68
4.3.00.0000.03313.68

preferences:
37.54 ms | 400 KiB | 5 Q