3v4l.org

run code in 300+ PHP versions simultaneously
<?php $row = array(array( 'entity_id' => "14", 'entity_type_id' => "1", 'attribute_set_id' => "0", 'website_id' => "1", 'email' => "office@solarpower-augsburg.de", 'group_id' => "1", 'increment_id' => "000000011", 'store_id' => "0", 'created_at' => "2013-10-22 10:28:59", 'updated_at' => "2013-10-22 10:51:50", 'is_active' => "1", 'disable_auto_group_change' => "0", 'prefix' => "Herr", 'firstname' => "Gabriele ", 'middlename' => NULL, 'lastname' => "Ament", 'suffix' => "Solarpower Energy for Life", 'name' => "Herr Gabriele Ament Solarpower Energy for Life", 'is_partner' => "1", 'default_billing' => "16", 'billing_firstname' => "Gabriele ", 'billing_lastname' => "Ament", 'billing_postcode' => "86199", 'billing_city' => "Augsburg", 'billing_telephone' => "0821·90732-50", 'billing_country_id' => "DE", 'billing_street' => "Zum Fuggerschloß 38", 'billing_region' => "Bayern", 'billing_company' => "Solarpower Energy for Life Gabriele Ament e.K.", 'tom_geo_latitude' => "48.3237705", 'tom_geo_longitude' => "10.8221745", ) ); $dom = new DOMDocument("1.0","UTF-8"); $node = $dom->createElement("Markers"); $parnode = $dom->appendChild($node); foreach ($row as $key => $value) { $address = $value['billing_street'] .','. $value['billing_country_id'] .'-'. $value['billing_postcode'] .' '. $value['billing_city']; $distance = 6371 * 0; $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();
Output for git.master, git.master_jit
Warning: Trying to access array offset on value of type int in /in/LIuuA on line 90 Deprecated: DOMElement::setAttribute(): Passing null to parameter #2 ($value) of type string is deprecated in /in/LIuuA on line 90 Warning: Undefined array key "logo" in /in/LIuuA on line 94 Deprecated: DOMElement::setAttribute(): Passing null to parameter #2 ($value) of type string is deprecated in /in/LIuuA on line 94 <?xml version="1.0" encoding="UTF-8"?> <Markers><Marker StoreId="0" Lat="48.3237705" Lng="10.8221745" Distance="0" ImgUrl="" CategoryIcon="/skin/frontend/default/solarinvert/tom/dealer/default.png" Contactperson="Gabriele Ament" Phone="0821·90732-50" Logo=""/></Markers>
Output for rfc.property-hooks
Warning: Trying to access array offset on int in /in/LIuuA on line 90 Deprecated: DOMElement::setAttribute(): Passing null to parameter #2 ($value) of type string is deprecated in /in/LIuuA on line 90 Warning: Undefined array key "logo" in /in/LIuuA on line 94 Deprecated: DOMElement::setAttribute(): Passing null to parameter #2 ($value) of type string is deprecated in /in/LIuuA on line 94 <?xml version="1.0" encoding="UTF-8"?> <Markers><Marker StoreId="0" Lat="48.3237705" Lng="10.8221745" Distance="0" ImgUrl="" CategoryIcon="/skin/frontend/default/solarinvert/tom/dealer/default.png" Contactperson="Gabriele Ament" Phone="0821·90732-50" Logo=""/></Markers>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
37.7 ms | 402 KiB | 8 Q