3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Say we have a 74-page file $num_pages = 74; // Fill and array. $pages = range(1, $num_pages); $sections = array(); for ($i = 1; $i <= $pages; $i = $i+2) { $next = $i+1; $sections[count($sections)] = "pdftk A=the.pdf cat A$i-$next output the_pages_$i-$next.pdf"; } print_r($sections);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 9
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 9
Branch analysis from position: 27
Branch analysis from position: 9
filename:       /in/tfkK3
function name:  (null)
number of ops:  31
compiled vars:  !0 = $num_pages, !1 = $pages, !2 = $sections, !3 = $i, !4 = $next
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 74
    7     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 1
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    8     6        ASSIGN                                                   !2, <array>
   10     7        ASSIGN                                                   !3, 1
          8      > JMP                                                      ->25
   11     9    >   ADD                                              ~10     !3, 1
         10        ASSIGN                                                   !4, ~10
   12    11        COUNT                                            ~12     !2
         12        ROPE_INIT                                     9  ~15     'pdftk+A%3Dthe.pdf+cat+A'
         13        ROPE_ADD                                      1  ~15     ~15, !3
         14        ROPE_ADD                                      2  ~15     ~15, '-'
         15        ROPE_ADD                                      3  ~15     ~15, !4
         16        ROPE_ADD                                      4  ~15     ~15, '+output+the_pages_'
         17        ROPE_ADD                                      5  ~15     ~15, !3
         18        ROPE_ADD                                      6  ~15     ~15, '-'
         19        ROPE_ADD                                      7  ~15     ~15, !4
         20        ROPE_END                                      8  ~14     ~15, '.pdf'
         21        ASSIGN_DIM                                               !2, ~12
         22        OP_DATA                                                  ~14
   10    23        ADD                                              ~20     !3, 2
         24        ASSIGN                                                   !3, ~20
         25    >   IS_SMALLER_OR_EQUAL                                      !3, !1
         26      > JMPNZ                                                    ~22, ->9
   15    27    >   INIT_FCALL                                               'print_r'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162 ms | 1396 KiB | 17 Q