3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stack = array("orange", "banana", "apple", "raspberry"); $fruit = array_shift($stack); print_r($stack); $_room = array(); for($i = 2; $i < 8; $i++) {$_room[] = array_shift($stack);}print_r($_room); foreach($_room as $value){ print "value=".$value."\n";}?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 11
Branch analysis from position: 19
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 11
Branch analysis from position: 19
Branch analysis from position: 11
filename:       /in/Bfv3d
function name:  (null)
number of ops:  30
compiled vars:  !0 = $stack, !1 = $fruit, !2 = $_room, !3 = $i, !4 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_shift'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
    7     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    9     8        ASSIGN                                                   !2, <array>
   11     9        ASSIGN                                                   !3, 2
         10      > JMP                                                      ->17
   12    11    >   INIT_FCALL                                               'array_shift'
         12        SEND_REF                                                 !0
         13        DO_ICALL                                         $12     
         14        ASSIGN_DIM                                               !2
         15        OP_DATA                                                  $12
   11    16        PRE_INC                                                  !3
         17    >   IS_SMALLER                                               !3, 8
         18      > JMPNZ                                                    ~14, ->11
   12    19    >   INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
   16    22      > FE_RESET_R                                       $16     !2, ->28
         23    > > FE_FETCH_R                                               $16, !4, ->28
         24    >   CONCAT                                           ~17     'value%3D', !4
         25        CONCAT                                           ~18     ~17, '%0A'
         26        ECHO                                                     ~18
         27      > JMP                                                      ->23
         28    >   FE_FREE                                                  $16
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.99 ms | 1396 KiB | 17 Q