3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ArrayObjectChild extends ArrayObject { public function offsetExists($offset) { var_dump('Called: '.__METHOD__); return parent::offsetExists($offset); } public function offsetGet($offset) { var_dump('Called: '.__METHOD__); return parent::offsetGet($offset); } } $object = new ArrayObjectChild(array('foo' => '')); var_dump(empty($object['foo']));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/keoDO
function name:  (null)
number of ops:  9
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'ArrayObjectChild'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   17     4        INIT_FCALL                                               'var_dump'
          5        ISSET_ISEMPTY_DIM_OBJ                         1  ~4      !0, 'foo'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class ArrayObjectChild:
Function offsetexists:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/keoDO
function name:  offsetExists
number of ops:  9
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAL                                                 'Called%3A+ArrayObjectChild%3A%3AoffsetExists'
          3        DO_ICALL                                                 
    7     4        INIT_STATIC_METHOD_CALL                                  'offsetExists'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $2      
          7      > RETURN                                                   $2
    8     8*     > RETURN                                                   null

End of function offsetexists

Function offsetget:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/keoDO
function name:  offsetGet
number of ops:  9
compiled vars:  !0 = $offset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAL                                                 'Called%3A+ArrayObjectChild%3A%3AoffsetGet'
          3        DO_ICALL                                                 
   12     4        INIT_STATIC_METHOD_CALL                                  'offsetGet'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $2      
          7      > RETURN                                                   $2
   13     8*     > RETURN                                                   null

End of function offsetget

End of class ArrayObjectChild.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.86 ms | 1396 KiB | 15 Q