3v4l.org

run code in 500+ PHP versions simultaneously
<?php /** * @var array */ $expandedState = []; $expandedState = get('BackendComponents.States.Pagetree'); if (is_object($expandedState) && is_object($expandedState)) { $expandedState = (array)$this->expandedState->stateHash; } else { $expandedStateBefore = $expandedState['stateHash'] ?: []; $expandedStateAfter = $expandedState['stateHash'] ?? []; } var_dump($expandedStateBefore); var_dump($expandedStateAfter); /** * @return mixed */ function get() { return ['stateHash' => '']; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/14DgZ
function name:  (null)
number of ops:  31
compiled vars:  !0 = $expandedState, !1 = $expandedStateBefore, !2 = $expandedStateAfter
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                       !0, <array>
   10     1        INIT_FCALL_BY_NAME                                           'get'
          2        SEND_VAL_EX                                                  'BackendComponents.States.Pagetree'
          3        DO_FCALL                                          0  $4      
          4        ASSIGN                                                       !0, $4
   12     5        TYPE_CHECK                                      256  ~6      !0
          6      > JMPZ_EX                                              ~6      ~6, ->9
          7    >   TYPE_CHECK                                      256  ~7      !0
          8        BOOL                                                 ~6      ~7
          9    > > JMPZ                                                         ~6, ->16
   13    10    >   FETCH_THIS                                           $8      
         11        FETCH_OBJ_R                                          ~9      $8, 'expandedState'
         12        FETCH_OBJ_R                                          ~10     ~9, 'stateHash'
         13        CAST                                              7  ~11     ~10
         14        ASSIGN                                                       !0, ~11
   12    15      > JMP                                                          ->24
   15    16    >   FETCH_DIM_R                                          ~13     !0, 'stateHash'
         17        JMP_SET                                              ~14     ~13, ->19
         18        QM_ASSIGN                                            ~14     <array>
         19        ASSIGN                                                       !1, ~14
   16    20        FETCH_DIM_IS                                         ~16     !0, 'stateHash'
         21        COALESCE                                             ~17     ~16
         22        QM_ASSIGN                                            ~17     <array>
         23        ASSIGN                                                       !2, ~17
   20    24    >   INIT_FCALL                                                   'var_dump'
         25        SEND_VAR                                                     !1
         26        DO_ICALL                                                     
   21    27        INIT_FCALL                                                   'var_dump'
         28        SEND_VAR                                                     !2
         29        DO_ICALL                                                     
   29    30      > RETURN                                                       1

Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/14DgZ
function name:  get
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   28     0  E > > RETURN                                                       <array>
   29     1*     > RETURN                                                       null

End of function get

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
144.87 ms | 497 KiB | 10 Q