3v4l.org

run code in 300+ PHP versions simultaneously
<HTML> <HEAD> <TITLE>Trabajando con matrices</TITLE> <META CHARSET="UTF-8" /> </HEAD> <BODY> <CENTER> <H2>Funcionamiento de <I>$GLOBALS, each, list y reset</I></H2> <?php $matriz1 = array(0 => "Madrid", 1 => "Valencia", 2 => "Alicante", 3=> "Santander"); $var2; while($var2 = each($matriz1)) { var_dump($var2); echo "<BR />"; } ?> <BR /><BR /><BR /> <?php $GLOBALS['matriz1']; while(list($pos,$valor) = each($matriz1)) { echo "$pos, $valor<BR />\n"; } ?> </CENTER> </BODY> </HTML>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 17
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 17
Branch analysis from position: 30
Branch analysis from position: 17
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
Branch analysis from position: 3
filename:       /in/SG5Od
function name:  (null)
number of ops:  32
compiled vars:  !0 = $matriz1, !1 = $var2, !2 = $pos, !3 = $valor
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3CHTML%3E%0A%09%3CHEAD%3E%0A%09%09%3CTITLE%3ETrabajando+con+matrices%3C%2FTITLE%3E%0A%09%09%3CMETA+CHARSET%3D%22UTF-8%22+%2F%3E%0A%09%3C%2FHEAD%3E%0A%09%3CBODY%3E%0A%09%09%3CCENTER%3E%0A%09%09%09%3CH2%3EFuncionamiento+de+%3CI%3E%24GLOBALS%2C+each%2C+list+y+reset%3C%2FI%3E%3C%2FH2%3E%0A%09%09%09'
   11     1        ASSIGN                                                   !0, <array>
   14     2      > JMP                                                      ->7
   15     3    >   INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                                 
   16     6        ECHO                                                     '%3CBR+%2F%3E'
   14     7    >   INIT_FCALL_BY_NAME                                       'each'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $6      
         10        ASSIGN                                           ~7      !1, $6
         11      > JMPNZ                                                    ~7, ->3
   20    12    >   ECHO                                                     '%0A%09%09%09%3CBR+%2F%3E%3CBR+%2F%3E%3CBR+%2F%3E%0A%0A%09%09%09'
   24    13        FETCH_R                      global              ~8      'GLOBALS'
         14        FETCH_DIM_R                                      ~9      ~8, 'matriz1'
         15        FREE                                                     ~9
   27    16      > JMP                                                      ->22
   28    17    >   ROPE_INIT                                     4  ~11     !2
         18        ROPE_ADD                                      1  ~11     ~11, '%2C+'
         19        ROPE_ADD                                      2  ~11     ~11, !3
         20        ROPE_END                                      3  ~10     ~11, '%3CBR+%2F%3E%0A'
         21        ECHO                                                     ~10
   27    22    >   INIT_FCALL_BY_NAME                                       'each'
         23        SEND_VAR_EX                                              !0
         24        DO_FCALL                                      0  $13     
         25        FETCH_LIST_R                                     $14     $13, 0
         26        ASSIGN                                                   !2, $14
         27        FETCH_LIST_R                                     $16     $13, 1
         28        ASSIGN                                                   !3, $16
         29      > JMPNZ                                                    $13, ->17
   31    30    >   ECHO                                                     '%09%09%3C%2FCENTER%3E%0A%09%3C%2FBODY%3E%0A%3C%2FHTML%3E'
   33    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.71 ms | 1400 KiB | 18 Q