3v4l.org

run code in 300+ PHP versions simultaneously
<?php $modes = ['w', 'a', 'x', 'c', 'wb', 'ab', 'xb', 'cb', 'wt', 'at', 'xt', 'ct']; foreach($modes as $mode) { $stream = fopen('php://memory', $mode); $stats = stream_get_meta_data($stream); echo $stats['mode'].PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 16
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/BNQ4p
function name:  (null)
number of ops:  18
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, ->16
          2    > > FE_FETCH_R                                               $5, !1, ->16
    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        FETCH_DIM_R                                      ~10     !3, 'mode'
         13        CONCAT                                           ~11     ~10, '%0A'
         14        ECHO                                                     ~11
    5    15      > JMP                                                      ->2
         16    >   FE_FREE                                                  $5
    9    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.99 ms | 1395 KiB | 17 Q