3v4l.org

run code in 500+ 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 = 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/QDKAp
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, '%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    10        INIT_FCALL                                                   'finfo_buffer'
         11        SEND_VAR                                                     !0
         12        SEND_VAR                                                     !1
         13        DO_ICALL                                             $8      
         14        ASSIGN                                                       !2, $8
   17    15        INIT_FCALL                                                   'finfo_close'
         16        SEND_VAR                                                     !0
         17        DO_FCALL_BY_NAME                                             
   19    18        TYPE_CHECK                                        4          !2
         19      > JMPZ                                                         ~11, ->23
   20    20    > > INIT_FCALL                                                   'exit'
         21*       SEND_VAL                                                     'Failed+to+read+file'
         22*       DO_ICALL                                                     
   23    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:
226.02 ms | 3285 KiB | 18 Q