3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlString = <<<XML <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetDataResponse xmlns="urn:com:esi911:webeoc7:api:1.0"> <GetDataResult> <data> <record dataid="6" county="Fayette County" title="Title goes here" description="Description goes here." status="Inactive" /> <record dataid="5" county="Caldwell County" title="Title goes here" description="Description goes here." status="Inactive" /> <record dataid="4" county="Burnet County" title="Title goes here" description="Description goes here." status="Active" /> <record dataid="2" county="Blanco County" title="Title goes here" description="Description goes here." status="Active" /> <record dataid="1" county="Bastrop County" title="Title goes here" description="Description goes here." status="Active" /> </data> </GetDataResult> </GetDataResponse> </soap:Body> </soap:Envelope> XML; $xml = simplexml_load_string($xmlString); $xml->registerXPathNamespace('urn', 'urn:com:esi911:webeoc7:api:1.0'); $records = $xml->xpath('//urn:record'); echo (string)$records[0]->attributes()->dataid;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f8faC
function name:  (null)
number of ops:  20
compiled vars:  !0 = $xmlString, !1 = $xml, !2 = $records
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22%3F%3E%0A%3Csoap%3AEnvelope+xmlns%3Asoap%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F%22+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22+xmlns%3Axsd%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%22%3E%0A++%3Csoap%3ABody%3E%0A++++%3CGetDataResponse+xmlns%3D%22urn%3Acom%3Aesi911%3Awebeoc7%3Aapi%3A1.0%22%3E%0A++++++%3CGetDataResult%3E%0A++++++++%3Cdata%3E%0A++++++++++%3Crecord+dataid%3D%226%22+county%3D%22Fayette+County%22+title%3D%22Title+goes+here%22+description%3D%22Description+goes+here.%22+status%3D%22Inactive%22+%2F%3E%0A++++++++++%3Crecord+dataid%3D%225%22+county%3D%22Caldwell+County%22+title%3D%22Title+goes+here%22+description%3D%22Description+goes+here.%22+status%3D%22Inactive%22+%2F%3E%0A++++++++++%3Crecord+dataid%3D%224%22+county%3D%22Burnet+County%22+title%3D%22Title+goes+here%22+description%3D%22Description+goes+here.%22+status%3D%22Active%22+%2F%3E%0A++++++++++%3Crecord+dataid%3D%222%22+county%3D%22Blanco+County%22+title%3D%22Title+goes+here%22+description%3D%22Description+goes+here.%22+status%3D%22Active%22+%2F%3E%0A++++++++++%3Crecord+dataid%3D%221%22+county%3D%22Bastrop+County%22+title%3D%22Title+goes+here%22+description%3D%22Description+goes+here.%22+status%3D%22Active%22+%2F%3E%0A++++++++%3C%2Fdata%3E%0A++++++%3C%2FGetDataResult%3E%0A++++%3C%2FGetDataResponse%3E%0A++%3C%2Fsoap%3ABody%3E%0A%3C%2Fsoap%3AEnvelope%3E'
   22     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   23     5        INIT_METHOD_CALL                                         !1, 'registerXPathNamespace'
          6        SEND_VAL_EX                                              'urn'
          7        SEND_VAL_EX                                              'urn%3Acom%3Aesi911%3Awebeoc7%3Aapi%3A1.0'
          8        DO_FCALL                                      0          
   24     9        INIT_METHOD_CALL                                         !1, 'xpath'
         10        SEND_VAL_EX                                              '%2F%2Furn%3Arecord'
         11        DO_FCALL                                      0  $7      
         12        ASSIGN                                                   !2, $7
   26    13        FETCH_DIM_R                                      ~9      !2, 0
         14        INIT_METHOD_CALL                                         ~9, 'attributes'
         15        DO_FCALL                                      0  $10     
         16        FETCH_OBJ_R                                      ~11     $10, 'dataid'
         17        CAST                                          6  ~12     ~11
         18        ECHO                                                     ~12
   27    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.83 ms | 999 KiB | 14 Q