3v4l.org

run code in 300+ PHP versions simultaneously
<?php $files = scandir('/'); foreach ($files as $f) { echo substr(sprintf('%o', fileperms('/'.$f)), -4); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 20
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 20
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/ol7pY
function name:  (null)
number of ops:  22
compiled vars:  !0 = $files, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'scandir'
          1        SEND_VAL                                                 '%2F'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    3     4      > FE_RESET_R                                       $4      !0, ->20
          5    > > FE_FETCH_R                                               $4, !1, ->20
    4     6    >   INIT_FCALL                                               'substr'
          7        INIT_FCALL                                               'sprintf'
          8        SEND_VAL                                                 '%25o'
          9        INIT_FCALL                                               'fileperms'
         10        CONCAT                                           ~5      '%2F', !1
         11        SEND_VAL                                                 ~5
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                         $7      
         15        SEND_VAR                                                 $7
         16        SEND_VAL                                                 -4
         17        DO_ICALL                                         $8      
         18        ECHO                                                     $8
    3    19      > JMP                                                      ->5
         20    >   FE_FREE                                                  $4
    5    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.85 ms | 1395 KiB | 21 Q