3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zip = new ZipArchive(); $ret = $zip->open('application.zip', ZipArchive::OVERWRITE); if ($ret !== TRUE) { printf('Failed with code %d', $ret); } else { $options = array('add_path' => 'sources/', 'remove_all_path' => TRUE); $a = $zip->addGlob('*.{php,txt}', GLOB_BRACE, $options); var_dump($a); $zip->close(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qq399
function name:  (null)
number of ops:  29
compiled vars:  !0 = $zip, !1 = $ret, !2 = $options, !3 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'ZipArchive'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    3     3        INIT_METHOD_CALL                                         !0, 'open'
          4        SEND_VAL_EX                                              'application.zip'
          5        FETCH_CLASS_CONSTANT                             ~7      'ZipArchive', 'OVERWRITE'
          6        SEND_VAL_EX                                              ~7
          7        DO_FCALL                                      0  $8      
          8        ASSIGN                                                   !1, $8
    4     9        TYPE_CHECK                                  1014          !1
         10      > JMPZ                                                     ~10, ->16
    5    11    >   INIT_FCALL                                               'printf'
         12        SEND_VAL                                                 'Failed+with+code+%25d'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > JMP                                                      ->28
    7    16    >   ASSIGN                                                   !2, <array>
    8    17        INIT_METHOD_CALL                                         !0, 'addGlob'
         18        SEND_VAL_EX                                              '%2A.%7Bphp%2Ctxt%7D'
         19        SEND_VAL_EX                                              1024
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0  $13     
         22        ASSIGN                                                   !3, $13
    9    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                                 
   10    26        INIT_METHOD_CALL                                         !0, 'close'
         27        DO_FCALL                                      0          
   11    28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.51 ms | 1388 KiB | 17 Q