3v4l.org

run code in 300+ PHP versions simultaneously
<?php function accept_array($a) : void { var_dump($a); unset($a); } function return_array() { return new class implements ArrayAccess { public function offsetExists(mixed $offset): bool { return true; } public function offsetGet(mixed $offset): mixed { return 42; } public function offsetSet(mixed $offset, mixed $value): void {} public function offsetUnset(mixed $offset): void {} }; } $input = return_array(); if (isset($input['key'])) { accept_array($input); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/6VfRW
function name:  (null)
number of ops:  9
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'return_array'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   21     3        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 'key'
          4      > JMPZ                                                     ~3, ->8
   22     5    >   INIT_FCALL                                               'accept_array'
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0          
   23     8    > > RETURN                                                   1

Function accept_array:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6VfRW
function name:  accept_array
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    6     4        UNSET_CV                                                 !0
    7     5      > RETURN                                                   null

End of function accept_array

Function return_array:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6VfRW
function name:  return_array
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_ANON_CLASS                               <const ast>   
          1        NEW                                              $1      $0
          2        DO_FCALL                                      0          
          3      > RETURN                                                   $1
   17     4*     > RETURN                                                   null

End of function return_array

Class ArrayAccess@anonymous:
Function offsetexists:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6VfRW
function name:  offsetExists
number of ops:  4
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1      > RETURN                                                   <true>
          2*       VERIFY_RETURN_TYPE                                       
          3*     > RETURN                                                   null

End of function offsetexists

Function offsetget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6VfRW
function name:  offsetGet
number of ops:  4
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1      > RETURN                                                   42
          2*       VERIFY_RETURN_TYPE                                       
          3*     > RETURN                                                   null

End of function offsetget

Function offsetset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6VfRW
function name:  offsetSet
number of ops:  3
compiled vars:  !0 = $offset, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   null

End of function offsetset

Function offsetunset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6VfRW
function name:  offsetUnset
number of ops:  2
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function offsetunset

End of class ArrayAccess@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
125.92 ms | 1433 KiB | 16 Q