3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new StdClass(); $x->{'todo-list'} = 'fred'; $key = 'todo-list'; $nokey = 'as-hsd'; print $x->$key; print $x->$nokey; var_dump($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HgTNc
function name:  (null)
number of ops:  15
compiled vars:  !0 = $x, !1 = $key, !2 = $nokey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $3      'StdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    5     3        ASSIGN_OBJ                                               !0, 'todo-list'
          4        OP_DATA                                                  'fred'
    7     5        ASSIGN                                                   !1, 'todo-list'
    8     6        ASSIGN                                                   !2, 'as-hsd'
   10     7        FETCH_OBJ_R                                      ~9      !0, !1
          8        ECHO                                                     ~9
   11     9        FETCH_OBJ_R                                      ~10     !0, !2
         10        ECHO                                                     ~10
   14    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.06 ms | 1394 KiB | 15 Q