3v4l.org

run code in 300+ PHP versions simultaneously
<?php function handler() { } set_error_handler('handler'); 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(); $two = new stdClass(); $items = new ArrayObject(array($one, $two)); 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/m6PTT
function name:  (null)
number of ops:  22
compiled vars:  !0 = $one, !1 = $two, !2 = $items
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'handler'
          2        DO_ICALL                                                 
   29     3        NEW                                              $4      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $4
   30     6        NEW                                              $7      'stdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $7
   31     9        NEW                                              $10     'ArrayObject'
         10        INIT_ARRAY                                       ~11     !0
         11        ADD_ARRAY_ELEMENT                                ~11     !1
         12        SEND_VAL_EX                                              ~11
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !2, $10
   33    15        UNSET_DIM                                                !2, 0
   34    16        FETCH_DIM_UNSET                                  $14     !2, 0
         17        UNSET_OBJ                                                $14, 'test'
   35    18        INIT_FCALL                                               'func'
         19        SEND_VAL                                                 'test'
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

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

End of function handler

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/m6PTT
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
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        ASSIGN                                                   !1, <array>
   12     2        FETCH_DIM_R                                      ~6      !1, !0
          3        ASSIGN                                                   !2, ~6
   14     4        ASSIGN                                                   !3, !0
   16     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
   20    11    >   ISSET_ISEMPTY_CV                                         !2
         12      > JMPZ                                                     ~11, ->17
   21    13    >   CONCAT                                           ~12     !0, 'a'
         14        ASSIGN                                                   !4, ~12
   23    15        FETCH_DIM_R                                      ~14     !2, 'a'
         16      > JMPZ                                                     ~14, ->17
   27    17    > > RETURN                                                   null

End of function func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.51 ms | 1394 KiB | 18 Q