3v4l.org

run code in 300+ PHP versions simultaneously
<?php $match = 'today'; $n = 2; for ($pos = strlen($match) - $n; $pos >= 0; --$pos) { $nGrams[] = substr($match, $pos, $n); } var_export($nGrams);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
Branch analysis from position: 6
filename:       /in/LPSdc
function name:  (null)
number of ops:  20
compiled vars:  !0 = $match, !1 = $n, !2 = $pos, !3 = $nGrams
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'today'
    3     1        ASSIGN                                                   !1, 2
    4     2        STRLEN                                           ~6      !0
          3        SUB                                              ~7      ~6, !1
          4        ASSIGN                                                   !2, ~7
          5      > JMP                                                      ->14
    5     6    >   INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !2
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $10     
         11        ASSIGN_DIM                                               !3
         12        OP_DATA                                                  $10
    4    13        PRE_DEC                                                  !2
         14    >   IS_SMALLER_OR_EQUAL                                      0, !2
         15      > JMPNZ                                                    ~12, ->6
    7    16    >   INIT_FCALL                                               'var_export'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.67 ms | 1000 KiB | 15 Q