3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dir = getcwd(); $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 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 6
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 6
Branch analysis from position: 20
Branch analysis from position: 6
filename:       /in/eGfAD
function name:  (null)
number of ops:  32
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
    6     4        ASSIGN                                                   !2, 0
          5      > JMP                                                      ->18
    7     6    >   INIT_FCALL                                               'str_pad'
          7        SEND_VAR                                                 !2
          8        SEND_VAL                                                 6
          9        SEND_VAL                                                 '0'
         10        SEND_VAL                                                 0
         11        DO_ICALL                                         $9      
         12        CONCAT                                           ~10     !0, $9
         13        ASSIGN                                                   !3, ~10
    8    14        INIT_FCALL                                               'touch'
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                                 
    6    17        PRE_INC                                                  !2
         18    >   IS_SMALLER                                               !2, !1
         19      > JMPNZ                                                    ~14, ->6
   12    20    >   INIT_FCALL                                               'scandir'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $15     
         23        ASSIGN                                                   !4, $15
   13    24        COUNT                                            ~17     !4
         25        SUB                                              ~18     ~17, 2
         26        CONCAT                                           ~19     'scandir%3A+', ~18
         27        CONCAT                                           ~20     ~19, '%2F'
         28        CONCAT                                           ~21     ~20, !1
         29        CONCAT                                           ~22     ~21, '%0A'
         30        ECHO                                                     ~22
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.8 ms | 1396 KiB | 21 Q