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();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 91
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 91
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 91
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 91
filename:       /in/LIuuA
function name:  (null)
number of ops:  96
compiled vars:  !0 = $row, !1 = $dom, !2 = $node, !3 = $parnode, !4 = $value, !5 = $key, !6 = $address, !7 = $distance, !8 = $contactPerson, !9 = $marker, !10 = $newnode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   69     1        NEW                                              $12     'DOMDocument'
          2        SEND_VAL_EX                                              '1.0'
          3        SEND_VAL_EX                                              'UTF-8'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $12
   70     6        INIT_METHOD_CALL                                         !1, 'createElement'
          7        SEND_VAL_EX                                              'Markers'
          8        DO_FCALL                                      0  $15     
          9        ASSIGN                                                   !2, $15
   71    10        INIT_METHOD_CALL                                         !1, 'appendChild'
         11        SEND_VAR_EX                                              !2
         12        DO_FCALL                                      0  $17     
         13        ASSIGN                                                   !3, $17
   73    14      > FE_RESET_R                                       $19     !0, ->91
         15    > > FE_FETCH_R                                       ~20     $19, !4, ->91
         16    >   ASSIGN                                                   !5, ~20
   75    17        FETCH_DIM_R                                      ~22     !4, 'billing_street'
         18        CONCAT                                           ~23     ~22, '%2C'
         19        FETCH_DIM_R                                      ~24     !4, 'billing_country_id'
         20        CONCAT                                           ~25     ~23, ~24
         21        CONCAT                                           ~26     ~25, '-'
         22        FETCH_DIM_R                                      ~27     !4, 'billing_postcode'
         23        CONCAT                                           ~28     ~26, ~27
         24        CONCAT                                           ~29     ~28, '+'
         25        FETCH_DIM_R                                      ~30     !4, 'billing_city'
         26        CONCAT                                           ~31     ~29, ~30
         27        ASSIGN                                                   !6, ~31
   76    28        ASSIGN                                                   !7, 0
   77    29        FETCH_DIM_R                                      ~34     !4, 'billing_firstname'
         30        CONCAT                                           ~35     ~34, '+'
         31        FETCH_DIM_R                                      ~36     !4, 'billing_lastname'
         32        CONCAT                                           ~37     ~35, ~36
         33        ASSIGN                                                   !8, ~37
   84    34        INIT_METHOD_CALL                                         !1, 'createElement'
         35        SEND_VAL_EX                                              'Marker'
         36        DO_FCALL                                      0  $39     
         37        ASSIGN                                                   !9, $39
   85    38        INIT_METHOD_CALL                                         !3, 'appendChild'
         39        SEND_VAR_EX                                              !9
         40        DO_FCALL                                      0  $41     
         41        ASSIGN                                                   !10, $41
   86    42        INIT_METHOD_CALL                                         !10, 'setAttribute'
         43        SEND_VAL_EX                                              'StoreId'
         44        CHECK_FUNC_ARG                                           
         45        FETCH_DIM_FUNC_ARG                               $43     !4, 'store_id'
         46        SEND_FUNC_ARG                                            $43
         47        DO_FCALL                                      0          
   87    48        INIT_METHOD_CALL                                         !10, 'setAttribute'
         49        SEND_VAL_EX                                              'Lat'
         50        CHECK_FUNC_ARG                                           
         51        FETCH_DIM_FUNC_ARG                               $45     !4, 'tom_geo_latitude'
         52        SEND_FUNC_ARG                                            $45
         53        DO_FCALL                                      0          
   88    54        INIT_METHOD_CALL                                         !10, 'setAttribute'
         55        SEND_VAL_EX                                              'Lng'
         56        CHECK_FUNC_ARG                                           
         57        FETCH_DIM_FUNC_ARG                               $47     !4, 'tom_geo_longitude'
         58        SEND_FUNC_ARG                                            $47
         59        DO_FCALL                                      0          
   89    60        INIT_METHOD_CALL                                         !10, 'setAttribute'
         61        SEND_VAL_EX                                              'Distance'
         62        SEND_VAR_EX                                              !7
         63        DO_FCALL                                      0          
   90    64        INIT_METHOD_CALL                                         !10, 'setAttribute'
         65        SEND_VAL_EX                                              'ImgUrl'
         66        CHECK_FUNC_ARG                                           
         67        FETCH_DIM_FUNC_ARG                               $50     !5, 'ImgUrl'
         68        SEND_FUNC_ARG                                            $50
         69        DO_FCALL                                      0          
   91    70        INIT_METHOD_CALL                                         !10, 'setAttribute'
         71        SEND_VAL_EX                                              'CategoryIcon'
         72        SEND_VAL_EX                                              '%2Fskin%2Ffrontend%2Fdefault%2Fsolarinvert%2Ftom%2Fdealer%2Fdefault.png'
         73        DO_FCALL                                      0          
   92    74        INIT_METHOD_CALL                                         !10, 'setAttribute'
         75        SEND_VAL_EX                                              'Contactperson'
         76        SEND_VAR_EX                                              !8
         77        DO_FCALL                                      0          
   93    78        INIT_METHOD_CALL                                         !10, 'setAttribute'
         79        SEND_VAL_EX                                              'Phone'
         80        CHECK_FUNC_ARG                                           
         81        FETCH_DIM_FUNC_ARG                               $54     !4, 'billing_telephone'
         82        SEND_FUNC_ARG                                            $54
         83        DO_FCALL                                      0          
   94    84        INIT_METHOD_CALL                                         !10, 'setAttribute'
         85        SEND_VAL_EX                                              'Logo'
         86        CHECK_FUNC_ARG                                           
         87        FETCH_DIM_FUNC_ARG                               $56     !4, 'logo'
         88        SEND_FUNC_ARG                                            $56
         89        DO_FCALL                                      0          
   73    90      > JMP                                                      ->15
         91    >   FE_FREE                                                  $19
  145    92        INIT_METHOD_CALL                                         !1, 'saveXML'
         93        DO_FCALL                                      0  $58     
         94        ECHO                                                     $58
         95      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.91 ms | 1403 KiB | 13 Q