3v4l.org

run code in 300+ PHP versions simultaneously
<?php use stdClass; $item = new stdClass; $champs = new stdClass; $champs->foo_value = 'My foo'; $champs->bar_value = 'Your bar'; $champs->baz_value = 'Their baz'; $item->champs = $champs; foreach(array('foo', 'bar', 'baz') as $truc) { echo $item->champs->{$truc . '_value'}, PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 22
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/mpuM5
function name:  (null)
number of ops:  24
compiled vars:  !0 = $item, !1 = $champs, !2 = $truc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    6     3        NEW                                              $6      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
    8     6        ASSIGN_OBJ                                               !1, 'foo_value'
          7        OP_DATA                                                  'My+foo'
    9     8        ASSIGN_OBJ                                               !1, 'bar_value'
          9        OP_DATA                                                  'Your+bar'
   10    10        ASSIGN_OBJ                                               !1, 'baz_value'
         11        OP_DATA                                                  'Their+baz'
   12    12        ASSIGN_OBJ                                               !0, 'champs'
         13        OP_DATA                                                  !1
   14    14      > FE_RESET_R                                       $13     <array>, ->22
         15    > > FE_FETCH_R                                               $13, !2, ->22
   15    16    >   CONCAT                                           ~15     !2, '_value'
         17        FETCH_OBJ_R                                      ~14     !0, 'champs'
         18        FETCH_OBJ_R                                      ~16     ~14, ~15
         19        ECHO                                                     ~16
         20        ECHO                                                     '%0A'
   14    21      > JMP                                                      ->15
         22    >   FE_FREE                                                  $13
   16    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.01 ms | 1394 KiB | 13 Q