3v4l.org

run code in 300+ PHP versions simultaneously
<?php $row = array(31) { 'entity_id' => string(2) "14" 'entity_type_id' => string(1) "1" 'attribute_set_id' => string(1) "0" 'website_id' => string(1) "1" 'email' => string(29) "office@solarpower-augsburg.de" 'group_id' => string(1) "1" 'increment_id' => string(9) "000000011" 'store_id' => string(1) "0" 'created_at' => string(19) "2013-10-22 10:28:59" 'updated_at' => string(19) "2013-10-22 10:51:50" 'is_active' => string(1) "1" 'disable_auto_group_change' => string(1) "0" 'prefix' => string(4) "Herr" 'firstname' => string(9) "Gabriele " 'middlename' => NULL 'lastname' => string(5) "Ament" 'suffix' => string(26) "Solarpower Energy for Life" 'name' => string(46) "Herr Gabriele Ament Solarpower Energy for Life" 'is_partner' => string(1) "1" 'default_billing' => string(2) "16" 'billing_firstname' => string(9) "Gabriele " 'billing_lastname' => string(5) "Ament" 'billing_postcode' => string(5) "86199" 'billing_city' => string(8) "Augsburg" 'billing_telephone' => string(14) "0821·90732-50" 'billing_country_id' => string(2) "DE" 'billing_street' => string(20) "Zum Fuggerschloß 38" 'billing_region' => string(6) "Bayern" 'billing_company' => string(46) "Solarpower Energy for Life Gabriele Ament e.K." 'tom_geo_latitude' => string(10) "48.3237705" 'tom_geo_longitude' => string(10) "10.8221745" } $dom = new DOMDocument("1.0","UTF-8"); $node = $dom->createElement("Markers"); $parnode = $dom->appendChild($node); $this->getResponse()->setHeader('Content-Type','text/xml','utf8'); foreach ($row as $key => $value) { $address = $value['billing_street'] .','. $value['billing_country_id'] .'-'. $value['billing_postcode'] .' '. $value['billing_city']; $distance = 6371 * acos( cos( deg2rad($qryVal[0]) ) * cos( deg2rad( $value['tom_geo_latitude'] ) ) * cos( deg2rad( $value['tom_geo_longitude'] ) - deg2rad($qryVal[1]) ) + sin( deg2rad($qryVal[0]) ) * sin(deg2rad( $value['tom_geo_latitude'] ) ) ); $contactPerson = $value['billing_firstname'] .' '. $value['billing_lastname']; // ADD TO XML DOCUMENT NODE $marker = $dom->createElement("Marker"); $newnode = $parnode->appendChild($marker); $newnode->setAttribute("StoreId", $value['store_id']); $newnode->setAttribute("Lat", $value['tom_geo_latitude']); $newnode->setAttribute("Lng", $value['tom_geo_longitude']); $newnode->setAttribute("Distance", $distance); $newnode->setAttribute("ImgUrl", $key['ImgUrl']); $newnode->setAttribute("CategoryIcon", '/skin/frontend/default/solarinvert/tom/dealer/default.png'); $newnode->setAttribute("Contactperson", $contactPerson); $newnode->setAttribute("Phone", $value['billing_telephone']); $newnode->setAttribute("Logo", $value['logo']); /* $newnode->setAttribute("Country", $value['billing_country_id']); $newnode->setAttribute("Fax", $value['billing_fax']); $newnode->setAttribute("Address", $address); $newnode->setAttribute("Type", $value['Type']); $newnode->setAttribute("Email", $value['email']); $newnode->setAttribute("Website", $value['Website']); $newnode->setAttribute("State", $value['billing_region']); $newnode->setAttribute("City", $value['billing_city']); $newnode->setAttribute("Name", $value['billing_company']); */ // $newnode->setAttribute("LabelId", $key['LabelId']); // $newnode->setAttribute("LabelText", $key['LabelText']); // $newnode->setAttribute("Google", $key['Google']); // $newnode->setAttribute("Facebook", $key['Facebook']); // $newnode->setAttribute("Twitter", $key['Twitter']); // $newnode->setAttribute("Printrest", $key['Printrest']); // $newnode->setAttribute("Gallery", $row['Gallery']); // $newnode->setAttribute("Info", $row['Info']); // $newnode->setAttribute("Working", $row['Working']); // $newnode->setAttribute("Video", $row['Video']); // $newnode->setAttribute("Direction", $row['Direction']); } echo $dom->saveXML(); }

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)
5.4.230.0200.07319.05
5.4.220.0270.06019.21
5.4.210.0200.04319.30
5.4.200.0300.04319.31
5.4.190.0130.05319.21
5.4.180.0230.07019.07
5.4.170.0230.04318.86
5.4.160.0230.07019.04
5.4.150.0130.08018.93
5.4.140.0230.05716.52
5.4.130.0200.05716.50
5.4.120.0300.03316.37
5.4.110.0270.05016.35
5.4.100.0300.05316.27
5.4.90.0200.06716.42
5.4.80.0300.05716.26
5.4.70.0270.06716.46
5.4.60.0300.06316.56
5.4.50.0270.03716.36
5.4.40.0200.05016.25
5.4.30.0270.06716.42
5.4.20.0330.04016.53
5.4.10.0170.05316.52
5.4.00.0200.05016.20
5.3.280.0230.04314.53
5.3.270.0230.05314.60
5.3.260.0200.07014.58
5.3.250.0230.06714.46
5.3.240.0200.04314.51
5.3.230.0230.07014.51
5.3.220.0200.04314.40
5.3.210.0200.06014.43
5.3.200.0170.06014.40
5.3.190.0200.06314.42
5.3.180.0270.06314.43
5.3.170.0230.05014.51
5.3.160.0200.08014.61
5.3.150.0330.07014.52
5.3.140.0270.04714.41
5.3.130.0330.07314.60
5.3.120.0230.06714.41
5.3.110.0270.07014.50
5.3.100.0230.05013.99
5.3.90.0200.04013.86
5.3.80.0170.04014.11
5.3.70.0230.04013.96
5.3.60.0200.04314.05
5.3.50.0300.06713.79
5.3.40.0170.06713.74
5.3.30.0200.07013.76
5.3.20.0230.06713.62
5.3.10.0300.06013.61
5.3.00.0100.04313.61

preferences:
141.21 ms | 1394 KiB | 7 Q