3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); function setDefault(&$variable, $default) { if (!isset($variable)) { $variable = $default; } } $foo = array( 'foo' => 'oof' ); setDefault($foo['bar']['uuu'], 'rab'); print_r($foo); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z8Hlk
function name:  (null)
number of ops:  14
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   10     3        ASSIGN                                                   !0, <array>
   14     4        INIT_FCALL                                               'setdefault'
          5        FETCH_DIM_W                                      $3      !0, 'bar'
          6        FETCH_DIM_W                                      $4      $3, 'uuu'
          7        SEND_REF                                                 $4
          8        SEND_VAL                                                 'rab'
          9        DO_FCALL                                      0          
   16    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   17    13      > RETURN                                                   1

Function setdefault:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/Z8Hlk
function name:  setDefault
number of ops:  7
compiled vars:  !0 = $variable, !1 = $default
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ISSET_ISEMPTY_CV                                 ~2      !0
          3        BOOL_NOT                                         ~3      ~2
          4      > JMPZ                                                     ~3, ->6
    6     5    >   ASSIGN                                                   !0, !1
    8     6    > > RETURN                                                   null

End of function setdefault

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.99 ms | 1397 KiB | 18 Q