3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dir = '/tmp/'.uniqid(); mkdir($dir); mkdir($dir.'/Source'); mkdir($dir.'/A'); mkdir($dir.'/B'); mkdir($dir.'/C'); file_put_contents($dir.'/Source/file', 'foo'); file_put_contents($dir.'/A/file', 'bar'); file_put_contents($dir.'/B/file', 'bar'); file_put_contents($dir.'/C/file', 'bar'); $perm_writable = 0777; $perm_not_writable = 0555; chmod($dir.'/A/file', $perm_writable); chmod($dir.'/A', $perm_writable); chmod($dir.'/B/file', $perm_not_writable); chmod($dir.'/B', $perm_writable); chmod($dir.'/C/file', $perm_writable); chmod($dir.'/C', $perm_not_writable); exec('tree '.$dir, $output); print_r($output); var_dump(rename($dir.'/Source/file', $dir.'/A/file')); var_dump(rename($dir.'/Source/file', $dir.'/B/file')); var_dump(rename($dir.'/Source/file', $dir.'/C/file'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7a8hf
function name:  (null)
number of ops:  111
compiled vars:  !0 = $dir, !1 = $perm_writable, !2 = $perm_not_writable, !3 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'uniqid'
          1        DO_ICALL                                         $4      
          2        CONCAT                                           ~5      '%2Ftmp%2F', $4
          3        ASSIGN                                                   !0, ~5
    4     4        INIT_FCALL                                               'mkdir'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    5     7        INIT_FCALL                                               'mkdir'
          8        CONCAT                                           ~8      !0, '%2FSource'
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                                 
    6    11        INIT_FCALL                                               'mkdir'
         12        CONCAT                                           ~10     !0, '%2FA'
         13        SEND_VAL                                                 ~10
         14        DO_ICALL                                                 
    7    15        INIT_FCALL                                               'mkdir'
         16        CONCAT                                           ~12     !0, '%2FB'
         17        SEND_VAL                                                 ~12
         18        DO_ICALL                                                 
    8    19        INIT_FCALL                                               'mkdir'
         20        CONCAT                                           ~14     !0, '%2FC'
         21        SEND_VAL                                                 ~14
         22        DO_ICALL                                                 
   10    23        INIT_FCALL                                               'file_put_contents'
         24        CONCAT                                           ~16     !0, '%2FSource%2Ffile'
         25        SEND_VAL                                                 ~16
         26        SEND_VAL                                                 'foo'
         27        DO_ICALL                                                 
   11    28        INIT_FCALL                                               'file_put_contents'
         29        CONCAT                                           ~18     !0, '%2FA%2Ffile'
         30        SEND_VAL                                                 ~18
         31        SEND_VAL                                                 'bar'
         32        DO_ICALL                                                 
   12    33        INIT_FCALL                                               'file_put_contents'
         34        CONCAT                                           ~20     !0, '%2FB%2Ffile'
         35        SEND_VAL                                                 ~20
         36        SEND_VAL                                                 'bar'
         37        DO_ICALL                                                 
   13    38        INIT_FCALL                                               'file_put_contents'
         39        CONCAT                                           ~22     !0, '%2FC%2Ffile'
         40        SEND_VAL                                                 ~22
         41        SEND_VAL                                                 'bar'
         42        DO_ICALL                                                 
   15    43        ASSIGN                                                   !1, 511
   16    44        ASSIGN                                                   !2, 365
   18    45        INIT_FCALL                                               'chmod'
         46        CONCAT                                           ~26     !0, '%2FA%2Ffile'
         47        SEND_VAL                                                 ~26
         48        SEND_VAR                                                 !1
         49        DO_ICALL                                                 
   19    50        INIT_FCALL                                               'chmod'
         51        CONCAT                                           ~28     !0, '%2FA'
         52        SEND_VAL                                                 ~28
         53        SEND_VAR                                                 !1
         54        DO_ICALL                                                 
   21    55        INIT_FCALL                                               'chmod'
         56        CONCAT                                           ~30     !0, '%2FB%2Ffile'
         57        SEND_VAL                                                 ~30
         58        SEND_VAR                                                 !2
         59        DO_ICALL                                                 
   22    60        INIT_FCALL                                               'chmod'
         61        CONCAT                                           ~32     !0, '%2FB'
         62        SEND_VAL                                                 ~32
         63        SEND_VAR                                                 !1
         64        DO_ICALL                                                 
   24    65        INIT_FCALL                                               'chmod'
         66        CONCAT                                           ~34     !0, '%2FC%2Ffile'
         67        SEND_VAL                                                 ~34
         68        SEND_VAR                                                 !1
         69        DO_ICALL                                                 
   25    70        INIT_FCALL                                               'chmod'
         71        CONCAT                                           ~36     !0, '%2FC'
         72        SEND_VAL                                                 ~36
         73        SEND_VAR                                                 !2
         74        DO_ICALL                                                 
   27    75        INIT_FCALL                                               'exec'
         76        CONCAT                                           ~38     'tree+', !0
         77        SEND_VAL                                                 ~38
         78        SEND_REF                                                 !3
         79        DO_ICALL                                                 
   28    80        INIT_FCALL                                               'print_r'
         81        SEND_VAR                                                 !3
         82        DO_ICALL                                                 
   30    83        INIT_FCALL                                               'var_dump'
         84        INIT_FCALL                                               'rename'
         85        CONCAT                                           ~41     !0, '%2FSource%2Ffile'
         86        SEND_VAL                                                 ~41
         87        CONCAT                                           ~42     !0, '%2FA%2Ffile'
         88        SEND_VAL                                                 ~42
         89        DO_ICALL                                         $43     
         90        SEND_VAR                                                 $43
         91        DO_ICALL                                                 
   31    92        INIT_FCALL                                               'var_dump'
         93        INIT_FCALL                                               'rename'
         94        CONCAT                                           ~45     !0, '%2FSource%2Ffile'
         95        SEND_VAL                                                 ~45
         96        CONCAT                                           ~46     !0, '%2FB%2Ffile'
         97        SEND_VAL                                                 ~46
         98        DO_ICALL                                         $47     
         99        SEND_VAR                                                 $47
        100        DO_ICALL                                                 
   32   101        INIT_FCALL                                               'var_dump'
        102        INIT_FCALL                                               'rename'
        103        CONCAT                                           ~49     !0, '%2FSource%2Ffile'
        104        SEND_VAL                                                 ~49
        105        CONCAT                                           ~50     !0, '%2FC%2Ffile'
        106        SEND_VAL                                                 ~50
        107        DO_ICALL                                         $51     
        108        SEND_VAR                                                 $51
        109        DO_ICALL                                                 
        110      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.57 ms | 1404 KiB | 29 Q