3v4l.org

run code in 300+ PHP versions simultaneously
<?php include "config.php"; if(empty($_REQUEST["action"])) $template->display("join.html"); else { $username=$_REQUEST["username"]; $password=$_REQUEST["password"]; $email=$_REQUEST["email"]; $sponsor = @$_COOKIE["sponsor_id"]; if (!preg_match("^[a-zA-Z0-9.-_]+\@[a-zA-Z0-9.-_]\+.[a-zA-Z0-9.-_]+$",$email)); die ("Not a valid email format!"); if (!preg_match("^[A-Za-z0-9_]+$",$username)); die ("Username contains an unallowed characters"); $num=mysql_num_rows(mysql_query("select id from members where username ='$username'")); if ($num>0) die ("Username already taken"); $template->assign("custom_key",NEW_MEMBER . "|$username|$password|$email|$sponsor"); $template->assign("username",$username); $template->assign(array("aftersignup"=>$aftersignup, "cancel_page"=>$cancel_page)); $template->display("order.html"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 75
Branch analysis from position: 75
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 28
Branch analysis from position: 28
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 28
filename:       /in/C5KPG
function name:  (null)
number of ops:  76
compiled vars:  !0 = $template, !1 = $username, !2 = $password, !3 = $email, !4 = $sponsor, !5 = $num, !6 = $aftersignup, !7 = $cancel_page
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INCLUDE_OR_EVAL                                          'config.php', INCLUDE
    3     1        FETCH_IS                                         ~9      '_REQUEST'
          2        ISSET_ISEMPTY_DIM_OBJ                         1          ~9, 'action'
          3      > JMPZ                                                     ~10, ->8
    4     4    >   INIT_METHOD_CALL                                         !0, 'display'
          5        SEND_VAL_EX                                              'join.html'
          6        DO_FCALL                                      0          
          7      > JMP                                                      ->75
    7     8    >   FETCH_R                      global              ~12     '_REQUEST'
          9        FETCH_DIM_R                                      ~13     ~12, 'username'
         10        ASSIGN                                                   !1, ~13
    8    11        FETCH_R                      global              ~15     '_REQUEST'
         12        FETCH_DIM_R                                      ~16     ~15, 'password'
         13        ASSIGN                                                   !2, ~16
    9    14        FETCH_R                      global              ~18     '_REQUEST'
         15        FETCH_DIM_R                                      ~19     ~18, 'email'
         16        ASSIGN                                                   !3, ~19
   10    17        BEGIN_SILENCE                                    ~21     
         18        FETCH_R                      global              ~22     '_COOKIE'
         19        FETCH_DIM_R                                      ~23     ~22, 'sponsor_id'
         20        END_SILENCE                                              ~21
         21        ASSIGN                                                   !4, ~23
   11    22        INIT_FCALL                                               'preg_match'
         23        SEND_VAL                                                 '%5E%5Ba-zA-Z0-9.-_%5D%2B%5C%40%5Ba-zA-Z0-9.-_%5D%5C%2B.%5Ba-zA-Z0-9.-_%5D%2B%24'
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                         $25     
         26        BOOL_NOT                                         ~26     $25
         27      > JMPZ                                                     ~26, ->28
   12    28    > > EXIT                                                     'Not+a+valid+email+format%21'
   13    29*       INIT_FCALL                                               'preg_match'
         30*       SEND_VAL                                                 '%5E%5BA-Za-z0-9_%5D%2B%24'
         31*       SEND_VAR                                                 !1
         32*       DO_ICALL                                         $27     
         33*       BOOL_NOT                                         ~28     $27
         34*       JMPZ                                                     ~28, ->35
   14    35*       EXIT                                                     'Username+contains+an+unallowed+characters'
   15    36*       INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         37*       INIT_FCALL_BY_NAME                                       'mysql_query'
         38*       ROPE_INIT                                     3  ~30     'select+id+from+members+where+username+%3D%27'
         39*       ROPE_ADD                                      1  ~30     ~30, !1
         40*       ROPE_END                                      2  ~29     ~30, '%27'
         41*       SEND_VAL_EX                                              ~29
         42*       DO_FCALL                                      0  $32     
         43*       SEND_VAR_NO_REF_EX                                       $32
         44*       DO_FCALL                                      0  $33     
         45*       ASSIGN                                                   !5, $33
   16    46*       IS_SMALLER                                               0, !5
         47*       JMPZ                                                     ~35, ->49
   17    48*       EXIT                                                     'Username+already+taken'
   18    49*       INIT_METHOD_CALL                                         !0, 'assign'
         50*       SEND_VAL_EX                                              'custom_key'
         51*       FETCH_CONSTANT                                   ~36     'NEW_MEMBER'
         52*       ROPE_INIT                                     8  ~38     '%7C'
         53*       ROPE_ADD                                      1  ~38     ~38, !1
         54*       ROPE_ADD                                      2  ~38     ~38, '%7C'
         55*       ROPE_ADD                                      3  ~38     ~38, !2
         56*       ROPE_ADD                                      4  ~38     ~38, '%7C'
         57*       ROPE_ADD                                      5  ~38     ~38, !3
         58*       ROPE_ADD                                      6  ~38     ~38, '%7C'
         59*       ROPE_END                                      7  ~37     ~38, !4
         60*       CONCAT                                           ~42     ~36, ~37
         61*       SEND_VAL_EX                                              ~42
         62*       DO_FCALL                                      0          
   19    63*       INIT_METHOD_CALL                                         !0, 'assign'
         64*       SEND_VAL_EX                                              'username'
         65*       SEND_VAR_EX                                              !1
         66*       DO_FCALL                                      0          
   20    67*       INIT_METHOD_CALL                                         !0, 'assign'
         68*       INIT_ARRAY                                       ~45     !6, 'aftersignup'
   21    69*       ADD_ARRAY_ELEMENT                                ~45     !7, 'cancel_page'
         70*       SEND_VAL_EX                                              ~45
         71*       DO_FCALL                                      0          
   22    72*       INIT_METHOD_CALL                                         !0, 'display'
         73*       SEND_VAL_EX                                              'order.html'
         74*       DO_FCALL                                      0          
   23    75    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.77 ms | 1400 KiB | 15 Q