3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $val = 0; } $arr = array_fill_keys( array( 'a', 'b', 'c' ), new Foo() ); $arr['a']->val = 42; var_dump($arr['b'] );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PgmV1
function name:  (null)
number of ops:  15
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'array_fill_keys'
          1        SEND_VAL                                                 <array>
          2        NEW                                              $1      'Foo'
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $1
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
    6     7        FETCH_DIM_W                                      $5      !0, 'a'
          8        ASSIGN_OBJ                                               $5, 'val'
          9        OP_DATA                                                  42
    7    10        INIT_FCALL                                               'var_dump'
         11        FETCH_DIM_R                                      ~7      !0, 'b'
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.53 ms | 1394 KiB | 17 Q