3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo extends SplFixedArray { public function offsetExists($index) { return parent::offsetExists($index); } } $foo = new Foo(2); $foo[0] = 'bar1'; $foo[1] = 'bar2'; var_dump($foo[0] ?? null); var_dump($foo[1] ?? null); var_dump($foo[2] ?? null);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5ohF1
function name:  (null)
number of ops:  27
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'Foo'
          1        SEND_VAL_EX                                              2
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   12     4        ASSIGN_DIM                                               !0, 0
          5        OP_DATA                                                  'bar1'
   13     6        ASSIGN_DIM                                               !0, 1
          7        OP_DATA                                                  'bar2'
   15     8        INIT_FCALL                                               'var_dump'
          9        FETCH_DIM_IS                                     ~6      !0, 0
         10        COALESCE                                         ~7      ~6
         11        QM_ASSIGN                                        ~7      null
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                                 
   16    14        INIT_FCALL                                               'var_dump'
         15        FETCH_DIM_IS                                     ~9      !0, 1
         16        COALESCE                                         ~10     ~9
         17        QM_ASSIGN                                        ~10     null
         18        SEND_VAL                                                 ~10
         19        DO_ICALL                                                 
   17    20        INIT_FCALL                                               'var_dump'
         21        FETCH_DIM_IS                                     ~12     !0, 2
         22        COALESCE                                         ~13     ~12
         23        QM_ASSIGN                                        ~13     null
         24        SEND_VAL                                                 ~13
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Class Foo:
Function offsetexists:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5ohF1
function name:  offsetExists
number of ops:  6
compiled vars:  !0 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_STATIC_METHOD_CALL                                  'offsetExists'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
    8     5*     > RETURN                                                   null

End of function offsetexists

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.11 ms | 1396 KiB | 15 Q