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); $_otherArray = array(); foreach($_room as $key => $g) { if ($key == "banana") { unset($_room[$key]); $_otherArray[] = $g; } } // unset($_room[2]); print_r($_room); print_r($_otherArray); 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 = 24, Position 2 = 32
Branch analysis from position: 24
2 jumps found. (Code = 78) Position 1 = 25, Position 2 = 32
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 31
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 31
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
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/AE4Bd
function name:  (null)
number of ops:  34
compiled vars:  !0 = $stack, !1 = $fruit, !2 = $_room, !3 = $i, !4 = $_otherArray, !5 = $g, !6 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ASSIGN                                                   !0, <array>
          1        INIT_FCALL                                               'array_shift'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                         $8      
          4        ASSIGN                                                   !1, $8
          5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8        ASSIGN                                                   !2, <array>
          9        ASSIGN                                                   !3, 2
         10      > JMP                                                      ->17
         11    >   INIT_FCALL                                               'array_shift'
         12        SEND_REF                                                 !0
         13        DO_ICALL                                         $14     
         14        ASSIGN_DIM                                               !2
         15        OP_DATA                                                  $14
         16        PRE_INC                                                  !3
         17    >   IS_SMALLER                                               !3, 8
         18      > JMPNZ                                                    ~16, ->11
         19    >   INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22        ASSIGN                                                   !4, <array>
         23      > FE_RESET_R                                       $19     !2, ->32
         24    > > FE_FETCH_R                                       ~20     $19, !5, ->32
         25    >   ASSIGN                                                   !6, ~20
         26        IS_EQUAL                                                 !6, 'banana'
         27      > JMPZ                                                     ~22, ->31
         28    >   UNSET_DIM                                                !2, !6
         29        ASSIGN_DIM                                               !4
         30        OP_DATA                                                  !5
         31    > > JMP                                                      ->24
         32    >   FE_FREE                                                  $19
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.66 ms | 1401 KiB | 17 Q