3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "info@integralbuildingsolutions.com"; $email_subject = "Paid Boiler Prospect"; /* function died($error) { // your error code can go here echo "We are very sorry, but there were error(s) found with the form you submitted. "; echo "These errors appear below.<br /><br />"; echo $error."<br /><br />"; echo "Please go back and fix these errors.<br /><br />"; die(); } */ // validation expected data exists if(!isset($_POST['interest']) || !isset($_POST['title']) || !isset($_POST['name']) || !isset($_POST['houseno']) || !isset($_POST['postcode']) || !isset($_POST['telephone']) || !isset($_POST['email']) || !isset($_POST['rating']) || !isset($_POST['calculate']) || !isset($_POST['pref'])) $interest = $_POST['interest']; // required $title = $_POST['title']; // required $name = $_POST['name']; // required $houseno = $_POST['houseno']; // required $postcode = $_POST['postcode']; // required $telephone = $_POST['telephone']; // required $email = $_POST['email']; // required $rating = $_POST['rating']; // required $calculate = $_POST['calculate']; // required $pref = $_POST['pref']; // required $error_message = ""; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; if(!preg_match($email_exp,$email_from)) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } $string_exp = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp)) { $error_message .= 'The Name you entered does not appear to be valid.<br />'; } $string_exp = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp,$name,$interest,$title)) { $error_message .= 'The Name you entered does not appear to be valid.<br />'; } $string_var = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp,$interest)) { $error_message .= 'The Name you entered does not appear to be valid.<br />'; } if(strlen($houseno) < 1) { $error_message .= 'The house number you entered does not appear to be valid.<br />'; } if(strlen($telephone) < 2) { $error_message .= 'The telephone you entered do not appear to be valid.<br />'; } /* if(strlen($error_message) > 0) { $error_message .= 'There appears to be some errors please try to resubmit.<br />'; } */ $email_message = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "Details: ".clean_string($interest)."\n"; $email_message .= "Title: ".clean_string($title)."\n"; $email_message .= "Name: ".clean_string($name)."\n"; $email_message .= "Houseno: ".clean_string($houseno)."\n"; $email_message .= "Postcode: ".clean_string($postcode)."\n"; $email_message .= "Tel No: ".clean_string($telephone)."\n"; $email_message .= "Email: ".clean_string($email)."\n"; $email_message .= "Energy rating: ".clean_string($rating)."\n"; $email_message .= "Shall We Calculate: ".clean_string($calculate)."\n"; $email_message .= "Boiler Preference: ".clean_string($pref)."\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); //Redirect after mail sent header('Location: http://www.solarkinguk.com/boiler-thank-you'); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 209
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
2 jumps found. (Code = 47) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
2 jumps found. (Code = 47) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
2 jumps found. (Code = 47) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
2 jumps found. (Code = 47) Position 1 = 29, Position 2 = 33
Branch analysis from position: 29
2 jumps found. (Code = 47) Position 1 = 34, Position 2 = 38
Branch analysis from position: 34
2 jumps found. (Code = 47) Position 1 = 39, Position 2 = 43
Branch analysis from position: 39
2 jumps found. (Code = 47) Position 1 = 44, Position 2 = 48
Branch analysis from position: 44
2 jumps found. (Code = 47) Position 1 = 49, Position 2 = 53
Branch analysis from position: 49
2 jumps found. (Code = 43) Position 1 = 54, Position 2 = 57
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 92, Position 2 = 93
Branch analysis from position: 92
2 jumps found. (Code = 43) Position 1 = 99, Position 2 = 100
Branch analysis from position: 99
2 jumps found. (Code = 43) Position 1 = 109, Position 2 = 110
Branch analysis from position: 109
2 jumps found. (Code = 43) Position 1 = 117, Position 2 = 118
Branch analysis from position: 117
2 jumps found. (Code = 43) Position 1 = 121, Position 2 = 122
Branch analysis from position: 121
2 jumps found. (Code = 43) Position 1 = 125, Position 2 = 126
Branch analysis from position: 125
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 126
Branch analysis from position: 122
Branch analysis from position: 118
Branch analysis from position: 110
Branch analysis from position: 100
Branch analysis from position: 93
Branch analysis from position: 57
Branch analysis from position: 53
Branch analysis from position: 48
Branch analysis from position: 43
Branch analysis from position: 38
Branch analysis from position: 33
Branch analysis from position: 28
Branch analysis from position: 23
Branch analysis from position: 18
Branch analysis from position: 13
Branch analysis from position: 209
filename:       /in/MY4uL
function name:  (null)
number of ops:  210
compiled vars:  !0 = $email_to, !1 = $email_subject, !2 = $interest, !3 = $title, !4 = $name, !5 = $houseno, !6 = $postcode, !7 = $telephone, !8 = $email, !9 = $rating, !10 = $calculate, !11 = $pref, !12 = $error_message, !13 = $email_exp, !14 = $email_from, !15 = $string_exp, !16 = $string_var, !17 = $email_message, !18 = $headers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_IS                                         ~19     '_POST'
          1        ISSET_ISEMPTY_DIM_OBJ                         0          ~19, 'email'
          2      > JMPZ                                                     ~20, ->209
    5     3    >   ASSIGN                                                   !0, 'info%40integralbuildingsolutions.com'
    6     4        ASSIGN                                                   !1, 'Paid+Boiler+Prospect'
   20     5        FETCH_IS                                         ~23     '_POST'
          6        ISSET_ISEMPTY_DIM_OBJ                         0  ~24     ~23, 'interest'
          7        BOOL_NOT                                         ~25     ~24
          8      > JMPNZ_EX                                         ~25     ~25, ->13
   21     9    >   FETCH_IS                                         ~26     '_POST'
         10        ISSET_ISEMPTY_DIM_OBJ                         0  ~27     ~26, 'title'
         11        BOOL_NOT                                         ~28     ~27
         12        BOOL                                             ~25     ~28
         13    > > JMPNZ_EX                                         ~25     ~25, ->18
   22    14    >   FETCH_IS                                         ~29     '_POST'
         15        ISSET_ISEMPTY_DIM_OBJ                         0  ~30     ~29, 'name'
         16        BOOL_NOT                                         ~31     ~30
         17        BOOL                                             ~25     ~31
         18    > > JMPNZ_EX                                         ~25     ~25, ->23
   23    19    >   FETCH_IS                                         ~32     '_POST'
         20        ISSET_ISEMPTY_DIM_OBJ                         0  ~33     ~32, 'houseno'
         21        BOOL_NOT                                         ~34     ~33
         22        BOOL                                             ~25     ~34
         23    > > JMPNZ_EX                                         ~25     ~25, ->28
   24    24    >   FETCH_IS                                         ~35     '_POST'
         25        ISSET_ISEMPTY_DIM_OBJ                         0  ~36     ~35, 'postcode'
         26        BOOL_NOT                                         ~37     ~36
         27        BOOL                                             ~25     ~37
         28    > > JMPNZ_EX                                         ~25     ~25, ->33
   25    29    >   FETCH_IS                                         ~38     '_POST'
         30        ISSET_ISEMPTY_DIM_OBJ                         0  ~39     ~38, 'telephone'
         31        BOOL_NOT                                         ~40     ~39
         32        BOOL                                             ~25     ~40
         33    > > JMPNZ_EX                                         ~25     ~25, ->38
   26    34    >   FETCH_IS                                         ~41     '_POST'
         35        ISSET_ISEMPTY_DIM_OBJ                         0  ~42     ~41, 'email'
         36        BOOL_NOT                                         ~43     ~42
         37        BOOL                                             ~25     ~43
         38    > > JMPNZ_EX                                         ~25     ~25, ->43
   27    39    >   FETCH_IS                                         ~44     '_POST'
         40        ISSET_ISEMPTY_DIM_OBJ                         0  ~45     ~44, 'rating'
         41        BOOL_NOT                                         ~46     ~45
         42        BOOL                                             ~25     ~46
         43    > > JMPNZ_EX                                         ~25     ~25, ->48
   28    44    >   FETCH_IS                                         ~47     '_POST'
         45        ISSET_ISEMPTY_DIM_OBJ                         0  ~48     ~47, 'calculate'
         46        BOOL_NOT                                         ~49     ~48
         47        BOOL                                             ~25     ~49
         48    > > JMPNZ_EX                                         ~25     ~25, ->53
   29    49    >   FETCH_IS                                         ~50     '_POST'
         50        ISSET_ISEMPTY_DIM_OBJ                         0  ~51     ~50, 'pref'
         51        BOOL_NOT                                         ~52     ~51
         52        BOOL                                             ~25     ~52
         53    > > JMPZ                                                     ~25, ->57
   31    54    >   FETCH_R                      global              ~53     '_POST'
         55        FETCH_DIM_R                                      ~54     ~53, 'interest'
         56        ASSIGN                                                   !2, ~54
   32    57    >   FETCH_R                      global              ~56     '_POST'
         58        FETCH_DIM_R                                      ~57     ~56, 'title'
         59        ASSIGN                                                   !3, ~57
   33    60        FETCH_R                      global              ~59     '_POST'
         61        FETCH_DIM_R                                      ~60     ~59, 'name'
         62        ASSIGN                                                   !4, ~60
   34    63        FETCH_R                      global              ~62     '_POST'
         64        FETCH_DIM_R                                      ~63     ~62, 'houseno'
         65        ASSIGN                                                   !5, ~63
   35    66        FETCH_R                      global              ~65     '_POST'
         67        FETCH_DIM_R                                      ~66     ~65, 'postcode'
         68        ASSIGN                                                   !6, ~66
   36    69        FETCH_R                      global              ~68     '_POST'
         70        FETCH_DIM_R                                      ~69     ~68, 'telephone'
         71        ASSIGN                                                   !7, ~69
   37    72        FETCH_R                      global              ~71     '_POST'
         73        FETCH_DIM_R                                      ~72     ~71, 'email'
         74        ASSIGN                                                   !8, ~72
   38    75        FETCH_R                      global              ~74     '_POST'
         76        FETCH_DIM_R                                      ~75     ~74, 'rating'
         77        ASSIGN                                                   !9, ~75
   39    78        FETCH_R                      global              ~77     '_POST'
         79        FETCH_DIM_R                                      ~78     ~77, 'calculate'
         80        ASSIGN                                                   !10, ~78
   40    81        FETCH_R                      global              ~80     '_POST'
         82        FETCH_DIM_R                                      ~81     ~80, 'pref'
         83        ASSIGN                                                   !11, ~81
   42    84        ASSIGN                                                   !12, ''
   43    85        ASSIGN                                                   !13, '%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'
   44    86        INIT_FCALL                                               'preg_match'
         87        SEND_VAR                                                 !13
         88        SEND_VAR                                                 !14
         89        DO_ICALL                                         $85     
         90        BOOL_NOT                                         ~86     $85
         91      > JMPZ                                                     ~86, ->93
   45    92    >   ASSIGN_OP                                     8          !12, 'The+Email+Address+you+entered+does+not+appear+to+be+valid.%3Cbr+%2F%3E'
   47    93    >   ASSIGN                                                   !15, '%2F%5E%5BA-Za-z+.%27-%5D%2B%24%2F'
   48    94        INIT_FCALL                                               'preg_match'
         95        SEND_VAR                                                 !15
         96        DO_ICALL                                         $89     
         97        BOOL_NOT                                         ~90     $89
         98      > JMPZ                                                     ~90, ->100
   49    99    >   ASSIGN_OP                                     8          !12, 'The+Name+you+entered+does+not+appear+to+be+valid.%3Cbr+%2F%3E'
   51   100    >   ASSIGN                                                   !15, '%2F%5E%5BA-Za-z+.%27-%5D%2B%24%2F'
   52   101        INIT_FCALL                                               'preg_match'
        102        SEND_VAR                                                 !15
        103        SEND_VAR                                                 !4
        104        SEND_REF                                                 !2
        105        SEND_VAR                                                 !3
        106        DO_ICALL                                         $93     
        107        BOOL_NOT                                         ~94     $93
        108      > JMPZ                                                     ~94, ->110
   53   109    >   ASSIGN_OP                                     8          !12, 'The+Name+you+entered+does+not+appear+to+be+valid.%3Cbr+%2F%3E'
   55   110    >   ASSIGN                                                   !16, '%2F%5E%5BA-Za-z+.%27-%5D%2B%24%2F'
   56   111        INIT_FCALL                                               'preg_match'
        112        SEND_VAR                                                 !15
        113        SEND_VAR                                                 !2
        114        DO_ICALL                                         $97     
        115        BOOL_NOT                                         ~98     $97
        116      > JMPZ                                                     ~98, ->118
   57   117    >   ASSIGN_OP                                     8          !12, 'The+Name+you+entered+does+not+appear+to+be+valid.%3Cbr+%2F%3E'
   59   118    >   STRLEN                                           ~100    !5
        119        IS_SMALLER                                               ~100, 1
        120      > JMPZ                                                     ~101, ->122
   60   121    >   ASSIGN_OP                                     8          !12, 'The+house+number+you+entered+does+not+appear+to+be+valid.%3Cbr+%2F%3E'
   62   122    >   STRLEN                                           ~103    !7
        123        IS_SMALLER                                               ~103, 2
        124      > JMPZ                                                     ~104, ->126
   63   125    >   ASSIGN_OP                                     8          !12, 'The+telephone+you+entered+do+not+appear+to+be+valid.%3Cbr+%2F%3E'
   74   126    >   ASSIGN                                                   !17, 'Form+details+below.%0A%0A'
   76   127        DECLARE_FUNCTION                                         'clean_string'
   81   128        INIT_FCALL_BY_NAME                                       'clean_string'
        129        SEND_VAR_EX                                              !2
        130        DO_FCALL                                      0  $107    
        131        CONCAT                                           ~108    'Details%3A+', $107
        132        CONCAT                                           ~109    ~108, '%0A'
        133        ASSIGN_OP                                     8          !17, ~109
   82   134        INIT_FCALL_BY_NAME                                       'clean_string'
        135        SEND_VAR_EX                                              !3
        136        DO_FCALL                                      0  $111    
        137        CONCAT                                           ~112    'Title%3A+', $111
        138        CONCAT                                           ~113    ~112, '%0A'
        139        ASSIGN_OP                                     8          !17, ~113
   83   140        INIT_FCALL_BY_NAME                                       'clean_string'
        141        SEND_VAR_EX                                              !4
        142        DO_FCALL                                      0  $115    
        143        CONCAT                                           ~116    'Name%3A+', $115
        144        CONCAT                                           ~117    ~116, '%0A'
        145        ASSIGN_OP                                     8          !17, ~117
   84   146        INIT_FCALL_BY_NAME                                       'clean_string'
        147        SEND_VAR_EX                                              !5
        148        DO_FCALL                                      0  $119    
        149        CONCAT                                           ~120    'Houseno%3A+', $119
        150        CONCAT                                           ~121    ~120, '%0A'
        151        ASSIGN_OP                                     8          !17, ~121
   85   152        INIT_FCALL_BY_NAME                                       'clean_string'
        153        SEND_VAR_EX                                              !6
        154        DO_FCALL                                      0  $123    
        155        CONCAT                                           ~124    'Postcode%3A+', $123
        156        CONCAT                                           ~125    ~124, '%0A'
        157        ASSIGN_OP                                     8          !17, ~125
   86   158        INIT_FCALL_BY_NAME                                       'clean_string'
        159        SEND_VAR_EX                                              !7
        160        DO_FCALL                                      0  $127    
        161        CONCAT                                           ~128    'Tel+No%3A+', $127
        162        CONCAT                                           ~129    ~128, '%0A'
        163        ASSIGN_OP                                     8          !17, ~129
   87   164        INIT_FCALL_BY_NAME                                       'clean_string'
        165        SEND_VAR_EX                                              !8
        166        DO_FCALL                                      0  $131    
        167        CONCAT                                           ~132    'Email%3A+', $131
        168        CONCAT                                           ~133    ~132, '%0A'
        169        ASSIGN_OP                                     8          !17, ~133
   88   170        INIT_FCALL_BY_NAME                                       'clean_string'
        171        SEND_VAR_EX                                              !9
        172        DO_FCALL                                      0  $135    
        173        CONCAT                                           ~136    'Energy+rating%3A+', $135
        174        CONCAT                                           ~137    ~136, '%0A'
        175        ASSIGN_OP                                     8          !17, ~137
   89   176        INIT_FCALL_BY_NAME                                       'clean_string'
        177        SEND_VAR_EX                                              !10
        178        DO_FCALL                                      0  $139    
        179        CONCAT                                           ~140    'Shall+We+Calculate%3A+', $139
        180        CONCAT                                           ~141    ~140, '%0A'
        181        ASSIGN_OP                                     8          !17, ~141
   90   182        INIT_FCALL_BY_NAME                                       'clean_string'
        183        SEND_VAR_EX                                              !11
        184        DO_FCALL                                      0  $143    
        185        CONCAT                                           ~144    'Boiler+Preference%3A+', $143
        186        CONCAT                                           ~145    ~144, '%0A'
        187        ASSIGN_OP                                     8          !17, ~145
   95   188        CONCAT                                           ~147    'From%3A+', !14
        189        CONCAT                                           ~148    ~147, '%0D%0A'
   96   190        CONCAT                                           ~149    ~148, 'Reply-To%3A+'
        191        CONCAT                                           ~150    ~149, !14
        192        CONCAT                                           ~151    ~150, '%0D%0A'
   97   193        CONCAT                                           ~152    ~151, 'X-Mailer%3A+PHP%2F'
        194        INIT_FCALL                                               'phpversion'
        195        DO_ICALL                                         $153    
        196        CONCAT                                           ~154    ~152, $153
   95   197        ASSIGN                                                   !18, ~154
   98   198        BEGIN_SILENCE                                    ~156    
        199        INIT_FCALL                                               'mail'
        200        SEND_VAR                                                 !0
        201        SEND_VAR                                                 !1
        202        SEND_VAR                                                 !17
        203        SEND_VAR                                                 !18
        204        DO_ICALL                                                 
        205        END_SILENCE                                              ~156
  103   206        INIT_FCALL                                               'header'
        207        SEND_VAL                                                 'Location%3A+http%3A%2F%2Fwww.solarkinguk.com%2Fboiler-thank-you'
        208        DO_ICALL                                                 
  106   209    > > RETURN                                                   1

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

End of function %00clean_string%2Fin%2FMY4uL%3A76%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.72 ms | 1416 KiB | 23 Q