3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [[1,2],[3,4]]; //foreach($array as list($x, $y)) { // echo $x . ' : ' . $y . PHP_EOL; //} while(list($x, $y) = each($array)) { var_dump(x); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 2
Branch analysis from position: 14
Branch analysis from position: 2
filename:       /in/RO9FG
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array, !1 = $x, !2 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1      > JMP                                                      ->6
          2    >   INIT_FCALL                                               'var_dump'
          3        FETCH_CONSTANT                                   ~4      'x'
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                                 
          6    >   INIT_FCALL_BY_NAME                                       'each'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0  $6      
          9        FETCH_LIST_R                                     $7      $6, 0
         10        ASSIGN                                                   !1, $7
         11        FETCH_LIST_R                                     $9      $6, 1
         12        ASSIGN                                                   !2, $9
         13      > JMPNZ                                                    $6, ->2
         14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.54 ms | 1386 KiB | 15 Q