3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.22 ms | 1400 KiB | 23 Q