3v4l.org

run code in 300+ 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:  27
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        INIT_FCALL                                               'min'
         11        SEND_VAR                                                 !2
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $7      
         14        SUB                                              ~8      !2, $7
         15        SEND_VAL                                                 ~8
    8    16        ADD                                              ~9      !0, 1
         17        INIT_FCALL                                               'min'
         18        SEND_VAR                                                 !2
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $10     
         21        ADD                                              ~11     ~9, $10
         22        SEND_VAL                                                 ~11
         23        DO_ICALL                                         $12     
         24        SEND_VAR                                                 $12
         25        DO_ICALL                                                 
    9    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
131.2 ms | 1400 KiB | 21 Q