3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file_name='pic1.jpg'; $to = ''; $subject = 'Приветствие'; $from = ''; $boundary = 'qwe'; $headers = 'From: '; $headers .= 'Content-type: multipart/mixed; boundary="'.$boundary.'"'; $headers .= 'Mime-Version: 1.0'; $headers .= 'Reply-To: '; $headers .= 'X-Mailer: php/' . phpversion(); $message = '\n--'.$boundary.'\n\n'; $message .= 'Content-type: text/html; charset=utf-8\n'; $message .= '\n <html> <head> <title>Приветствие</title> </head> <body> <div style="width: 100%"> <div style="width: 500px; height: 100%; border: 1px solid black; text-align: left; margin: 0 auto; position: relative; font-family: Times New Roman"> <div style="margin: 25px">Благодарю за подписку!</div> <div style="margin-top: 25px; margin-left: 25px"> <img alt="превью" src="cid:pic1" /> </div> <div style="margin: 25px; margin-top: 25px; text-align: right">С уважением,</div> </div> </div> </body> </html>\n\n '; $message.= '\n\n--'.$boundary.'\n'; $message.= 'Content-Type: image/jpeg; name="'.basename($file_name).'"\n'; $message.= 'Content-Transfer-Encoding: base64\n'; $message.= 'Content-ID: pic1\n\n'; $f=fopen($file_name,'rb'); $message.= base64_encode(fread($f,filesize($file_name))).'\n'; $message.= '--'.$boundary.'--\n\n'; mail($to, $subject, $message, $headers); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7IUWJ
function name:  (null)
number of ops:  58
compiled vars:  !0 = $file_name, !1 = $to, !2 = $subject, !3 = $from, !4 = $boundary, !5 = $headers, !6 = $message, !7 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'pic1.jpg'
    5     1        ASSIGN                                                   !1, ''
    6     2        ASSIGN                                                   !2, '%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82%D1%81%D1%82%D0%B2%D0%B8%D0%B5'
    8     3        ASSIGN                                                   !3, ''
   10     4        ASSIGN                                                   !4, 'qwe'
   12     5        ASSIGN                                                   !5, 'From%3A+'
   13     6        CONCAT                                           ~14     'Content-type%3A+multipart%2Fmixed%3B+boundary%3D%22', !4
          7        CONCAT                                           ~15     ~14, '%22'
          8        ASSIGN_OP                                     8          !5, ~15
   14     9        ASSIGN_OP                                     8          !5, 'Mime-Version%3A+1.0'
   15    10        ASSIGN_OP                                     8          !5, 'Reply-To%3A+'
   16    11        INIT_FCALL                                               'phpversion'
         12        DO_ICALL                                         $19     
         13        CONCAT                                           ~20     'X-Mailer%3A+php%2F', $19
         14        ASSIGN_OP                                     8          !5, ~20
   18    15        CONCAT                                           ~22     '%5Cn--', !4
         16        CONCAT                                           ~23     ~22, '%5Cn%5Cn'
         17        ASSIGN                                                   !6, ~23
   19    18        ASSIGN_OP                                     8          !6, 'Content-type%3A+text%2Fhtml%3B+charset%3Dutf-8%5Cn'
   20    19        ASSIGN_OP                                     8          !6, '%5Cn%09%09%0A%09%09%3Chtml%3E%0A%09%09%09%3Chead%3E%0A%09%09%09++%3Ctitle%3E%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82%D1%81%D1%82%D0%B2%D0%B8%D0%B5%3C%2Ftitle%3E%0A%09%09%09%3C%2Fhead%3E%0A%09%09%09%3Cbody%3E%0A%09%09%09%09%3Cdiv+style%3D%22width%3A+100%25%22%3E%0A%09%09%09%09%09%3Cdiv+style%3D%22width%3A+500px%3B+height%3A+100%25%3B+border%3A+1px+solid+black%3B+text-align%3A+left%3B+margin%3A+0+auto%3B+position%3A+relative%3B+font-family%3A+Times+New+Roman%22%3E%0A%09%09%09%09%09%09%3Cdiv+style%3D%22margin%3A+25px%22%3E%D0%91%D0%BB%D0%B0%D0%B3%D0%BE%D0%B4%D0%B0%D1%80%D1%8E+%D0%B7%D0%B0+%D0%BF%D0%BE%D0%B4%D0%BF%D0%B8%D1%81%D0%BA%D1%83%21%3C%2Fdiv%3E%0A%09%09%09%09%09%09%3Cdiv+style%3D%22margin-top%3A+25px%3B+margin-left%3A+25px%22%3E%0A%09%09%09%09%09%09%09%3Cimg+alt%3D%22%D0%BF%D1%80%D0%B5%D0%B2%D1%8C%D1%8E%22+src%3D%22cid%3Apic1%22+%2F%3E%0A%09%09%09%09%09%09%3C%2Fdiv%3E%0A%09%09%09%09%09%09%3Cdiv+style%3D%22margin%3A+25px%3B+margin-top%3A+25px%3B+text-align%3A+right%22%3E%D0%A1+%D1%83%D0%B2%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%D0%BC%2C%3C%2Fdiv%3E%0A%09%09%09%09%09%3C%2Fdiv%3E%0A%09%09%09%09%3C%2Fdiv%3E%0A%09%09%09%3C%2Fbody%3E%0A%09%09%3C%2Fhtml%3E%5Cn%5Cn%0A++++++++'
   38    20        CONCAT                                           ~27     '%5Cn%5Cn--', !4
         21        CONCAT                                           ~28     ~27, '%5Cn'
         22        ASSIGN_OP                                     8          !6, ~28
   39    23        INIT_FCALL                                               'basename'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $30     
         26        CONCAT                                           ~31     'Content-Type%3A+image%2Fjpeg%3B+name%3D%22', $30
         27        CONCAT                                           ~32     ~31, '%22%5Cn'
         28        ASSIGN_OP                                     8          !6, ~32
   40    29        ASSIGN_OP                                     8          !6, 'Content-Transfer-Encoding%3A+base64%5Cn'
   41    30        ASSIGN_OP                                     8          !6, 'Content-ID%3A+pic1%5Cn%5Cn'
   42    31        INIT_FCALL                                               'fopen'
         32        SEND_VAR                                                 !0
         33        SEND_VAL                                                 'rb'
         34        DO_ICALL                                         $36     
         35        ASSIGN                                                   !7, $36
   43    36        INIT_FCALL                                               'base64_encode'
         37        INIT_FCALL                                               'fread'
         38        SEND_VAR                                                 !7
         39        INIT_FCALL                                               'filesize'
         40        SEND_VAR                                                 !0
         41        DO_ICALL                                         $38     
         42        SEND_VAR                                                 $38
         43        DO_ICALL                                         $39     
         44        SEND_VAR                                                 $39
         45        DO_ICALL                                         $40     
         46        CONCAT                                           ~41     $40, '%5Cn'
         47        ASSIGN_OP                                     8          !6, ~41
   44    48        CONCAT                                           ~43     '--', !4
         49        CONCAT                                           ~44     ~43, '--%5Cn%5Cn'
         50        ASSIGN_OP                                     8          !6, ~44
   46    51        INIT_FCALL                                               'mail'
         52        SEND_VAR                                                 !1
         53        SEND_VAR                                                 !2
         54        SEND_VAR                                                 !6
         55        SEND_VAR                                                 !5
         56        DO_ICALL                                                 
   48    57      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.25 ms | 1011 KiB | 20 Q