3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head><title>Process</title></head> <body> <?php $error = ""; //check is field left empty //process registrarion form //checks that the form was actually submitted if($_POST['sub']) //submit button sub { //validation (server side) if ($_POST['name'] == "") //name = "name" $error .="Full name not entered <br />"; if(!isset($_POST['agree'])) //agree for TOS at form.php $error .="You must agree to the TOS"; if(!preg_match("/^\d{3}\.\d{3}\.\d{4}$/",$_POST['phone'])) $error .= "Invalid Phone Number"; //check if errors were found if($error !="") echo "<div style ='color:red;'>$error</div>"; } ?> </body> <html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 30
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 30
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
Branch analysis from position: 24
Branch analysis from position: 15
Branch analysis from position: 10
Branch analysis from position: 30
filename:       /in/LGYvB
function name:  (null)
number of ops:  32
compiled vars:  !0 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Chtml%3E%0A%09%3Chead%3E%3Ctitle%3EProcess%3C%2Ftitle%3E%3C%2Fhead%3E%0A%09%3Cbody%3E%0A%0A%09'
    7     1        ASSIGN                                                   !0, ''
   12     2        FETCH_R                      global              ~2      '_POST'
          3        FETCH_DIM_R                                      ~3      ~2, 'sub'
          4      > JMPZ                                                     ~3, ->30
   15     5    >   FETCH_R                      global              ~4      '_POST'
          6        FETCH_DIM_R                                      ~5      ~4, 'name'
          7        IS_EQUAL                                                 ~5, ''
          8      > JMPZ                                                     ~6, ->10
   16     9    >   ASSIGN_OP                                     8          !0, 'Full+name+not+entered+%3Cbr+%2F%3E'
   19    10    >   FETCH_IS                                         ~8      '_POST'
         11        ISSET_ISEMPTY_DIM_OBJ                         0  ~9      ~8, 'agree'
         12        BOOL_NOT                                         ~10     ~9
         13      > JMPZ                                                     ~10, ->15
   20    14    >   ASSIGN_OP                                     8          !0, 'You+must+agree+to+the+TOS'
   22    15    >   INIT_FCALL                                               'preg_match'
         16        SEND_VAL                                                 '%2F%5E%5Cd%7B3%7D%5C.%5Cd%7B3%7D%5C.%5Cd%7B4%7D%24%2F'
         17        FETCH_R                      global              ~12     '_POST'
         18        FETCH_DIM_R                                      ~13     ~12, 'phone'
         19        SEND_VAL                                                 ~13
         20        DO_ICALL                                         $14     
         21        BOOL_NOT                                         ~15     $14
         22      > JMPZ                                                     ~15, ->24
   23    23    >   ASSIGN_OP                                     8          !0, 'Invalid+Phone+Number'
   26    24    >   IS_NOT_EQUAL                                             !0, ''
         25      > JMPZ                                                     ~17, ->30
   27    26    >   ROPE_INIT                                     3  ~19     '%3Cdiv+style+%3D%27color%3Ared%3B%27%3E'
         27        ROPE_ADD                                      1  ~19     ~19, !0
         28        ROPE_END                                      2  ~18     ~19, '%3C%2Fdiv%3E'
         29        ECHO                                                     ~18
   32    30    >   ECHO                                                     '%09%0A%09%0A%09%3C%2Fbody%3E%0A%3Chtml%3E'
   35    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.39 ms | 1396 KiB | 15 Q