3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump($x = fopen("data:text/plain,trololololo", 'r+')); var_dump(fwrite($x, '123'), rewind($x)); var_dump(stream_get_contents($x)); echo "\r\n"; var_dump($x = fopen("data:text/plain,trololololo", 'w+')); var_dump(fwrite($x, '123'), rewind($x)); var_dump(stream_get_contents($x)); echo "\r\n"; var_dump($x = fopen("data:text/plain,trololololo", 'a+')); var_dump(fwrite($x, '123'), rewind($x)); var_dump(stream_get_contents($x)); echo "\r\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0gmr0
function name:  (null)
number of ops:  79
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'fopen'
          2        SEND_VAL                                                 'data%3Atext%2Fplain%2Ctrololololo'
          3        SEND_VAL                                                 'r%2B'
          4        DO_ICALL                                         $1      
          5        ASSIGN                                           ~2      !0, $1
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
    4     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'fwrite'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 '123'
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         14        INIT_FCALL                                               'rewind'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $5      
         17        SEND_VAR                                                 $5
         18        DO_ICALL                                                 
    5    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'stream_get_contents'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $7      
         23        SEND_VAR                                                 $7
         24        DO_ICALL                                                 
    6    25        ECHO                                                     '%0D%0A'
    7    26        INIT_FCALL                                               'var_dump'
         27        INIT_FCALL                                               'fopen'
         28        SEND_VAL                                                 'data%3Atext%2Fplain%2Ctrololololo'
         29        SEND_VAL                                                 'w%2B'
         30        DO_ICALL                                         $9      
         31        ASSIGN                                           ~10     !0, $9
         32        SEND_VAL                                                 ~10
         33        DO_ICALL                                                 
    8    34        INIT_FCALL                                               'var_dump'
         35        INIT_FCALL                                               'fwrite'
         36        SEND_VAR                                                 !0
         37        SEND_VAL                                                 '123'
         38        DO_ICALL                                         $12     
         39        SEND_VAR                                                 $12
         40        INIT_FCALL                                               'rewind'
         41        SEND_VAR                                                 !0
         42        DO_ICALL                                         $13     
         43        SEND_VAR                                                 $13
         44        DO_ICALL                                                 
    9    45        INIT_FCALL                                               'var_dump'
         46        INIT_FCALL                                               'stream_get_contents'
         47        SEND_VAR                                                 !0
         48        DO_ICALL                                         $15     
         49        SEND_VAR                                                 $15
         50        DO_ICALL                                                 
   10    51        ECHO                                                     '%0D%0A'
   11    52        INIT_FCALL                                               'var_dump'
         53        INIT_FCALL                                               'fopen'
         54        SEND_VAL                                                 'data%3Atext%2Fplain%2Ctrololololo'
         55        SEND_VAL                                                 'a%2B'
         56        DO_ICALL                                         $17     
         57        ASSIGN                                           ~18     !0, $17
         58        SEND_VAL                                                 ~18
         59        DO_ICALL                                                 
   12    60        INIT_FCALL                                               'var_dump'
         61        INIT_FCALL                                               'fwrite'
         62        SEND_VAR                                                 !0
         63        SEND_VAL                                                 '123'
         64        DO_ICALL                                         $20     
         65        SEND_VAR                                                 $20
         66        INIT_FCALL                                               'rewind'
         67        SEND_VAR                                                 !0
         68        DO_ICALL                                         $21     
         69        SEND_VAR                                                 $21
         70        DO_ICALL                                                 
   13    71        INIT_FCALL                                               'var_dump'
         72        INIT_FCALL                                               'stream_get_contents'
         73        SEND_VAR                                                 !0
         74        DO_ICALL                                         $23     
         75        SEND_VAR                                                 $23
         76        DO_ICALL                                                 
   14    77        ECHO                                                     '%0D%0A'
         78      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.52 ms | 1468 KiB | 18 Q