3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.99 ms | 1396 KiB | 21 Q