3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = file_get_contents(__FILE__); $h = fopen('php://temp', 'r+b'); fwrite($h, $content); rewind($h); var_dump(spl_object_hash($h)); $h2 = fopen('php://temp', 'r+b'); fwrite($h2, 'Nenenenenenenen'); rewind($h2); var_dump(fread($h, 20)); var_dump(fread($h2, 20));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GuQLv
function name:  (null)
number of ops:  49
compiled vars:  !0 = $content, !1 = $h, !2 = $h2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'file_get_contents'
          1        SEND_VAL                                                 '%2Fin%2FGuQLv'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    5     4        INIT_FCALL                                               'fopen'
          5        SEND_VAL                                                 'php%3A%2F%2Ftemp'
          6        SEND_VAL                                                 'r%2Bb'
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
    6     9        INIT_FCALL                                               'fwrite'
         10        SEND_VAR                                                 !1
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
    7    13        INIT_FCALL                                               'rewind'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
    9    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'spl_object_hash'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $9      
         20        SEND_VAR                                                 $9
         21        DO_ICALL                                                 
   11    22        INIT_FCALL                                               'fopen'
         23        SEND_VAL                                                 'php%3A%2F%2Ftemp'
         24        SEND_VAL                                                 'r%2Bb'
         25        DO_ICALL                                         $11     
         26        ASSIGN                                                   !2, $11
   12    27        INIT_FCALL                                               'fwrite'
         28        SEND_VAR                                                 !2
         29        SEND_VAL                                                 'Nenenenenenenen'
         30        DO_ICALL                                                 
   13    31        INIT_FCALL                                               'rewind'
         32        SEND_VAR                                                 !2
         33        DO_ICALL                                                 
   15    34        INIT_FCALL                                               'var_dump'
         35        INIT_FCALL                                               'fread'
         36        SEND_VAR                                                 !1
         37        SEND_VAL                                                 20
         38        DO_ICALL                                         $15     
         39        SEND_VAR                                                 $15
         40        DO_ICALL                                                 
   16    41        INIT_FCALL                                               'var_dump'
         42        INIT_FCALL                                               'fread'
         43        SEND_VAR                                                 !2
         44        SEND_VAL                                                 20
         45        DO_ICALL                                         $17     
         46        SEND_VAR                                                 $17
         47        DO_ICALL                                                 
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.41 ms | 1400 KiB | 27 Q