3v4l.org

run code in 500+ PHP versions simultaneously
<?php $csv = <<<'CSV' a,b,c,d 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 1,2,3,4 CSV; // Extension is important $filename = '/tmp/data.txt'; $nBytes = file_put_contents($filename,$csv); if ( $nBytes === false ) { trigger_error("Unable to write data to file", E_USER_ERROR); } $fi = finfo_open( FILEINFO_MIME_TYPE ); if ($fi === false ) { trigger_error("Unable to open finfo", E_USER_ERROR); } $mimeType = finfo_file($fi, $filename, FILEINFO_MIME_TYPE); echo $mimeType;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 13
filename:       /in/tmGQe
function name:  (null)
number of ops:  31
compiled vars:  !0 = $csv, !1 = $filename, !2 = $nBytes, !3 = $fi, !4 = $mimeType
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'a%2Cb%2Cc%2Cd%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4%0A1%2C2%2C3%2C4'
   27     1        ASSIGN                                                       !1, '%2Ftmp%2Fdata.txt'
   29     2        INIT_FCALL                                                   'file_put_contents'
          3        SEND_VAR                                                     !1
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $7      
          6        ASSIGN                                                       !2, $7
   30     7        TYPE_CHECK                                        4          !2
          8      > JMPZ                                                         ~9, ->13
   32     9    >   INIT_FCALL                                                   'trigger_error'
         10        SEND_VAL                                                     'Unable+to+write+data+to+file'
         11        SEND_VAL                                                     256
         12        DO_ICALL                                                     
   35    13    >   INIT_FCALL                                                   'finfo_open'
         14        SEND_VAL                                                     16
         15        DO_ICALL                                             $11     
         16        ASSIGN                                                       !3, $11
   36    17        TYPE_CHECK                                        4          !3
         18      > JMPZ                                                         ~13, ->23
   38    19    >   INIT_FCALL                                                   'trigger_error'
         20        SEND_VAL                                                     'Unable+to+open+finfo'
         21        SEND_VAL                                                     256
         22        DO_ICALL                                                     
   41    23    >   INIT_FCALL                                                   'finfo_file'
         24        SEND_VAR                                                     !3
         25        SEND_VAR                                                     !1
         26        SEND_VAL                                                     16
         27        DO_ICALL                                             $15     
         28        ASSIGN                                                       !4, $15
   43    29        ECHO                                                         !4
   44    30      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.43 ms | 1284 KiB | 12 Q