3v4l.org

run code in 300+ PHP versions simultaneously
<?php $info = finfo_open(FILEINFO_MIME_TYPE); if (!$info) die('no finfo available'); $buffer = <<<XML <?xml version="1.0" encoding="UTF-8"?> <application> <message> <from>SilverFire</from> <to>World</to> <body>Hello, world!</body> </message> </application> XML ; $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 = 7
Branch analysis from position: 6
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QDKAp
function name:  (null)
number of ops:  23
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, ->7
          6    > > EXIT                                                     'no+finfo+available'
    5     7    >   ASSIGN                                                   !1, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3Capplication%3E%0A%3Cmessage%3E%0A%09%3Cfrom%3ESilverFire%3C%2Ffrom%3E%0A%09%3Cto%3EWorld%3C%2Fto%3E%0A%09%3Cbody%3EHello%2C+world%21%3C%2Fbody%3E%0A%3C%2Fmessage%3E%0A%3C%2Fapplication%3E'
   16     8        INIT_FCALL                                               'finfo_buffer'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !2, $7
   17    13        INIT_FCALL                                               'finfo_close'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
   19    16        TYPE_CHECK                                    4          !2
         17      > JMPZ                                                     ~10, ->19
   20    18    > > EXIT                                                     'Failed+to+read+file'
   23    19    >   INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.44 ms | 1395 KiB | 21 Q