3v4l.org

run code in 300+ PHP versions simultaneously
<?php $posts = array("pt", "r", "bp"); $posts = array_slice($posts, 0, 3); print_r($posts); for ($i = 0; $i <= 3; $i++){ echo $posts[i]; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 12
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 12
Branch analysis from position: 18
Branch analysis from position: 12
filename:       /in/M2dYi
function name:  (null)
number of ops:  19
compiled vars:  !0 = $posts, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_slice'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 3
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
    5     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    7    10        ASSIGN                                                   !1, 0
         11      > JMP                                                      ->16
    8    12    >   FETCH_CONSTANT                                   ~7      'i'
         13        FETCH_DIM_R                                      ~8      !0, ~7
         14        ECHO                                                     ~8
    7    15        PRE_INC                                                  !1
         16    >   IS_SMALLER_OR_EQUAL                                      !1, 3
         17      > JMPNZ                                                    ~10, ->12
   11    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.95 ms | 1399 KiB | 17 Q