3v4l.org

run code in 300+ PHP versions simultaneously
<?php $shop_hoge = 'hoge'; $shop_moge = 'moge'; $shop_piyo = 'piyo'; $shops = array( 'hoge' => '1', 'moge' => '2', 'piyo' => '3'); foreach ($shops as $key => $val) { $k = 'shop_'.$key; echo($$k); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/KmBtZ
function name:  (null)
number of ops:  14
compiled vars:  !0 = $shop_hoge, !1 = $shop_moge, !2 = $shop_piyo, !3 = $shops, !4 = $val, !5 = $key, !6 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'hoge'
    3     1        ASSIGN                                                   !1, 'moge'
    4     2        ASSIGN                                                   !2, 'piyo'
    6     3        ASSIGN                                                   !3, <array>
   12     4      > FE_RESET_R                                       $11     !3, ->12
          5    > > FE_FETCH_R                                       ~12     $11, !4, ->12
          6    >   ASSIGN                                                   !5, ~12
   13     7        CONCAT                                           ~14     'shop_', !5
          8        ASSIGN                                                   !6, ~14
   14     9        FETCH_R                      local               ~16     !6
         10        ECHO                                                     ~16
   12    11      > JMP                                                      ->5
         12    >   FE_FREE                                                  $11
   15    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.03 ms | 1393 KiB | 13 Q