3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(10, 20); $n = 0; foreach($a as &$v) { echo $v; $a[] = 42; var_dump($a); var_dump(current($a)); if ($n++ > 1) {break;} }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 21
Branch analysis from position: 21
filename:       /in/Y4KIf
function name:  (null)
number of ops:  23
compiled vars:  !0 = $a, !1 = $n, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 0
    4     2      > FE_RESET_RW                                      $5      !0, ->21
          3    > > FE_FETCH_RW                                              $5, !2, ->21
    5     4    >   ECHO                                                     !2
    6     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  42
    7     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    8    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'current'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $8      
         14        SEND_VAR                                                 $8
         15        DO_ICALL                                                 
    9    16        POST_INC                                         ~10     !1
         17        IS_SMALLER                                               1, ~10
         18      > JMPZ                                                     ~11, ->20
         19    > > JMP                                                      ->21
    4    20    > > JMP                                                      ->3
         21    >   FE_FREE                                                  $5
   10    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.64 ms | 1395 KiB | 17 Q