3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ($handle = opendir('var')) { while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { echo "$entry\n"; } } closedir($handle); } $filename = 'index.php'; $file_handle = fopen($filename, 'w'); fwrite($file_handle, '123'); fclose($file_handle);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 23
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
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 = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 6
Branch analysis from position: 20
Branch analysis from position: 6
Branch analysis from position: 14
Branch analysis from position: 10
Branch analysis from position: 23
filename:       /in/V8J7l
function name:  (null)
number of ops:  37
compiled vars:  !0 = $handle, !1 = $entry, !2 = $filename, !3 = $file_handle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'opendir'
          1        SEND_VAL                                                 'var'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                           ~5      !0, $4
          4      > JMPZ                                                     ~5, ->23
    3     5    > > JMP                                                      ->14
    4     6    >   IS_NOT_EQUAL                                     ~6      !1, '.'
          7      > JMPZ_EX                                          ~6      ~6, ->10
          8    >   IS_NOT_EQUAL                                     ~7      !1, '..'
          9        BOOL                                             ~6      ~7
         10    > > JMPZ                                                     ~6, ->14
    5    11    >   NOP                                                      
         12        FAST_CONCAT                                      ~8      !1, '%0A'
         13        ECHO                                                     ~8
    3    14    >   INIT_FCALL                                               'readdir'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $9      
         17        ASSIGN                                           ~10     !1, $9
         18        TYPE_CHECK                                  1018          ~10
         19      > JMPNZ                                                    ~11, ->6
    8    20    >   INIT_FCALL                                               'closedir'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
   10    23    >   ASSIGN                                                   !2, 'index.php'
   11    24        INIT_FCALL                                               'fopen'
         25        SEND_VAR                                                 !2
         26        SEND_VAL                                                 'w'
         27        DO_ICALL                                         $14     
         28        ASSIGN                                                   !3, $14
   12    29        INIT_FCALL                                               'fwrite'
         30        SEND_VAR                                                 !3
         31        SEND_VAL                                                 '123'
         32        DO_ICALL                                                 
   13    33        INIT_FCALL                                               'fclose'
         34        SEND_VAR                                                 !3
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.97 ms | 1392 KiB | 25 Q