3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rrmdir($dir) { foreach(glob($dir . '/*') as $file) { if(is_dir($file)) rrmdir($file); else unlink($file); } rmdir($dir); } $name = "oppo"; print_r(rrmdir($name)); echo $name; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fd9tu
function name:  (null)
number of ops:  9
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'oppo'
    9     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'rrmdir'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
   10     7        ECHO                                                     !0
   11     8      > RETURN                                                   1

Function rrmdir:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 19
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/fd9tu
function name:  rrmdir
number of ops:  24
compiled vars:  !0 = $dir, !1 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'glob'
          2        CONCAT                                           ~2      !0, '%2F%2A'
          3        SEND_VAL                                                 ~2
          4        DO_ICALL                                         $3      
          5      > FE_RESET_R                                       $4      $3, ->19
          6    > > FE_FETCH_R                                               $4, !1, ->19
    5     7    >   INIT_FCALL                                               'is_dir'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $5      
         10      > JMPZ                                                     $5, ->15
         11    >   INIT_FCALL_BY_NAME                                       'rrmdir'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
         14      > JMP                                                      ->18
         15    >   INIT_FCALL                                               'unlink'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
    4    18    > > JMP                                                      ->6
         19    >   FE_FREE                                                  $4
    6    20        INIT_FCALL                                               'rmdir'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                                 
    7    23      > RETURN                                                   null

End of function rrmdir

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.86 ms | 1399 KiB | 24 Q