3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fp = fopen('php://memory', 'w+'); fwrite($fp, "-- \n" . "-- something here\n" . "-- example sql\n" . "-- sql delimiter: ;\n" . "-- \n" . "\n" . "create table t (\n" . " id int\n" . ");\n" ); fseek($fp, 0); echo stream_get_contents($fp), stream_get_contents($fp);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1DP5Q
function name:  (null)
number of ops:  22
compiled vars:  !0 = $fp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'php%3A%2F%2Fmemory'
          2        SEND_VAL                                                 'w%2B'
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    5     5        INIT_FCALL                                               'fwrite'
          6        SEND_VAR                                                 !0
   14     7        SEND_VAL                                                 '--+%0A--+something+here%0A--+example+sql%0A--+sql+delimiter%3A+%3B%0A--+%0A%0Acreate+table+t+%28%0A++id+int%0A%29%3B%0A'
          8        DO_ICALL                                                 
   17     9        INIT_FCALL                                               'fseek'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 0
         12        DO_ICALL                                                 
   19    13        INIT_FCALL                                               'stream_get_contents'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $5      
         16        ECHO                                                     $5
         17        INIT_FCALL                                               'stream_get_contents'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $6      
         20        ECHO                                                     $6
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.42 ms | 1395 KiB | 21 Q