3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pagcurrent = 1; $paglast = 1023; $pagesToDisplay = 10; $start = $pagcurrent; if($start >= $pagesToDisplay) $start = $start - ($paglast % $pagesToDisplay); $end = $start + $pagesToDisplay; for ($i = $start; $i < $end; $i++) { echo "$i\n"; }

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 13
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 13
Branch analysis from position: 19
Branch analysis from position: 13
Branch analysis from position: 9
filename:       /in/N7bXj
function name:  (null)
number of ops:  20
compiled vars:  !0 = $pagcurrent, !1 = $paglast, !2 = $pagesToDisplay, !3 = $start, !4 = $end, !5 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    4     1        ASSIGN                                                   !1, 1023
    6     2        ASSIGN                                                   !2, 10
    8     3        ASSIGN                                                   !3, !0
    9     4        IS_SMALLER_OR_EQUAL                                      !2, !3
          5      > JMPZ                                                     ~10, ->9
          6    >   MOD                                              ~11     !1, !2
          7        SUB                                              ~12     !3, ~11
          8        ASSIGN                                                   !3, ~12
   11     9    >   ADD                                              ~14     !3, !2
         10        ASSIGN                                                   !4, ~14
   13    11        ASSIGN                                                   !5, !3
         12      > JMP                                                      ->17
   15    13    >   NOP                                                      
         14        FAST_CONCAT                                      ~17     !5, '%0A'
         15        ECHO                                                     ~17
   13    16        PRE_INC                                                  !5
         17    >   IS_SMALLER                                               !5, !4
         18      > JMPNZ                                                    ~19, ->13
   16    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.16 ms | 1007 KiB | 13 Q