3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rel_path = '/var/foo/bar/etc.doc'; $attachments = unserialize(NULL); $attachments[] = $rel_path; var_dump($attachments); $attachments = serialize($attachments); $currentAttachments = unserialize($attachments); foreach ($currentAttachments as $file) { var_dump($file); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/r8eX4
function name:  (null)
number of ops:  26
compiled vars:  !0 = $rel_path, !1 = $attachments, !2 = $currentAttachments, !3 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Fvar%2Ffoo%2Fbar%2Fetc.doc'
    4     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAL                                                 null
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    5     5        ASSIGN_DIM                                               !1
          6        OP_DATA                                                  !0
    6     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    7    10        INIT_FCALL                                               'serialize'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !1, $9
    9    14        INIT_FCALL                                               'unserialize'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !2, $11
   10    18      > FE_RESET_R                                       $13     !2, ->24
         19    > > FE_FETCH_R                                               $13, !3, ->24
   11    20    >   INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                                 
   10    23      > JMP                                                      ->19
         24    >   FE_FREE                                                  $13
   12    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.47 ms | 1395 KiB | 19 Q