3v4l.org

run code in 300+ PHP versions simultaneously
<?php $modes = ['a', 'a+', 'w', 'w+', 'r+', 'x', 'x+', 'c', 'c+']; foreach($modes as $mode) { $stream = fopen('php://memory', $mode); $stats = stream_get_meta_data($stream); echo $mode.' => '.$stats['mode']; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 17
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/B609r
function name:  (null)
number of ops:  19
compiled vars:  !0 = $modes, !1 = $mode, !2 = $stream, !3 = $stats
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1      > FE_RESET_R                                       $5      !0, ->17
          2    > > FE_FETCH_R                                               $5, !1, ->17
    6     3    >   INIT_FCALL                                               'fopen'
          4        SEND_VAL                                                 'php%3A%2F%2Fmemory'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    7     8        INIT_FCALL                                               'stream_get_meta_data'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !3, $8
    8    12        CONCAT                                           ~10     !1, '+%3D%3E+'
         13        FETCH_DIM_R                                      ~11     !3, 'mode'
         14        CONCAT                                           ~12     ~10, ~11
         15        ECHO                                                     ~12
    5    16      > JMP                                                      ->2
         17    >   FE_FREE                                                  $5
    9    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.03 ms | 1386 KiB | 17 Q