3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo phpversion() . PHP_EOL; $node = new stdClass(); $node->foo = 'foo'; $node->bar = 'bar'; $i = 0; $nodes = ['foo', 'bar', 'baz']; echo $node->$nodes[$i];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a6FeM
function name:  (null)
number of ops:  17
compiled vars:  !0 = $node, !1 = $i, !2 = $nodes
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'phpversion'
          1        DO_ICALL                                             $3      
          2        CONCAT                                               ~4      $3, '%0A'
          3        ECHO                                                         ~4
    5     4        NEW                                                  $5      'stdClass'
          5        DO_FCALL                                          0          
          6        ASSIGN                                                       !0, $5
    7     7        ASSIGN_OBJ                                                   !0, 'foo'
          8        OP_DATA                                                      'foo'
    8     9        ASSIGN_OBJ                                                   !0, 'bar'
         10        OP_DATA                                                      'bar'
   10    11        ASSIGN                                                       !1, 0
   11    12        ASSIGN                                                       !2, <array>
   13    13        FETCH_OBJ_R                                          ~12     !0, !2
         14        FETCH_DIM_R                                          ~13     ~12, !1
         15        ECHO                                                         ~13
         16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.42 ms | 1338 KiB | 14 Q