3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dir = './'; $totalFiles = 1e5; !is_dir($dir) && mkdir($dir); for ($i = 0; $i < $totalFiles; ++$i) { $filename = $dir . str_pad($i, 6, '0', STR_PAD_LEFT); touch($filename); } $files = scandir($dir); echo 'scandir: ' . (count($files) - 2) . '/' . $totalFiles . PHP_EOL;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 13
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 13
Branch analysis from position: 27
Branch analysis from position: 13
Branch analysis from position: 11
filename:       /in/9EOVH
function name:  (null)
number of ops:  39
compiled vars:  !0 = $dir, !1 = $totalFiles, !2 = $i, !3 = $filename, !4 = $files
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '.%2F'
    4     1        ASSIGN                                                   !1, 100000
    6     2        INIT_FCALL                                               'is_dir'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5        BOOL_NOT                                         ~8      $7
          6      > JMPZ_EX                                          ~8      ~8, ->11
          7    >   INIT_FCALL                                               'mkdir'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $9      
         10        BOOL                                             ~8      $9
    7    11    >   ASSIGN                                                   !2, 0
         12      > JMP                                                      ->25
    8    13    >   INIT_FCALL                                               'str_pad'
         14        SEND_VAR                                                 !2
         15        SEND_VAL                                                 6
         16        SEND_VAL                                                 '0'
         17        SEND_VAL                                                 0
         18        DO_ICALL                                         $11     
         19        CONCAT                                           ~12     !0, $11
         20        ASSIGN                                                   !3, ~12
    9    21        INIT_FCALL                                               'touch'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
    7    24        PRE_INC                                                  !2
         25    >   IS_SMALLER                                               !2, !1
         26      > JMPNZ                                                    ~16, ->13
   13    27    >   INIT_FCALL                                               'scandir'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $17     
         30        ASSIGN                                                   !4, $17
   14    31        COUNT                                            ~19     !4
         32        SUB                                              ~20     ~19, 2
         33        CONCAT                                           ~21     'scandir%3A+', ~20
         34        CONCAT                                           ~22     ~21, '%2F'
         35        CONCAT                                           ~23     ~22, !1
         36        CONCAT                                           ~24     ~23, '%0A'
         37        ECHO                                                     ~24
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.99 ms | 1400 KiB | 23 Q