3v4l.org

run code in 300+ PHP versions simultaneously
<?php if($sweet['customer_username'] == $username){ $cust=$sweet['customer_id']; mysql_query("INSERT INTO `shipping_address`(customer_id,address_line_1,address_line_2,post_code,county) VALUES ('$cust','$adr','$adr2','$pst','$cnty')"); foreach ($_SESSION['sweet'] as $key => $val){ mysql_query("INSERT INTO `sweets_pref`(customer_id, sweet_id, preference) VALUES ('$cust','$key', '$val')") or die('unable to connect to database'); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 39
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 38
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 38
Branch analysis from position: 23
2 jumps found. (Code = 47) Position 1 = 35, Position 2 = 37
Branch analysis from position: 35
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
Branch analysis from position: 39
filename:       /in/g2HGq
function name:  (null)
number of ops:  40
compiled vars:  !0 = $sweet, !1 = $username, !2 = $cust, !3 = $adr, !4 = $adr2, !5 = $pst, !6 = $cnty, !7 = $val, !8 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_DIM_R                                      ~9      !0, 'customer_username'
          1        IS_EQUAL                                                 !1, ~9
          2      > JMPZ                                                     ~10, ->39
    4     3    >   FETCH_DIM_R                                      ~11     !0, 'customer_id'
          4        ASSIGN                                                   !2, ~11
    5     5        INIT_FCALL_BY_NAME                                       'mysql_query'
          6        ROPE_INIT                                    11  ~14     'INSERT+INTO+%60shipping_address%60%28customer_id%2Caddress_line_1%2Caddress_line_2%2Cpost_code%2Ccounty%29+VALUES+%28%27'
          7        ROPE_ADD                                      1  ~14     ~14, !2
          8        ROPE_ADD                                      2  ~14     ~14, '%27%2C%27'
          9        ROPE_ADD                                      3  ~14     ~14, !3
         10        ROPE_ADD                                      4  ~14     ~14, '%27%2C%27'
         11        ROPE_ADD                                      5  ~14     ~14, !4
         12        ROPE_ADD                                      6  ~14     ~14, '%27%2C%27'
         13        ROPE_ADD                                      7  ~14     ~14, !5
         14        ROPE_ADD                                      8  ~14     ~14, '%27%2C%27'
         15        ROPE_ADD                                      9  ~14     ~14, !6
         16        ROPE_END                                     10  ~13     ~14, '%27%29'
         17        SEND_VAL_EX                                              ~13
         18        DO_FCALL                                      0          
    6    19        FETCH_R                      global              ~21     '_SESSION'
         20        FETCH_DIM_R                                      ~22     ~21, 'sweet'
         21      > FE_RESET_R                                       $23     ~22, ->38
         22    > > FE_FETCH_R                                       ~24     $23, !7, ->38
         23    >   ASSIGN                                                   !8, ~24
    7    24        INIT_FCALL_BY_NAME                                       'mysql_query'
         25        ROPE_INIT                                     7  ~27     'INSERT+INTO+%60sweets_pref%60%28customer_id%2C+sweet_id%2C+preference%29+VALUES+%28%27'
         26        ROPE_ADD                                      1  ~27     ~27, !2
         27        ROPE_ADD                                      2  ~27     ~27, '%27%2C%27'
         28        ROPE_ADD                                      3  ~27     ~27, !8
         29        ROPE_ADD                                      4  ~27     ~27, '%27%2C+%27'
         30        ROPE_ADD                                      5  ~27     ~27, !7
         31        ROPE_END                                      6  ~26     ~27, '%27%29'
         32        SEND_VAL_EX                                              ~26
         33        DO_FCALL                                      0  $31     
         34      > JMPNZ_EX                                         ~32     $31, ->37
         35    > > EXIT                                                     'unable+to+connect+to+database'
         36*       BOOL                                             ~32     <true>
    6    37    > > JMP                                                      ->22
         38    >   FE_FREE                                                  $23
    9    39    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.4 ms | 1399 KiB | 13 Q