3v4l.org

run code in 300+ PHP versions simultaneously
<?php $finfo = new finfo(FILEINFO_MIME_TYPE); file_put_contents('/tmp/waa', "<?php\nclass A{}"); var_dump($finfo->file(__FILE__)); var_dump($finfo->file('/tmp/waa'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jCvJv
function name:  (null)
number of ops:  21
compiled vars:  !0 = $finfo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'finfo'
          1        SEND_VAL_EX                                              16
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    4     4        INIT_FCALL                                               'file_put_contents'
          5        SEND_VAL                                                 '%2Ftmp%2Fwaa'
          6        SEND_VAL                                                 '%3C%3Fphp%0Aclass+A%7B%7D'
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'file'
         10        SEND_VAL_EX                                              '%2Fin%2FjCvJv'
         11        DO_FCALL                                      0  $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
    6    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !0, 'file'
         16        SEND_VAL_EX                                              '%2Ftmp%2Fwaa'
         17        DO_FCALL                                      0  $7      
         18        SEND_VAR                                                 $7
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.04 ms | 1395 KiB | 17 Q