3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyStuff extends ArrayObject { function offsetGet($offset) { echo "Called"; return null; } } $array = ['foo' => 42]; $array_object = new MyStuff(); var_dump(isset($array['foo'])); var_dump(empty($array['foo'])); var_dump(isset($array_object['foo'])); var_dump(empty($array_object['foo']));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YPPgl
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array, !1 = $array_object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, <array>
   14     1        NEW                                              $3      'MyStuff'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   16     4        INIT_FCALL                                               'var_dump'
          5        ISSET_ISEMPTY_DIM_OBJ                         0  ~6      !0, 'foo'
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                                 
   17     8        INIT_FCALL                                               'var_dump'
          9        ISSET_ISEMPTY_DIM_OBJ                         1  ~8      !0, 'foo'
         10        SEND_VAL                                                 ~8
         11        DO_ICALL                                                 
   19    12        INIT_FCALL                                               'var_dump'
         13        ISSET_ISEMPTY_DIM_OBJ                         0  ~10     !1, 'foo'
         14        SEND_VAL                                                 ~10
         15        DO_ICALL                                                 
   20    16        INIT_FCALL                                               'var_dump'
         17        ISSET_ISEMPTY_DIM_OBJ                         1  ~12     !1, 'foo'
         18        SEND_VAL                                                 ~12
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Class MyStuff:
Function offsetget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YPPgl
function name:  offsetGet
number of ops:  4
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        ECHO                                                     'Called'
    8     2      > RETURN                                                   null
    9     3*     > RETURN                                                   null

End of function offsetget

End of class MyStuff.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.79 ms | 1400 KiB | 15 Q