3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = ' <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <OTA_HotelResNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.opentravel.org/OTA/2003/05 OTA_HotelResNotifRQ.xsd" TimeStamp="2017-04-25T13:54:59+02:00" Version="1.003" EchoToken="58ff3910062c0"> <Success /> <HotelReservations> <HotelReservation> <UniqueID Type="14" ID="24671-CH108B541" /> <ResGlobalInfo> <HotelReservationIDs> <HotelReservationID ResID_Type="14" ResID_Value="24671-CH108B541" /> </HotelReservationIDs> </ResGlobalInfo> </HotelReservation> </HotelReservations> </OTA_HotelResNotifRS> </SOAP-ENV:Body> </SOAP-ENV:Envelope> '; function getProviderReferenceCode($response) { $response = $this->getOtaReservationService()->parseReservationResponseXML($response); if (!empty($response['OTA_HotelResNotifRS']) && !array_key_exists('Success', $response['OTA_HotelResNotifRS'])) { return false; } $providerReferenceCode = (isset($response['OTA_HotelResNotifRS']['HotelReservations']['HotelReservation']['ResGlobalInfo']['HotelReservationIDs']['HotelReservationID']['@attributes']['ResID_Value'])) ? $response['OTA_HotelResNotifRS']['HotelReservations']['HotelReservation']['ResGlobalInfo']['HotelReservationIDs']['HotelReservationID']['@attributes']['ResID_Value'] : false; if (!$providerReferenceCode) { return false; } return $providerReferenceCode; } var_dump(getProviderReferenceCode($xml));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bcevh
function name:  (null)
number of ops:  8
compiled vars:  !0 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%0A%3CSOAP-ENV%3AEnvelope+xmlns%3ASOAP-ENV%3D%22http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F%22%3E%0A++++%3CSOAP-ENV%3ABody%3E%0A++++++++%3COTA_HotelResNotifRS+xmlns%3D%22http%3A%2F%2Fwww.opentravel.org%2FOTA%2F2003%2F05%22+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22+xmlns%3Axsd%3D%22http%3A%2F%2Fwww.opentravel.org%2FOTA%2F2003%2F05+OTA_HotelResNotifRQ.xsd%22+TimeStamp%3D%222017-04-25T13%3A54%3A59%2B02%3A00%22+Version%3D%221.003%22+EchoToken%3D%2258ff3910062c0%22%3E%0A++++++++++++%3CSuccess+%2F%3E%0A++++++++++++%3CHotelReservations%3E%0A++++++++++++++++%3CHotelReservation%3E%0A++++++++++++++++++++%3CUniqueID+Type%3D%2214%22+ID%3D%2224671-CH108B541%22+%2F%3E%0A++++++++++++++++++++%3CResGlobalInfo%3E%0A++++++++++++++++++++++++%3CHotelReservationIDs%3E%0A++++++++++++++++++++++++++++%3CHotelReservationID+ResID_Type%3D%2214%22+ResID_Value%3D%2224671-CH108B541%22+%2F%3E%0A++++++++++++++++++++++++%3C%2FHotelReservationIDs%3E%0A++++++++++++++++++++%3C%2FResGlobalInfo%3E%0A++++++++++++++++%3C%2FHotelReservation%3E%0A++++++++++++%3C%2FHotelReservations%3E%0A++++++++%3C%2FOTA_HotelResNotifRS%3E%0A++++%3C%2FSOAP-ENV%3ABody%3E%0A%3C%2FSOAP-ENV%3AEnvelope%3E%0A'
   42     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'getproviderreferencecode'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function getproviderreferencecode:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 36
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 41
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 41
Branch analysis from position: 40
Branch analysis from position: 41
Branch analysis from position: 15
filename:       /in/bcevh
function name:  getProviderReferenceCode
number of ops:  43
compiled vars:  !0 = $response, !1 = $providerReferenceCode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
   25     1        FETCH_THIS                                       $2      
          2        INIT_METHOD_CALL                                         $2, 'getOtaReservationService'
          3        DO_FCALL                                      0  $3      
          4        INIT_METHOD_CALL                                         $3, 'parseReservationResponseXML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $4      
          7        ASSIGN                                                   !0, $4
   27     8        ISSET_ISEMPTY_DIM_OBJ                         1  ~6      !0, 'OTA_HotelResNotifRS'
          9        BOOL_NOT                                         ~7      ~6
         10      > JMPZ_EX                                          ~7      ~7, ->15
         11    >   FETCH_DIM_R                                      ~8      !0, 'OTA_HotelResNotifRS'
         12        ARRAY_KEY_EXISTS                                 ~9      'Success', ~8
         13        BOOL_NOT                                         ~10     ~9
         14        BOOL                                             ~7      ~10
         15    > > JMPZ                                                     ~7, ->17
   28    16    > > RETURN                                                   <false>
   31    17    >   FETCH_DIM_IS                                     ~11     !0, 'OTA_HotelResNotifRS'
         18        FETCH_DIM_IS                                     ~12     ~11, 'HotelReservations'
         19        FETCH_DIM_IS                                     ~13     ~12, 'HotelReservation'
         20        FETCH_DIM_IS                                     ~14     ~13, 'ResGlobalInfo'
         21        FETCH_DIM_IS                                     ~15     ~14, 'HotelReservationIDs'
         22        FETCH_DIM_IS                                     ~16     ~15, 'HotelReservationID'
         23        FETCH_DIM_IS                                     ~17     ~16, '%40attributes'
         24        ISSET_ISEMPTY_DIM_OBJ                         0          ~17, 'ResID_Value'
         25      > JMPZ                                                     ~18, ->36
   32    26    >   FETCH_DIM_R                                      ~19     !0, 'OTA_HotelResNotifRS'
         27        FETCH_DIM_R                                      ~20     ~19, 'HotelReservations'
         28        FETCH_DIM_R                                      ~21     ~20, 'HotelReservation'
         29        FETCH_DIM_R                                      ~22     ~21, 'ResGlobalInfo'
         30        FETCH_DIM_R                                      ~23     ~22, 'HotelReservationIDs'
         31        FETCH_DIM_R                                      ~24     ~23, 'HotelReservationID'
         32        FETCH_DIM_R                                      ~25     ~24, '%40attributes'
         33        FETCH_DIM_R                                      ~26     ~25, 'ResID_Value'
         34        QM_ASSIGN                                        ~27     ~26
         35      > JMP                                                      ->37
   33    36    >   QM_ASSIGN                                        ~27     <false>
   31    37    >   ASSIGN                                                   !1, ~27
   35    38        BOOL_NOT                                         ~29     !1
         39      > JMPZ                                                     ~29, ->41
   36    40    > > RETURN                                                   <false>
   39    41    > > RETURN                                                   !1
   40    42*     > RETURN                                                   null

End of function getproviderreferencecode

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.38 ms | 1403 KiB | 16 Q