3v4l.org

run code in 300+ PHP versions simultaneously
<?php function orders_insert(){ $recID=mysql_insert_id(); sql("insert into membership_userrecords set tableName='orders', pkValue='$recID', memberID='".getLoggedMemberID()."', dateAdded='".time()."', dateUpdated='".time()."', groupID='".getLoggedGroupID()."'", $eo); // our modified code for sending the email notification $userEmail=sqlValue("select email from membership_users where memberID='".getLoggedMemberID()."'"); mail( to, subject,message,header); /* comma-separated list of recipients */ $to = "Anil.Rawat@turner.com, Amit.Saxena@turner.com, Uday.Sativa@turner.com, $userEmail"; /* message subject */ $subject = "SDR update"; /* message contents */ $message = "SDR has been created/updated by ".getLoggedMemberID(); ".\n\n". /* we must add sender email similar to this */ $header = "From: michael.acheampong@turner.com"; return (get_magic_quotes_gpc() ? stripslashes($recID) : $recID); } if (mail($to,$subject,$body)){ echo ("<p>Email successfully sent!</p>"); } else{ echo("<p>Email delivery failed</p>"); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s9idv
function name:  (null)
number of ops:  10
compiled vars:  !0 = $to, !1 = $subject, !2 = $body
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   INIT_FCALL                                               'mail'
          1        SEND_VAR                                                 !0
          2        SEND_VAR                                                 !1
          3        SEND_VAR                                                 !2
          4        DO_ICALL                                         $3      
          5      > JMPZ                                                     $3, ->8
   29     6    >   ECHO                                                     '%3Cp%3EEmail+successfully+sent%21%3C%2Fp%3E'
   28     7      > JMP                                                      ->9
   31     8    >   ECHO                                                     '%3Cp%3EEmail+delivery+failed%3C%2Fp%3E'
   34     9    > > RETURN                                                   1

Function orders_insert:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 58, Position 2 = 63
Branch analysis from position: 58
1 jumps found. (Code = 42) Position 1 = 64
Branch analysis from position: 64
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 63
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s9idv
function name:  orders_insert
number of ops:  66
compiled vars:  !0 = $recID, !1 = $eo, !2 = $userEmail, !3 = $to, !4 = $subject, !5 = $message, !6 = $header
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL_BY_NAME                                       'mysql_insert_id'
          1        DO_FCALL                                      0  $7      
          2        ASSIGN                                                   !0, $7
    6     3        INIT_FCALL_BY_NAME                                       'sql'
          4        ROPE_INIT                                     3  ~10     'insert+into+membership_userrecords+set+tableName%3D%27orders%27%2C+pkValue%3D%27'
          5        ROPE_ADD                                      1  ~10     ~10, !0
          6        ROPE_END                                      2  ~9      ~10, '%27%2C+memberID%3D%27'
          7        INIT_FCALL_BY_NAME                                       'getLoggedMemberID'
          8        DO_FCALL                                      0  $12     
          9        CONCAT                                           ~13     ~9, $12
         10        CONCAT                                           ~14     ~13, '%27%2C+dateAdded%3D%27'
         11        INIT_FCALL                                               'time'
         12        DO_ICALL                                         $15     
         13        CONCAT                                           ~16     ~14, $15
         14        CONCAT                                           ~17     ~16, '%27%2C+dateUpdated%3D%27'
         15        INIT_FCALL                                               'time'
         16        DO_ICALL                                         $18     
         17        CONCAT                                           ~19     ~17, $18
         18        CONCAT                                           ~20     ~19, '%27%2C+groupID%3D%27'
         19        INIT_FCALL_BY_NAME                                       'getLoggedGroupID'
         20        DO_FCALL                                      0  $21     
         21        CONCAT                                           ~22     ~20, $21
         22        CONCAT                                           ~23     ~22, '%27'
         23        SEND_VAL_EX                                              ~23
         24        SEND_VAR_EX                                              !1
         25        DO_FCALL                                      0          
    9    26        INIT_FCALL_BY_NAME                                       'sqlValue'
         27        INIT_FCALL_BY_NAME                                       'getLoggedMemberID'
         28        DO_FCALL                                      0  $25     
         29        CONCAT                                           ~26     'select+email+from+membership_users+where+memberID%3D%27', $25
         30        CONCAT                                           ~27     ~26, '%27'
         31        SEND_VAL_EX                                              ~27
         32        DO_FCALL                                      0  $28     
         33        ASSIGN                                                   !2, $28
   11    34        INIT_FCALL                                               'mail'
         35        FETCH_CONSTANT                                   ~30     'to'
         36        SEND_VAL                                                 ~30
         37        FETCH_CONSTANT                                   ~31     'subject'
         38        SEND_VAL                                                 ~31
         39        FETCH_CONSTANT                                   ~32     'message'
         40        SEND_VAL                                                 ~32
         41        FETCH_CONSTANT                                   ~33     'header'
         42        SEND_VAL                                                 ~33
         43        DO_ICALL                                                 
   13    44        NOP                                                      
         45        FAST_CONCAT                                      ~35     'Anil.Rawat%40turner.com%2C+Amit.Saxena%40turner.com%2C+Uday.Sativa%40turner.com%2C+', !2
         46        ASSIGN                                                   !3, ~35
   16    47        ASSIGN                                                   !4, 'SDR+update'
   19    48        INIT_FCALL_BY_NAME                                       'getLoggedMemberID'
         49        DO_FCALL                                      0  $38     
         50        CONCAT                                           ~39     'SDR+has+been+created%2Fupdated+by+', $38
         51        ASSIGN                                                   !5, ~39
   23    52        ASSIGN                                           ~41     !6, 'From%3A+michael.acheampong%40turner.com'
         53        CONCAT                                           ~42     '.%0A%0A', ~41
         54        FREE                                                     ~42
   26    55        INIT_FCALL_BY_NAME                                       'get_magic_quotes_gpc'
         56        DO_FCALL                                      0  $43     
         57      > JMPZ                                                     $43, ->63
         58    >   INIT_FCALL                                               'stripslashes'
         59        SEND_VAR                                                 !0
         60        DO_ICALL                                         $44     
         61        QM_ASSIGN                                        ~45     $44
         62      > JMP                                                      ->64
         63    >   QM_ASSIGN                                        ~45     !0
         64    > > RETURN                                                   ~45
   27    65*     > RETURN                                                   null

End of function orders_insert

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.85 ms | 973 KiB | 16 Q