3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = sys_get_temp_dir() . '/test.tmp'; file_put_contents("abcd", $path); var_dump(mime_content_type($path) === 'text/plain'); file_put_contents("abc", $path); var_dump(mime_content_type($path) === 'text/plain');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cRDDC
function name:  (null)
number of ops:  27
compiled vars:  !0 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'sys_get_temp_dir'
          1        DO_ICALL                                         $1      
          2        CONCAT                                           ~2      $1, '%2Ftest.tmp'
          3        ASSIGN                                                   !0, ~2
    4     4        INIT_FCALL                                               'file_put_contents'
          5        SEND_VAL                                                 'abcd'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'mime_content_type'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12        IS_IDENTICAL                                     ~6      $5, 'text%2Fplain'
         13        SEND_VAL                                                 ~6
         14        DO_ICALL                                                 
    7    15        INIT_FCALL                                               'file_put_contents'
         16        SEND_VAL                                                 'abc'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
    8    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'mime_content_type'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $9      
         23        IS_IDENTICAL                                     ~10     $9, 'text%2Fplain'
         24        SEND_VAL                                                 ~10
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.17 ms | 1395 KiB | 21 Q