3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.8 ms | 1400 KiB | 25 Q