3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lang_list = array('fr_FR', 'en_US'); $GLOBALS['lang_list'] = $lang_list; $GLOBALS['lang'] = 'en_US'; var_dump($GLOBALS['lang']); foreach($GLOBALS['lang_list'] as $lang){ var_dump($GLOBALS['lang']); } function test() { foreach($GLOBALS['lang_list'] as $lang){ var_dump($GLOBALS['lang']); } } test();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/b5U7j
function name:  (null)
number of ops:  21
compiled vars:  !0 = $lang_list, !1 = $lang
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        FETCH_W                      global              $3      'lang_list'
          2        ASSIGN                                                   $3, !0
    5     3        FETCH_W                      global              $5      'lang'
          4        ASSIGN                                                   $5, 'en_US'
    8     5        INIT_FCALL                                               'var_dump'
          6        FETCH_R                      global              ~7      'lang'
          7        SEND_VAL                                                 ~7
          8        DO_ICALL                                                 
    9     9        FETCH_R                      global              ~9      'lang_list'
         10      > FE_RESET_R                                       $10     ~9, ->17
         11    > > FE_FETCH_R                                               $10, !1, ->17
   10    12    >   INIT_FCALL                                               'var_dump'
         13        FETCH_R                      global              ~11     'lang'
         14        SEND_VAL                                                 ~11
         15        DO_ICALL                                                 
    9    16      > JMP                                                      ->11
         17    >   FE_FREE                                                  $10
   19    18        INIT_FCALL                                               'test'
         19        DO_FCALL                                      0          
         20      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 8
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/b5U7j
function name:  test
number of ops:  10
compiled vars:  !0 = $lang
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_R                      global              ~1      'lang_list'
          1      > FE_RESET_R                                       $2      ~1, ->8
          2    > > FE_FETCH_R                                               $2, !0, ->8
   15     3    >   INIT_FCALL                                               'var_dump'
          4        FETCH_R                      global              ~3      'lang'
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                                 
   14     7      > JMP                                                      ->2
          8    >   FE_FREE                                                  $2
   17     9      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.24 ms | 1005 KiB | 15 Q