3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<< EOT <?xml version='1.0' encoding='UTF-8'?> <response> <apiKey id="1" apikey="1474C404-1DB4-4EA0-B2C2-516E86CB4F69">API key ok.</apiKey> <apiKeyMessage>...</apiKeyMessage> <Configuration VisibileToDeveloper="True">...</Configuration> <propertySearchSales> <properties rentalperiod="0"> <pages page="1" count="6" pageCount="1" perPage="10"> <page number="1" selected="true"/> </pages> <property id="2225088" eaid="1221" bid="1953" rescomnew="1" longitude="33.0225" latitude="34.70676" dateSTC="" dateInstructed="18/07/2011" featured="false" price="€26,000" priceVal="26000" currency="EUR" rentalperiod="1" updated="19/9/2013 14:25:59" bedrooms="3" bathrooms="0" receptions="0" garages="0" gardens="0" otherrooms="0" specials="0" parkingSpaces="0" metropix="0" virturaltour="" propertyType="57" hits="2827" leaseType="1" EATel="00357 99 207000" period="Not Applicable" sold="0" UO_LA="false" picture="true" EER_Current="0" EER_Potential="0" EIR_Current="0" EIR_Potential="0" portfolio="false">...</property> <property id="2242068" eaid="1221" bid="1953" rescomnew="1" longitude="0" latitude="0" dateSTC="" dateInstructed="18/07/2011" featured="false" price="€29,770" priceVal="29770" currency="EUR" rentalperiod="1" updated="17/8/2011 08:55:20" bedrooms="3" bathrooms="0" receptions="0" garages="0" gardens="0" otherrooms="0" specials="0" parkingSpaces="0" metropix="0" virturaltour="" propertyType="57" hits="2707" leaseType="1" EATel="00357 99 207000" period="Not Applicable" sold="0" UO_LA="false" picture="true" EER_Current="0" EER_Potential="0" EIR_Current="0" EIR_Potential="0" portfolio="false">...</property> <property id="2242067" eaid="1221" bid="1953" rescomnew="1" longitude="33.0225" latitude="34.70676" dateSTC="" dateInstructed="18/07/2011" featured="false" price="€31,200" priceVal="31200" currency="EUR" rentalperiod="1" updated="19/9/2013 14:26:27" bedrooms="3" bathrooms="0" receptions="0" garages="0" gardens="0" otherrooms="0" specials="0" parkingSpaces="0" metropix="0" virturaltour="" propertyType="57" hits="2810" leaseType="1" EATel="00357 99 207000" period="Not Applicable" sold="0" UO_LA="false" picture="true" EER_Current="0" EER_Potential="0" EIR_Current="0" EIR_Potential="0" portfolio="false">...</property> <property id="2242066" eaid="1221" bid="1953" rescomnew="1" longitude="0" latitude="0" dateSTC="" dateInstructed="18/07/2011" featured="false" price="€31,525" priceVal="31525" currency="EUR" rentalperiod="1" updated="18/7/2011 13:43:07" bedrooms="3" bathrooms="0" receptions="0" garages="0" gardens="0" otherrooms="0" specials="0" parkingSpaces="0" metropix="0" virturaltour="" propertyType="57" hits="2705" leaseType="1" EATel="00357 99 207000" period="Not Applicable" sold="0" UO_LA="false" picture="true" EER_Current="0" EER_Potential="0" EIR_Current="0" EIR_Potential="0" portfolio="false">...</property> <property id="2241909" eaid="1221" bid="1953" rescomnew="1" longitude="0" latitude="0" dateSTC="" dateInstructed="18/07/2011" featured="false" price="€31,850" priceVal="31850" currency="EUR" rentalperiod="1" updated="13/3/2013 06:37:23" bedrooms="3" bathrooms="0" receptions="0" garages="0" gardens="0" otherrooms="0" specials="0" parkingSpaces="0" metropix="0" virturaltour="" propertyType="57" hits="2803" leaseType="1" EATel="00357 99 207000" period="Not Applicable" sold="0" UO_LA="false" picture="true" EER_Current="0" EER_Potential="0" EIR_Current="0" EIR_Potential="0" portfolio="false">...</property> <property id="2242117" eaid="1221" bid="1953" rescomnew="1" longitude="0" latitude="0" dateSTC="" dateInstructed="18/07/2011" featured="false" price="€33,345" priceVal="33345" currency="EUR" rentalperiod="1" updated="18/7/2011 13:20:26" bedrooms="3" bathrooms="0" receptions="0" garages="0" gardens="0" otherrooms="0" specials="0" parkingSpaces="0" metropix="0" virturaltour="" propertyType="57" hits="2701" leaseType="1" EATel="00357 99 207000" period="Not Applicable" sold="0" UO_LA="false" picture="true" EER_Current="0" EER_Potential="0" EIR_Current="0" EIR_Potential="0" portfolio="false">...</property> <searchParameters minPrice="0" maxPrice="99999999" branchList="" eaid="1221" propertyType="" listDefsPropertyType="" bedrooms="0" bathrooms="0" receptions="0" garages="0" gardens="0" parkingSpaces="0" showSTC="" allAddressFields="Croatia" sa1="" sa2="" town="" city="" county="" postcode="" location="" locationAND="" classification="" descending="" currency="" page="1" perPage="10" sessionGUID="53b8fbf5-6a0e-4f3e-a703-a0fbcdaf7606"/> </properties> </propertySearchSales> </response> EOT; $simpleXML = simplexml_load_string($xml); // Load XML string data into the simplexml object parser foreach ($simpleXML->result->rowset->row as $row) { $titles = []; $name = $row['name']->__toString(); foreach($row as $attrib){ if($attrib['name']->__toString() === 'titles'){ foreach($attrib as $title){ $titles[] = $title['titleName']->__toString(); } } } echo $name . ' : ' . implode(' - ', $titles) . "<br/>\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 42
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 42
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 32
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 32
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 31
Branch analysis from position: 22
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 30
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 30
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 30
Branch analysis from position: 31
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 32
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
filename:       /in/iiNQb
function name:  (null)
number of ops:  44
compiled vars:  !0 = $xml, !1 = $simpleXML, !2 = $row, !3 = $titles, !4 = $name, !5 = $attrib, !6 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%271.0%27+encoding%3D%27UTF-8%27%3F%3E%0A%3Cresponse%3E%0A%3CapiKey+id%3D%221%22+apikey%3D%221474C404-1DB4-4EA0-B2C2-516E86CB4F69%22%3EAPI+key+ok.%3C%2FapiKey%3E%0A%3CapiKeyMessage%3E...%3C%2FapiKeyMessage%3E%0A%3CConfiguration+VisibileToDeveloper%3D%22True%22%3E...%3C%2FConfiguration%3E%0A%3CpropertySearchSales%3E%0A%3Cproperties+rentalperiod%3D%220%22%3E%0A%3Cpages+page%3D%221%22+count%3D%226%22+pageCount%3D%221%22+perPage%3D%2210%22%3E%0A%3Cpage+number%3D%221%22+selected%3D%22true%22%2F%3E%0A%3C%2Fpages%3E%0A%3Cproperty+id%3D%222225088%22+eaid%3D%221221%22+bid%3D%221953%22+rescomnew%3D%221%22+longitude%3D%2233.0225%22+latitude%3D%2234.70676%22+dateSTC%3D%22%22+dateInstructed%3D%2218%2F07%2F2011%22+featured%3D%22false%22+price%3D%22%E2%82%AC26%2C000%22+priceVal%3D%2226000%22+currency%3D%22EUR%22+rentalperiod%3D%221%22+updated%3D%2219%2F9%2F2013+14%3A25%3A59%22+bedrooms%3D%223%22+bathrooms%3D%220%22+receptions%3D%220%22+garages%3D%220%22+gardens%3D%220%22+otherrooms%3D%220%22+specials%3D%220%22+parkingSpaces%3D%220%22+metropix%3D%220%22+virturaltour%3D%22%22+propertyType%3D%2257%22+hits%3D%222827%22+leaseType%3D%221%22+EATel%3D%2200357+99+207000%22+period%3D%22Not+Applicable%22+sold%3D%220%22+UO_LA%3D%22false%22+picture%3D%22true%22+EER_Current%3D%220%22+EER_Potential%3D%220%22+EIR_Current%3D%220%22+EIR_Potential%3D%220%22+portfolio%3D%22false%22%3E...%3C%2Fproperty%3E%0A%3Cproperty+id%3D%222242068%22+eaid%3D%221221%22+bid%3D%221953%22+rescomnew%3D%221%22+longitude%3D%220%22+latitude%3D%220%22+dateSTC%3D%22%22+dateInstructed%3D%2218%2F07%2F2011%22+featured%3D%22false%22+price%3D%22%E2%82%AC29%2C770%22+priceVal%3D%2229770%22+currency%3D%22EUR%22+rentalperiod%3D%221%22+updated%3D%2217%2F8%2F2011+08%3A55%3A20%22+bedrooms%3D%223%22+bathrooms%3D%220%22+receptions%3D%220%22+garages%3D%220%22+gardens%3D%220%22+otherrooms%3D%220%22+specials%3D%220%22+parkingSpaces%3D%220%22+metropix%3D%220%22+virturaltour%3D%22%22+propertyType%3D%2257%22+hits%3D%222707%22+leaseType%3D%221%22+EATel%3D%2200357+99+207000%22+period%3D%22Not+Applicable%22+sold%3D%220%22+UO_LA%3D%22false%22+picture%3D%22true%22+EER_Current%3D%220%22+EER_Potential%3D%220%22+EIR_Current%3D%220%22+EIR_Potential%3D%220%22+portfolio%3D%22false%22%3E...%3C%2Fproperty%3E%0A%3Cproperty+id%3D%222242067%22+eaid%3D%221221%22+bid%3D%221953%22+rescomnew%3D%221%22+longitude%3D%2233.0225%22+latitude%3D%2234.70676%22+dateSTC%3D%22%22+dateInstructed%3D%2218%2F07%2F2011%22+featured%3D%22false%22+price%3D%22%E2%82%AC31%2C200%22+priceVal%3D%2231200%22+currency%3D%22EUR%22+rentalperiod%3D%221%22+updated%3D%2219%2F9%2F2013+14%3A26%3A27%22+bedrooms%3D%223%22+bathrooms%3D%220%22+receptions%3D%220%22+garages%3D%220%22+gardens%3D%220%22+otherrooms%3D%220%22+specials%3D%220%22+parkingSpaces%3D%220%22+metropix%3D%220%22+virturaltour%3D%22%22+propertyType%3D%2257%22+hits%3D%222810%22+leaseType%3D%221%22+EATel%3D%2200357+99+207000%22+period%3D%22Not+Applicable%22+sold%3D%220%22+UO_LA%3D%22false%22+picture%3D%22true%22+EER_Current%3D%220%22+EER_Potential%3D%220%22+EIR_Current%3D%220%22+EIR_Potential%3D%220%22+portfolio%3D%22false%22%3E...%3C%2Fproperty%3E%0A%3Cproperty+id%3D%222242066%22+eaid%3D%221221%22+bid%3D%221953%22+rescomnew%3D%221%22+longitude%3D%220%22+latitude%3D%220%22+dateSTC%3D%22%22+dateInstructed%3D%2218%2F07%2F2011%22+featured%3D%22false%22+price%3D%22%E2%82%AC31%2C525%22+priceVal%3D%2231525%22+currency%3D%22EUR%22+rentalperiod%3D%221%22+updated%3D%2218%2F7%2F2011+13%3A43%3A07%22+bedrooms%3D%223%22+bathrooms%3D%220%22+receptions%3D%220%22+garages%3D%220%22+gardens%3D%220%22+otherrooms%3D%220%22+specials%3D%220%22+parkingSpaces%3D%220%22+metropix%3D%220%22+virturaltour%3D%22%22+propertyType%3D%2257%22+hits%3D%222705%22+leaseType%3D%221%22+EATel%3D%2200357+99+207000%22+period%3D%22Not+Applicable%22+sold%3D%220%22+UO_LA%3D%22false%22+picture%3D%22true%22+EER_Current%3D%220%22+EER_Potential%3D%220%22+EIR_Current%3D%220%22+EIR_Potential%3D%220%22+portfolio%3D%22false%22%3E...%3C%2Fproperty%3E%0A%3Cproperty+id%3D%222241909%22+eaid%3D%221221%22+bid%3D%221953%22+rescomnew%3D%221%22+longitude%3D%220%22+latitude%3D%220%22+dateSTC%3D%22%22+dateInstructed%3D%2218%2F07%2F2011%22+featured%3D%22false%22+price%3D%22%E2%82%AC31%2C850%22+priceVal%3D%2231850%22+currency%3D%22EUR%22+rentalperiod%3D%221%22+updated%3D%2213%2F3%2F2013+06%3A37%3A23%22+bedrooms%3D%223%22+bathrooms%3D%220%22+receptions%3D%220%22+garages%3D%220%22+gardens%3D%220%22+otherrooms%3D%220%22+specials%3D%220%22+parkingSpaces%3D%220%22+metropix%3D%220%22+virturaltour%3D%22%22+propertyType%3D%2257%22+hits%3D%222803%22+leaseType%3D%221%22+EATel%3D%2200357+99+207000%22+period%3D%22Not+Applicable%22+sold%3D%220%22+UO_LA%3D%22false%22+picture%3D%22true%22+EER_Current%3D%220%22+EER_Potential%3D%220%22+EIR_Current%3D%220%22+EIR_Potential%3D%220%22+portfolio%3D%22false%22%3E...%3C%2Fproperty%3E%0A%3Cproperty+id%3D%222242117%22+eaid%3D%221221%22+bid%3D%221953%22+rescomnew%3D%221%22+longitude%3D%220%22+latitude%3D%220%22+dateSTC%3D%22%22+dateInstructed%3D%2218%2F07%2F2011%22+featured%3D%22false%22+price%3D%22%E2%82%AC33%2C345%22+priceVal%3D%2233345%22+currency%3D%22EUR%22+rentalperiod%3D%221%22+updated%3D%2218%2F7%2F2011+13%3A20%3A26%22+bedrooms%3D%223%22+bathrooms%3D%220%22+receptions%3D%220%22+garages%3D%220%22+gardens%3D%220%22+otherrooms%3D%220%22+specials%3D%220%22+parkingSpaces%3D%220%22+metropix%3D%220%22+virturaltour%3D%22%22+propertyType%3D%2257%22+hits%3D%222701%22+leaseType%3D%221%22+EATel%3D%2200357+99+207000%22+period%3D%22Not+Applicable%22+sold%3D%220%22+UO_LA%3D%22false%22+picture%3D%22true%22+EER_Current%3D%220%22+EER_Potential%3D%220%22+EIR_Current%3D%220%22+EIR_Potential%3D%220%22+portfolio%3D%22false%22%3E...%3C%2Fproperty%3E%0A%3CsearchParameters+minPrice%3D%220%22+maxPrice%3D%2299999999%22+branchList%3D%22%22+eaid%3D%221221%22+propertyType%3D%22%22+listDefsPropertyType%3D%22%22+bedrooms%3D%220%22+bathrooms%3D%220%22+receptions%3D%220%22+garages%3D%220%22+gardens%3D%220%22+parkingSpaces%3D%220%22+showSTC%3D%22%22+allAddressFields%3D%22Croatia%22+sa1%3D%22%22+sa2%3D%22%22+town%3D%22%22+city%3D%22%22+county%3D%22%22+postcode%3D%22%22+location%3D%22%22+locationAND%3D%22%22+classification%3D%22%22+descending%3D%22%22+currency%3D%22%22+page%3D%221%22+perPage%3D%2210%22+sessionGUID%3D%2253b8fbf5-6a0e-4f3e-a703-a0fbcdaf7606%22%2F%3E%0A%3C%2Fproperties%3E%0A%3C%2FpropertySearchSales%3E%0A%3C%2Fresponse%3E'
   25     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $8      
          4        ASSIGN                                                   !1, $8
   27     5        FETCH_OBJ_R                                      ~10     !1, 'result'
          6        FETCH_OBJ_R                                      ~11     ~10, 'rowset'
          7        FETCH_OBJ_R                                      ~12     ~11, 'row'
          8      > FE_RESET_R                                       $13     ~12, ->42
          9    > > FE_FETCH_R                                               $13, !2, ->42
   28    10    >   ASSIGN                                                   !3, <array>
   29    11        FETCH_DIM_R                                      ~15     !2, 'name'
         12        INIT_METHOD_CALL                                         ~15, '__toString'
         13        DO_FCALL                                      0  $16     
         14        ASSIGN                                                   !4, $16
   30    15      > FE_RESET_R                                       $18     !2, ->32
         16    > > FE_FETCH_R                                               $18, !5, ->32
   31    17    >   FETCH_DIM_R                                      ~19     !5, 'name'
         18        INIT_METHOD_CALL                                         ~19, '__toString'
         19        DO_FCALL                                      0  $20     
         20        IS_IDENTICAL                                             $20, 'titles'
         21      > JMPZ                                                     ~21, ->31
   32    22    > > FE_RESET_R                                       $22     !5, ->30
         23    > > FE_FETCH_R                                               $22, !6, ->30
   33    24    >   FETCH_DIM_R                                      ~24     !6, 'titleName'
         25        INIT_METHOD_CALL                                         ~24, '__toString'
         26        DO_FCALL                                      0  $25     
         27        ASSIGN_DIM                                               !3
         28        OP_DATA                                                  $25
   32    29      > JMP                                                      ->23
         30    >   FE_FREE                                                  $22
   30    31    > > JMP                                                      ->16
         32    >   FE_FREE                                                  $18
   37    33        CONCAT                                           ~26     !4, '+%3A+'
         34        INIT_FCALL                                               'implode'
         35        SEND_VAL                                                 '+-+'
         36        SEND_VAR                                                 !3
         37        DO_ICALL                                         $27     
         38        CONCAT                                           ~28     ~26, $27
         39        CONCAT                                           ~29     ~28, '%3Cbr%2F%3E%0A'
         40        ECHO                                                     ~29
   27    41      > JMP                                                      ->9
         42    >   FE_FREE                                                  $13
   38    43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.46 ms | 1404 KiB | 17 Q