3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "\xEF\xBB\xBF\x22\x61\x22\x0A"; var_dump(mb_detect_encoding($string)); $stream = fopen('php://memory', 'w+'); fwrite($stream, $string); rewind($stream); var_dump(fgets($stream, 1000));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5sQrN
function name:  (null)
number of ops:  27
compiled vars:  !0 = $string, !1 = $stream
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%EF%BB%BF%22a%22%0A'
    5     1        INIT_FCALL                                                   'var_dump'
          2        INIT_FCALL                                                   'mb_detect_encoding'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $3      
          5        SEND_VAR                                                     $3
          6        DO_ICALL                                                     
    7     7        INIT_FCALL                                                   'fopen'
          8        SEND_VAL                                                     'php%3A%2F%2Fmemory'
          9        SEND_VAL                                                     'w%2B'
         10        DO_ICALL                                             $5      
         11        ASSIGN                                                       !1, $5
    8    12        INIT_FCALL                                                   'fwrite'
         13        SEND_VAR                                                     !1
         14        SEND_VAR                                                     !0
         15        DO_ICALL                                                     
    9    16        INIT_FCALL                                                   'rewind'
         17        SEND_VAR                                                     !1
         18        DO_ICALL                                                     
   11    19        INIT_FCALL                                                   'var_dump'
         20        INIT_FCALL                                                   'fgets'
         21        SEND_VAR                                                     !1
         22        SEND_VAL                                                     1000
         23        DO_ICALL                                             $9      
         24        SEND_VAR                                                     $9
         25        DO_ICALL                                                     
         26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
147.69 ms | 2547 KiB | 19 Q