3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($files = scandir('.'); $files; ) { $file = array_pop($files); if (is_file($file)) { break; } } echo $file; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 5
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 14
filename:       /in/bRvYu
function name:  (null)
number of ops:  17
compiled vars:  !0 = $files, !1 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'scandir'
          1        SEND_VAL                                                 '.'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
          4      > JMP                                                      ->14
    3     5    >   INIT_FCALL                                               'array_pop'
          6        SEND_REF                                                 !0
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !1, $4
    4     9        INIT_FCALL                                               'is_file'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12      > JMPZ                                                     $6, ->14
    5    13    > > JMP                                                      ->15
    2    14    > > JMPNZ                                                    !0, ->5
    8    15    >   ECHO                                                     !1
   10    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.49 ms | 1399 KiB | 19 Q