3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { static $array = array(); $i = 0; while ($i < 10000) { $array[] = $i; $i++; } $key = 9999; $exists = array_key_exists($key, $array); if ($exists === true) echo 'exists'; else echo 'does not exist'; } foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ac3On
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/Ac3On
function name:  foo
number of ops:  17
compiled vars:  !0 = $array, !1 = $i, !2 = $key, !3 = $exists
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_STATIC                                              !0
    7     1        ASSIGN                                                   !1, 0
    8     2      > JMP                                                      ->6
    9     3    >   ASSIGN_DIM                                               !0
          4        OP_DATA                                                  !1
   10     5        PRE_INC                                                  !1
    8     6    >   IS_SMALLER                                               !1, 10000
          7      > JMPNZ                                                    ~7, ->3
   13     8    >   ASSIGN                                                   !2, 9999
   15     9        ARRAY_KEY_EXISTS                                 ~9      !2, !0
         10        ASSIGN                                                   !3, ~9
   17    11        TYPE_CHECK                                    8          !3
         12      > JMPZ                                                     ~11, ->15
   18    13    >   ECHO                                                     'exists'
         14      > JMP                                                      ->16
   20    15    >   ECHO                                                     'does+not+exist'
   21    16    > > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.11 ms | 1389 KiB | 14 Q