3v4l.org

run code in 500+ PHP versions simultaneously
<?php $x = new class { public $context; public function rmdir(string $path, int $options = 0): bool { var_dump("rmdir: $path"); return true; } public function unlink(string $path, int $options = 0): bool { var_dump("unlink: $path"); return true; } public function url_stat(string $path, int $flags): array|false { var_dump("url_stat: $path"); return []; } }; stream_wrapper_register('test', get_class($x)); $dir = 'test://foo/bar'; var_dump(is_dir($dir)); var_dump(rmdir($dir)); var_dump(is_dir($dir)); var_dump(unlink($dir)); var_dump(is_dir($dir)); clearstatcache(); var_dump(is_dir($dir));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s6tnC
function name:  (null)
number of ops:  49
compiled vars:  !0 = $x, !1 = $dir
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                                   <true>  
          1        NEW                                                  $3      $2
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $3
   23     4        INIT_FCALL                                                   'stream_wrapper_register'
          5        SEND_VAL                                                     'test'
          6        GET_CLASS                                            ~6      !0
          7        SEND_VAL                                                     ~6
          8        DO_ICALL                                                     
   25     9        ASSIGN                                                       !1, 'test%3A%2F%2Ffoo%2Fbar'
   27    10        INIT_FCALL                                                   'var_dump'
         11        INIT_FCALL                                                   'is_dir'
         12        SEND_VAR                                                     !1
         13        DO_ICALL                                             $9      
         14        SEND_VAR                                                     $9
         15        DO_ICALL                                                     
   28    16        INIT_FCALL                                                   'var_dump'
         17        INIT_FCALL                                                   'rmdir'
         18        SEND_VAR                                                     !1
         19        DO_ICALL                                             $11     
         20        SEND_VAR                                                     $11
         21        DO_ICALL                                                     
   29    22        INIT_FCALL                                                   'var_dump'
         23        INIT_FCALL                                                   'is_dir'
         24        SEND_VAR                                                     !1
         25        DO_ICALL                                             $13     
         26        SEND_VAR                                                     $13
         27        DO_ICALL                                                     
   30    28        INIT_FCALL                                                   'var_dump'
         29        INIT_FCALL                                                   'unlink'
         30        SEND_VAR                                                     !1
         31        DO_ICALL                                             $15     
         32        SEND_VAR                                                     $15
         33        DO_ICALL                                                     
   31    34        INIT_FCALL                                                   'var_dump'
         35        INIT_FCALL                                                   'is_dir'
         36        SEND_VAR                                                     !1
         37        DO_ICALL                                             $17     
         38        SEND_VAR                                                     $17
         39        DO_ICALL                                                     
   32    40        INIT_FCALL                                                   'clearstatcache'
         41        DO_ICALL                                                     
   33    42        INIT_FCALL                                                   'var_dump'
         43        INIT_FCALL                                                   'is_dir'
         44        SEND_VAR                                                     !1
         45        DO_ICALL                                             $20     
         46        SEND_VAR                                                     $20
         47        DO_ICALL                                                     
         48      > RETURN                                                       1

Class class@anonymous:
Function rmdir:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s6tnC
function name:  rmdir
number of ops:  10
compiled vars:  !0 = $path, !1 = $options
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      0
    8     2        INIT_FCALL                                                   'var_dump'
          3        NOP                                                          
          4        FAST_CONCAT                                          ~2      'rmdir%3A+', !0
          5        SEND_VAL                                                     ~2
          6        DO_ICALL                                                     
    9     7      > RETURN                                                       <true>
   10     8*       VERIFY_RETURN_TYPE                                           
          9*     > RETURN                                                       null

End of function rmdir

Function unlink:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s6tnC
function name:  unlink
number of ops:  10
compiled vars:  !0 = $path, !1 = $options
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      0
   13     2        INIT_FCALL                                                   'var_dump'
          3        NOP                                                          
          4        FAST_CONCAT                                          ~2      'unlink%3A+', !0
          5        SEND_VAL                                                     ~2
          6        DO_ICALL                                                     
   14     7      > RETURN                                                       <true>
   15     8*       VERIFY_RETURN_TYPE                                           
          9*     > RETURN                                                       null

End of function unlink

Function url_stat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s6tnC
function name:  url_stat
number of ops:  10
compiled vars:  !0 = $path, !1 = $flags
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   18     2        INIT_FCALL                                                   'var_dump'
          3        NOP                                                          
          4        FAST_CONCAT                                          ~2      'url_stat%3A+', !0
          5        SEND_VAL                                                     ~2
          6        DO_ICALL                                                     
   19     7      > RETURN                                                       <array>
   20     8*       VERIFY_RETURN_TYPE                                           
          9*     > RETURN                                                       null

End of function url_stat

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.62 ms | 1503 KiB | 19 Q