3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo '$_GET = '. print_r($_GET); for ($files = scandir('.', 1); $files; ) { $file = array_pop($files); if (is_file($file) && !is_dir($file)) { break; } } echo '$file = '. $file; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 12
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 27
Branch analysis from position: 25
filename:       /in/NXTfR
function name:  (null)
number of ops:  31
compiled vars:  !0 = $files, !1 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'print_r'
          1        FETCH_R                      global              ~2      '_GET'
          2        SEND_VAL                                                 ~2
          3        DO_ICALL                                         $3      
          4        CONCAT                                           ~4      '%24_GET+%3D+', $3
          5        ECHO                                                     ~4
    3     6        INIT_FCALL                                               'scandir'
          7        SEND_VAL                                                 '.'
          8        SEND_VAL                                                 1
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !0, $5
         11      > JMP                                                      ->27
    4    12    >   INIT_FCALL                                               'array_pop'
         13        SEND_REF                                                 !0
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !1, $7
    5    16        INIT_FCALL                                               'is_file'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $9      
         19      > JMPZ_EX                                          ~10     $9, ->25
         20    >   INIT_FCALL                                               'is_dir'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $11     
         23        BOOL_NOT                                         ~12     $11
         24        BOOL                                             ~10     ~12
         25    > > JMPZ                                                     ~10, ->27
    6    26    > > JMP                                                      ->28
    3    27    > > JMPNZ                                                    !0, ->12
    9    28    >   CONCAT                                           ~13     '%24file+%3D+', !1
         29        ECHO                                                     ~13
   11    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.69 ms | 1396 KiB | 23 Q