3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x extends ArrayObject { public function offsetGet($key) { static $i = 0; $i++; if ($i == 1) return $this[$key]; else return 'bla';} } var_dump($x['test']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GfMX2
function name:  (null)
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_DIM_R                                      ~1      !0, 'test'
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
          4      > RETURN                                                   1

Class x:
Function offsetget:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GfMX2
function name:  offsetGet
number of ops:  11
compiled vars:  !0 = $key, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        PRE_INC                                                  !1
          3        IS_EQUAL                                                 !1, 1
          4      > JMPZ                                                     ~3, ->9
          5    >   FETCH_THIS                                       ~4      
          6        FETCH_DIM_R                                      ~5      ~4, !0
          7      > RETURN                                                   ~5
          8*       JMP                                                      ->10
          9    > > RETURN                                                   'bla'
         10*     > RETURN                                                   null

End of function offsetget

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.97 ms | 1395 KiB | 15 Q