3v4l.org

run code in 300+ PHP versions simultaneously
<?php $z = new ZipArchive(); $r = $z->open('badzip.zip'); file_put_contents('badzip.zip', pack('IvvvvIIv', 0x06054b50, // End of central directory signature = 0x06054b50 0, // Number of this disk 0, // Disk where central directory starts 0, // Number of central directory records on this disk 0, // Total number of central directory records 0, // Size of central directory (bytes) 0, // Offset of start of central directory, relative to start of archive 0 // Comment length (n) )); $z->close();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M4eVD
function name:  (null)
number of ops:  25
compiled vars:  !0 = $z, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'ZipArchive'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        INIT_METHOD_CALL                                         !0, 'open'
          4        SEND_VAL_EX                                              'badzip.zip'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
    6     7        INIT_FCALL                                               'file_put_contents'
          8        SEND_VAL                                                 'badzip.zip'
          9        INIT_FCALL                                               'pack'
         10        SEND_VAL                                                 'IvvvvIIv'
    7    11        SEND_VAL                                                 101010256
    8    12        SEND_VAL                                                 0
    9    13        SEND_VAL                                                 0
   10    14        SEND_VAL                                                 0
   11    15        SEND_VAL                                                 0
   12    16        SEND_VAL                                                 0
   13    17        SEND_VAL                                                 0
   14    18        SEND_VAL                                                 0
         19        DO_ICALL                                         $7      
         20        SEND_VAR                                                 $7
         21        DO_ICALL                                                 
   17    22        INIT_METHOD_CALL                                         !0, 'close'
         23        DO_FCALL                                      0          
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.2 ms | 1386 KiB | 17 Q