3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sFile = tempnam('/tmp', 'test'); var_dump(decoct(stat($sFile)['mode'])); $phar = new \PharData('/tmp/test.tar', null, null, \Phar::TAR); $phar->addFile($sFile, 'test-file-phar'); $phar->extractTo('/tmp/'); var_dump(decoct(stat('/tmp/test-file-phar')['mode']));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EMR4U
function name:  (null)
number of ops:  40
compiled vars:  !0 = $sFile, !1 = $phar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'tempnam'
          1        SEND_VAL                                                 '%2Ftmp'
          2        SEND_VAL                                                 'test'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'decoct'
          7        INIT_FCALL                                               'stat'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        FETCH_DIM_R                                      ~5      $4, 'mode'
         11        SEND_VAL                                                 ~5
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
    6    15        NEW                                              $8      'PharData'
         16        SEND_VAL_EX                                              '%2Ftmp%2Ftest.tar'
         17        SEND_VAL_EX                                              null
         18        SEND_VAL_EX                                              null
         19        SEND_VAL_EX                                              2
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !1, $8
    7    22        INIT_METHOD_CALL                                         !1, 'addFile'
         23        SEND_VAR_EX                                              !0
         24        SEND_VAL_EX                                              'test-file-phar'
         25        DO_FCALL                                      0          
    8    26        INIT_METHOD_CALL                                         !1, 'extractTo'
         27        SEND_VAL_EX                                              '%2Ftmp%2F'
         28        DO_FCALL                                      0          
   10    29        INIT_FCALL                                               'var_dump'
         30        INIT_FCALL                                               'decoct'
         31        INIT_FCALL                                               'stat'
         32        SEND_VAL                                                 '%2Ftmp%2Ftest-file-phar'
         33        DO_ICALL                                         $13     
         34        FETCH_DIM_R                                      ~14     $13, 'mode'
         35        SEND_VAL                                                 ~14
         36        DO_ICALL                                         $15     
         37        SEND_VAR                                                 $15
         38        DO_ICALL                                                 
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.72 ms | 1396 KiB | 21 Q