3v4l.org

run code in 300+ PHP versions simultaneously
<?php $slug = $this->param('slug'); $this['slug']= $slug; $i = 0; $dir = "/home/antscoid/public_html/Viewer.js/product/$slug"; if ($handle = opendir($dir)) { while (($file = readdir($handle)) !== false){ if (!in_array($file, array('.', '..')) && !is_dir($dir.$file)){ $f1 = "/home/antscoid/public_html/Viewer.js/product/$slug/$slug-$i.pdf"; $f1 = str_replace(" ", "", $f1); if (file_exists($f1)) { $this->page['fil'] = "$slug-$i.pdf"; } $this['files']->i = $i; $i++; } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 65
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 59
Branch analysis from position: 59
2 jumps found. (Code = 44) Position 1 = 65, Position 2 = 18
Branch analysis from position: 65
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 46) Position 1 = 21, Position 2 = 27
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 59
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 54
Branch analysis from position: 46
2 jumps found. (Code = 44) Position 1 = 65, Position 2 = 18
Branch analysis from position: 65
Branch analysis from position: 18
Branch analysis from position: 54
Branch analysis from position: 59
Branch analysis from position: 27
Branch analysis from position: 65
filename:       /in/YVVkF
function name:  (null)
number of ops:  66
compiled vars:  !0 = $slug, !1 = $i, !2 = $dir, !3 = $handle, !4 = $file, !5 = $f1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_THIS                                       $6      
          1        INIT_METHOD_CALL                                         $6, 'param'
          2        SEND_VAL_EX                                              'slug'
          3        DO_FCALL                                      0  $7      
          4        ASSIGN                                                   !0, $7
    4     5        FETCH_THIS                                       $9      
          6        ASSIGN_DIM                                               $9, 'slug'
          7        OP_DATA                                                  !0
    7     8        ASSIGN                                                   !1, 0
    8     9        NOP                                                      
         10        FAST_CONCAT                                      ~12     '%2Fhome%2Fantscoid%2Fpublic_html%2FViewer.js%2Fproduct%2F', !0
         11        ASSIGN                                                   !2, ~12
   10    12        INIT_FCALL                                               'opendir'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $14     
         15        ASSIGN                                           ~15     !3, $14
         16      > JMPZ                                                     ~15, ->65
   11    17    > > JMP                                                      ->59
   12    18    >   IN_ARRAY                                         ~16     !4, <array>
         19        BOOL_NOT                                         ~17     ~16
         20      > JMPZ_EX                                          ~17     ~17, ->27
         21    >   INIT_FCALL                                               'is_dir'
         22        CONCAT                                           ~18     !2, !4
         23        SEND_VAL                                                 ~18
         24        DO_ICALL                                         $19     
         25        BOOL_NOT                                         ~20     $19
         26        BOOL                                             ~17     ~20
         27    > > JMPZ                                                     ~17, ->59
   13    28    >   ROPE_INIT                                     7  ~22     '%2Fhome%2Fantscoid%2Fpublic_html%2FViewer.js%2Fproduct%2F'
         29        ROPE_ADD                                      1  ~22     ~22, !0
         30        ROPE_ADD                                      2  ~22     ~22, '%2F'
         31        ROPE_ADD                                      3  ~22     ~22, !0
         32        ROPE_ADD                                      4  ~22     ~22, '-'
         33        ROPE_ADD                                      5  ~22     ~22, !1
         34        ROPE_END                                      6  ~21     ~22, '.pdf'
         35        ASSIGN                                                   !5, ~21
   14    36        INIT_FCALL                                               'str_replace'
         37        SEND_VAL                                                 '+'
         38        SEND_VAL                                                 ''
         39        SEND_VAR                                                 !5
         40        DO_ICALL                                         $27     
         41        ASSIGN                                                   !5, $27
   15    42        INIT_FCALL                                               'file_exists'
         43        SEND_VAR                                                 !5
         44        DO_ICALL                                         $29     
         45      > JMPZ                                                     $29, ->54
   16    46    >   FETCH_THIS                                       $30     
         47        ROPE_INIT                                     4  ~34     !0
         48        ROPE_ADD                                      1  ~34     ~34, '-'
         49        ROPE_ADD                                      2  ~34     ~34, !1
         50        ROPE_END                                      3  ~33     ~34, '.pdf'
         51        FETCH_OBJ_W                                      $31     $30, 'page'
         52        ASSIGN_DIM                                               $31, 'fil'
         53        OP_DATA                                                  ~33
   18    54    >   FETCH_THIS                                       $36     
         55        FETCH_DIM_W                                      $37     $36, 'files'
         56        ASSIGN_OBJ                                               $37, 'i'
         57        OP_DATA                                                  !1
   19    58        PRE_INC                                                  !1
   11    59    >   INIT_FCALL                                               'readdir'
         60        SEND_VAR                                                 !3
         61        DO_ICALL                                         $40     
         62        ASSIGN                                           ~41     !4, $40
         63        TYPE_CHECK                                  1018          ~41
         64      > JMPNZ                                                    ~42, ->18
   23    65    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.65 ms | 1392 KiB | 23 Q