3v4l.org

run code in 300+ PHP versions simultaneously
<?php function func($var) { $array = array(); $value = $array[$var]; $realVar = $var; if (substr($var, -1) == 'a') { } if (isset($value)) { $anotherValue = $var . 'a'; if ($value['a']) { } } } $one = new stdClass(); $items = new ArrayObject(array($one)); unset($items[0]); unset($items[0]->test); func('test');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8HWF0
function name:  (null)
number of ops:  15
compiled vars:  !0 = $one, !1 = $items
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   24     3        NEW                                              $5      'ArrayObject'
          4        INIT_ARRAY                                       ~6      !0
          5        SEND_VAL_EX                                              ~6
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   26     8        UNSET_DIM                                                !1, 0
   27     9        FETCH_DIM_UNSET                                  $9      !1, 0
         10        UNSET_OBJ                                                $9, 'test'
   28    11        INIT_FCALL                                               'func'
         12        SEND_VAL                                                 'test'
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Function func:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 11
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 17
Branch analysis from position: 11
filename:       /in/8HWF0
function name:  func
number of ops:  18
compiled vars:  !0 = $var, !1 = $array, !2 = $value, !3 = $realVar, !4 = $anotherValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, <array>
    6     2        FETCH_DIM_R                                      ~6      !1, !0
          3        ASSIGN                                                   !2, ~6
    8     4        ASSIGN                                                   !3, !0
   10     5        INIT_FCALL                                               'substr'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 -1
          8        DO_ICALL                                         $9      
          9        IS_EQUAL                                                 $9, 'a'
         10      > JMPZ                                                     ~10, ->11
   14    11    >   ISSET_ISEMPTY_CV                                         !2
         12      > JMPZ                                                     ~11, ->17
   15    13    >   CONCAT                                           ~12     !0, 'a'
         14        ASSIGN                                                   !4, ~12
   17    15        FETCH_DIM_R                                      ~14     !2, 'a'
         16      > JMPZ                                                     ~14, ->17
   21    17    > > RETURN                                                   null

End of function func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.71 ms | 1390 KiB | 16 Q