3v4l.org

run code in 500+ PHP versions simultaneously
<?php $info = finfo_open(FILEINFO_MIME_TYPE); if (!$info) die('no finfo available'); $buffer = <<<JSON {asd:'asd'} JSON ; $result = finfo_buffer($info, $buffer); finfo_close($info); if ($result === false) { die('Failed to read file'); } var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
1 jumps found. (Code = 61) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iteti
function name:  (null)
number of ops:  27
compiled vars:  !0 = $info, !1 = $buffer, !2 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'finfo_open'
          1        SEND_VAL                                                     16
          2        DO_ICALL                                             $3      
          3        ASSIGN                                                       !0, $3
    4     4        BOOL_NOT                                             ~5      !0
          5      > JMPZ                                                         ~5, ->9
          6    > > INIT_FCALL                                                   'exit'
          7*       SEND_VAL                                                     'no+finfo+available'
          8*       DO_ICALL                                                     
    5     9    >   ASSIGN                                                       !1, '%7Basd%3A%27asd%27%7D'
    9    10        INIT_FCALL                                                   'finfo_buffer'
         11        SEND_VAR                                                     !0
         12        SEND_VAR                                                     !1
         13        DO_ICALL                                             $8      
         14        ASSIGN                                                       !2, $8
   10    15        INIT_FCALL                                                   'finfo_close'
         16        SEND_VAR                                                     !0
         17        DO_FCALL_BY_NAME                                             
   12    18        TYPE_CHECK                                        4          !2
         19      > JMPZ                                                         ~11, ->23
   13    20    > > INIT_FCALL                                                   'exit'
         21*       SEND_VAL                                                     'Failed+to+read+file'
         22*       DO_ICALL                                                     
   16    23    >   INIT_FCALL                                                   'var_dump'
         24        SEND_VAR                                                     !2
         25        DO_ICALL                                                     
         26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.43 ms | 2285 KiB | 18 Q