3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mapAmazonData() { if ($this->checkAmazonData() === true) { try { // Stripping down the array and separating it into different variables $data = $this->amazonData['Message']['OrderReport']; $address = $data['FulfillmentData']['Address']; // Set the Customer's Name if (!empty ($address['Name'])) { $this->exportArray['CustomerName'] = $address['Name']; } else { throw new \Exception('Customer Name is empty'); } } catch (\Exception $e) { return 'Caught exception:' . $e->getMessage() . "\n"; } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S0Qrc
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E > > RETURN                                                   1

Function mapamazondata:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 33
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 22
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 33
Found catch point at position: 27
Branch analysis from position: 27
2 jumps found. (Code = 107) Position 1 = 28, Position 2 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S0Qrc
function name:  mapAmazonData
number of ops:  34
compiled vars:  !0 = $data, !1 = $address, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_THIS                                       $3      
          1        INIT_METHOD_CALL                                         $3, 'checkAmazonData'
          2        DO_FCALL                                      0  $4      
          3        TYPE_CHECK                                    8          $4
          4      > JMPZ                                                     ~5, ->33
   10     5    >   FETCH_THIS                                       $6      
          6        FETCH_OBJ_R                                      ~7      $6, 'amazonData'
          7        FETCH_DIM_R                                      ~8      ~7, 'Message'
          8        FETCH_DIM_R                                      ~9      ~8, 'OrderReport'
          9        ASSIGN                                                   !0, ~9
   11    10        FETCH_DIM_R                                      ~11     !0, 'FulfillmentData'
         11        FETCH_DIM_R                                      ~12     ~11, 'Address'
         12        ASSIGN                                                   !1, ~12
   14    13        ISSET_ISEMPTY_DIM_OBJ                         1  ~14     !1, 'Name'
         14        BOOL_NOT                                         ~15     ~14
         15      > JMPZ                                                     ~15, ->22
   15    16    >   FETCH_THIS                                       $16     
         17        FETCH_DIM_R                                      ~19     !1, 'Name'
         18        FETCH_OBJ_W                                      $17     $16, 'exportArray'
         19        ASSIGN_DIM                                               $17, 'CustomerName'
         20        OP_DATA                                                  ~19
         21      > JMP                                                      ->26
   17    22    >   NEW                                              $20     'Exception'
         23        SEND_VAL_EX                                              'Customer+Name+is+empty'
         24        DO_FCALL                                      0          
         25      > THROW                                         0          $20
         26    > > JMP                                                      ->33
   19    27  E > > CATCH                                       last         'Exception'
   20    28    >   INIT_METHOD_CALL                                         !2, 'getMessage'
         29        DO_FCALL                                      0  $22     
         30        CONCAT                                           ~23     'Caught+exception%3A', $22
         31        CONCAT                                           ~24     ~23, '%0A'
         32      > RETURN                                                   ~24
   23    33    > > RETURN                                                   null

End of function mapamazondata

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.49 ms | 1399 KiB | 13 Q