3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); ?> <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 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 6
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 20
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 20
Branch analysis from position: 33
Branch analysis from position: 20
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 6
Branch analysis from position: 15
Branch analysis from position: 6
filename:       /in/AXYXi
function name:  (null)
number of ops:  35
compiled vars:  !0 = $matriz1, !1 = $var2, !2 = $pos, !3 = $valor
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    2     3        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'
   12     4        ASSIGN                                                   !0, <array>
   15     5      > JMP                                                      ->10
   16     6    >   INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   17     9        ECHO                                                     '%3CBR+%2F%3E'
   15    10    >   INIT_FCALL_BY_NAME                                       'each'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0  $7      
         13        ASSIGN                                           ~8      !1, $7
         14      > JMPNZ                                                    ~8, ->6
   21    15    >   ECHO                                                     '%0A%09%09%09%3CBR+%2F%3E%3CBR+%2F%3E%3CBR+%2F%3E%0A%0A%09%09%09'
   25    16        FETCH_R                      global              ~9      'GLOBALS'
         17        FETCH_DIM_R                                      ~10     ~9, 'matriz1'
         18        FREE                                                     ~10
   28    19      > JMP                                                      ->25
   29    20    >   ROPE_INIT                                     4  ~12     !2
         21        ROPE_ADD                                      1  ~12     ~12, '%2C+'
         22        ROPE_ADD                                      2  ~12     ~12, !3
         23        ROPE_END                                      3  ~11     ~12, '%3CBR+%2F%3E%0A'
         24        ECHO                                                     ~11
   28    25    >   INIT_FCALL_BY_NAME                                       'each'
         26        SEND_VAR_EX                                              !0
         27        DO_FCALL                                      0  $14     
         28        FETCH_LIST_R                                     $15     $14, 0
         29        ASSIGN                                                   !2, $15
         30        FETCH_LIST_R                                     $17     $14, 1
         31        ASSIGN                                                   !3, $17
         32      > JMPNZ                                                    $14, ->20
   32    33    >   ECHO                                                     '%09%09%3C%2FCENTER%3E%0A%09%3C%2FBODY%3E%0A%3C%2FHTML%3E'
   34    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147 ms | 1400 KiB | 17 Q