3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zip = new ZipArchive; if ($zip->open('test.zip', ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE)) { if($zip->addEmptyDir('newDirectory')) { echo 'Created a new root directory'; } else { echo 'Could not create the directory'; } echo ' : '.($zip->getStatusString()); $zip->close(); } else { echo 'failed'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 25
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AIOJ8
function name:  (null)
number of ops:  27
compiled vars:  !0 = $zip
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'ZipArchive'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    4     3        INIT_METHOD_CALL                                         !0, 'open'
          4        SEND_VAL_EX                                              'test.zip'
          5        FETCH_CLASS_CONSTANT                             ~4      'ZIPARCHIVE', 'CREATE'
          6        FETCH_CLASS_CONSTANT                             ~5      'ZIPARCHIVE', 'OVERWRITE'
          7        BW_OR                                            ~6      ~4, ~5
          8        SEND_VAL_EX                                              ~6
          9        DO_FCALL                                      0  $7      
         10      > JMPZ                                                     $7, ->25
    5    11    >   INIT_METHOD_CALL                                         !0, 'addEmptyDir'
         12        SEND_VAL_EX                                              'newDirectory'
         13        DO_FCALL                                      0  $8      
         14      > JMPZ                                                     $8, ->17
    6    15    >   ECHO                                                     'Created+a+new+root+directory'
         16      > JMP                                                      ->18
    8    17    >   ECHO                                                     'Could+not+create+the+directory'
   10    18    >   INIT_METHOD_CALL                                         !0, 'getStatusString'
         19        DO_FCALL                                      0  $9      
         20        CONCAT                                           ~10     '+%3A+', $9
         21        ECHO                                                     ~10
   11    22        INIT_METHOD_CALL                                         !0, 'close'
         23        DO_FCALL                                      0          
         24      > JMP                                                      ->26
   13    25    >   ECHO                                                     'failed'
   14    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.26 ms | 1395 KiB | 13 Q