3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { static $array = array(); while ($i < 10000) { $array[] = $i; $i++; } $key = 9999; echo array_key_exists($key, $array); } foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gDWYY
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     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 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
Branch analysis from position: 2
filename:       /in/gDWYY
function name:  foo
number of ops:  11
compiled vars:  !0 = $array, !1 = $i, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   BIND_STATIC                                              !0
    7     1      > JMP                                                      ->5
    8     2    >   ASSIGN_DIM                                               !0
          3        OP_DATA                                                  !1
    9     4        PRE_INC                                                  !1
    7     5    >   IS_SMALLER                                               !1, 10000
          6      > JMPNZ                                                    ~5, ->2
   12     7    >   ASSIGN                                                   !2, 9999
   14     8        ARRAY_KEY_EXISTS                                 ~7      !2, !0
          9        ECHO                                                     ~7
   15    10      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.39 ms | 1397 KiB | 14 Q