3v4l.org

run code in 300+ PHP versions simultaneously
<?php // EDIT THE 2 LINES BELOW AS D $email_to = "abc18712@gmail.com"; $email_subject = "Hi from John 2"; $email_from = "Jon Lottern <john@rgwtgtwhgt.com>"; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message = "Hi there\n\n"; $email_message .= "Thought about this\n"; $email_message .= "Cheers\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); print "sent";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HBuce
function name:  (null)
number of ops:  27
compiled vars:  !0 = $email_to, !1 = $email_subject, !2 = $email_from, !3 = $email_exp, !4 = $email_message, !5 = $headers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'abc18712%40gmail.com'
    6     1        ASSIGN                                                   !1, 'Hi+from+John+2'
   12     2        ASSIGN                                                   !2, 'Jon+Lottern+%3Cjohn%40rgwtgtwhgt.com%3E'
   15     3        ASSIGN                                                   !3, '%2F%5E%5BA-Za-z0-9._%25-%5D%2B%40%5BA-Za-z0-9.-%5D%2B%5C.%5BA-Za-z%5D%7B2%2C4%7D%24%2F'
   22     4        ASSIGN                                                   !4, 'Hi+there%0A%0A'
   26     5        ASSIGN_OP                                     8          !4, 'Thought+about+this%0A'
   27     6        ASSIGN_OP                                     8          !4, 'Cheers%0A'
   30     7        CONCAT                                           ~13     'From%3A+', !2
          8        CONCAT                                           ~14     ~13, '%0D%0A'
   31     9        CONCAT                                           ~15     ~14, 'Reply-To%3A+'
         10        CONCAT                                           ~16     ~15, !2
         11        CONCAT                                           ~17     ~16, '%0D%0A'
   32    12        CONCAT                                           ~18     ~17, 'X-Mailer%3A+PHP%2F'
         13        INIT_FCALL                                               'phpversion'
         14        DO_ICALL                                         $19     
         15        CONCAT                                           ~20     ~18, $19
   30    16        ASSIGN                                                   !5, ~20
   33    17        BEGIN_SILENCE                                    ~22     
         18        INIT_FCALL                                               'mail'
         19        SEND_VAR                                                 !0
         20        SEND_VAR                                                 !1
         21        SEND_VAR                                                 !4
         22        SEND_VAR                                                 !5
         23        DO_ICALL                                                 
         24        END_SILENCE                                              ~22
   35    25        ECHO                                                     'sent'
         26      > RETURN                                                   1

Function clean_string:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HBuce
function name:  clean_string
number of ops:  9
compiled vars:  !0 = $string, !1 = $bad
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        ASSIGN                                                   !1, <array>
   19     2        INIT_FCALL                                               'str_replace'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7      > RETURN                                                   $3
   20     8*     > RETURN                                                   null

End of function clean_string

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.54 ms | 1400 KiB | 19 Q