3v4l.org

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

Class Param:
Function offsetget:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BTLtB
function name:  offsetGet
number of ops:  12
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_METHOD_CALL                                         'offsetExists'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4        BOOL_NOT                                         ~2      $1
          5      > JMPZ                                                     ~2, ->7
          6    > > RETURN                                                   null
    9     7    >   INIT_STATIC_METHOD_CALL                                  'offsetGet'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $3      
         10      > RETURN                                                   $3
   10    11*     > RETURN                                                   null

End of function offsetget

End of class Param.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.96 ms | 1395 KiB | 15 Q