3v4l.org

run code in 500+ PHP versions simultaneously
<?php $padding = 6; $letters = range('A', 'Z'); $i = 25; var_export(array_slice( $letters, $i - min($i, $padding), $padding + 1 + min($i, $padding) ));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5Gt7B
function name:  (null)
number of ops:  21
compiled vars:  !0 = $padding, !1 = $letters, !2 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 6
    3     1        INIT_FCALL                                                   'range'
          2        SEND_VAL                                                     'A'
          3        SEND_VAL                                                     'Z'
          4        DO_ICALL                                             $4      
          5        ASSIGN                                                       !1, $4
    4     6        ASSIGN                                                       !2, 25
    5     7        INIT_FCALL                                                   'var_export'
          8        INIT_FCALL                                                   'array_slice'
    6     9        SEND_VAR                                                     !1
    7    10        FRAMELESS_ICALL_2                min                 ~7      !2, !0
         11        SUB                                                  ~8      !2, ~7
         12        SEND_VAL                                                     ~8
    8    13        ADD                                                  ~9      !0, 1
         14        FRAMELESS_ICALL_2                min                 ~10     !2, !0
         15        ADD                                                  ~11     ~9, ~10
         16        SEND_VAL                                                     ~11
    5    17        DO_ICALL                                             $12     
    8    18        SEND_VAR                                                     $12
    5    19        DO_ICALL                                                     
    9    20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.65 ms | 2571 KiB | 16 Q