3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); if (!isset($_SESSION["username"]) && !isset($_SESSION["s1"]) && !isset($_SESSION["s2"])) { header("Location:input.php"); } else { ini_set('display_errors', 'On'); $greeting = "Welcome " .$_SESSION["username"]. ", let's string your strings " .$_SESSION["s1"]. " and " .$_SESSION["s2"]. "!"; if (!isset($_GET["conxy"])) { $conxvar = ""; // function to conx+y with GET and append parameter to URL } else { $conxvar = "The strings x+y have been concatenated: ". $_SESSION["s1"].$_SESSION["s2"]; echo $conxvar; } if (!isset($_GET["conyx"])) { $conyvar = ""; // function to conx+y with GET and append parameter to URL } else { $conyvar = "The strings y+x have been concatenated: ". $_SESSION["s2"].$_SESSION["s1"]; echo $conyvar; } if (!isset($_GET["conyx"])) { $subvar = ""; // function to check substring with GET and append parameter to URL } else { $compareX = strpos($_SESSION["s2"], $_SESSION["s1"]); $compareY = strpos($_SESSION["s1"], $_SESSION["s2"]); if ($compareX !== false) { $subvar = "String ".$_SESSION["s1"]. " is a substring of " .$_SESSION["s2"]; } else { $subvar = "String ".$_SESSION["s1"]. " is NOT a substring of " .$_SESSION["s2"]; } if ($compareY !== false) { $subvar += " and string ".$_SESSION['s2']. " is a substring of " .$_SESSION['s1']; } else { $subvar += " and string ".$_SESSION['s2']. " is NOT a substring of " .$_SESSION['s1']; } echo $subvar; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 128
Branch analysis from position: 128
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 43
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
2 jumps found. (Code = 43) Position 1 = 55, Position 2 = 57
Branch analysis from position: 55
1 jumps found. (Code = 42) Position 1 = 65
Branch analysis from position: 65
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 71
Branch analysis from position: 69
1 jumps found. (Code = 42) Position 1 = 128
Branch analysis from position: 128
Branch analysis from position: 71
2 jumps found. (Code = 43) Position 1 = 91, Position 2 = 100
Branch analysis from position: 91
1 jumps found. (Code = 42) Position 1 = 108
Branch analysis from position: 108
2 jumps found. (Code = 43) Position 1 = 110, Position 2 = 119
Branch analysis from position: 110
1 jumps found. (Code = 42) Position 1 = 127
Branch analysis from position: 127
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 119
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 100
2 jumps found. (Code = 43) Position 1 = 110, Position 2 = 119
Branch analysis from position: 110
Branch analysis from position: 119
Branch analysis from position: 57
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 71
Branch analysis from position: 69
Branch analysis from position: 71
Branch analysis from position: 43
2 jumps found. (Code = 43) Position 1 = 55, Position 2 = 57
Branch analysis from position: 55
Branch analysis from position: 57
Branch analysis from position: 15
Branch analysis from position: 10
filename:       /in/r9lsl
function name:  (null)
number of ops:  129
compiled vars:  !0 = $greeting, !1 = $conxvar, !2 = $conyvar, !3 = $subvar, !4 = $compareX, !5 = $compareY
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                                 
    6     2        FETCH_IS                                         ~7      '_SESSION'
          3        ISSET_ISEMPTY_DIM_OBJ                         0  ~8      ~7, 'username'
          4        BOOL_NOT                                         ~9      ~8
          5      > JMPZ_EX                                          ~9      ~9, ->10
          6    >   FETCH_IS                                         ~10     '_SESSION'
          7        ISSET_ISEMPTY_DIM_OBJ                         0  ~11     ~10, 's1'
          8        BOOL_NOT                                         ~12     ~11
          9        BOOL                                             ~9      ~12
         10    > > JMPZ_EX                                          ~9      ~9, ->15
         11    >   FETCH_IS                                         ~13     '_SESSION'
         12        ISSET_ISEMPTY_DIM_OBJ                         0  ~14     ~13, 's2'
         13        BOOL_NOT                                         ~15     ~14
         14        BOOL                                             ~9      ~15
         15    > > JMPZ                                                     ~9, ->20
    7    16    >   INIT_FCALL                                               'header'
         17        SEND_VAL                                                 'Location%3Ainput.php'
         18        DO_ICALL                                                 
    6    19      > JMP                                                      ->128
   10    20    >   INIT_FCALL                                               'ini_set'
         21        SEND_VAL                                                 'display_errors'
         22        SEND_VAL                                                 'On'
         23        DO_ICALL                                                 
   11    24        FETCH_R                      global              ~18     '_SESSION'
         25        FETCH_DIM_R                                      ~19     ~18, 'username'
         26        CONCAT                                           ~20     'Welcome+', ~19
         27        CONCAT                                           ~21     ~20, '%2C+let%27s+string+your+strings+'
         28        FETCH_R                      global              ~22     '_SESSION'
         29        FETCH_DIM_R                                      ~23     ~22, 's1'
         30        CONCAT                                           ~24     ~21, ~23
         31        CONCAT                                           ~25     ~24, '+and+'
         32        FETCH_R                      global              ~26     '_SESSION'
         33        FETCH_DIM_R                                      ~27     ~26, 's2'
         34        CONCAT                                           ~28     ~25, ~27
         35        CONCAT                                           ~29     ~28, '%21'
         36        ASSIGN                                                   !0, ~29
   14    37        FETCH_IS                                         ~31     '_GET'
         38        ISSET_ISEMPTY_DIM_OBJ                         0  ~32     ~31, 'conxy'
         39        BOOL_NOT                                         ~33     ~32
         40      > JMPZ                                                     ~33, ->43
   15    41    >   ASSIGN                                                   !1, ''
   14    42      > JMP                                                      ->51
   22    43    >   FETCH_R                      global              ~35     '_SESSION'
         44        FETCH_DIM_R                                      ~36     ~35, 's1'
         45        CONCAT                                           ~37     'The+strings+x%2By+have+been+concatenated%3A+', ~36
         46        FETCH_R                      global              ~38     '_SESSION'
         47        FETCH_DIM_R                                      ~39     ~38, 's2'
         48        CONCAT                                           ~40     ~37, ~39
         49        ASSIGN                                                   !1, ~40
   23    50        ECHO                                                     !1
   26    51    >   FETCH_IS                                         ~42     '_GET'
         52        ISSET_ISEMPTY_DIM_OBJ                         0  ~43     ~42, 'conyx'
         53        BOOL_NOT                                         ~44     ~43
         54      > JMPZ                                                     ~44, ->57
   27    55    >   ASSIGN                                                   !2, ''
   26    56      > JMP                                                      ->65
   33    57    >   FETCH_R                      global              ~46     '_SESSION'
         58        FETCH_DIM_R                                      ~47     ~46, 's2'
         59        CONCAT                                           ~48     'The+strings+y%2Bx+have+been+concatenated%3A+', ~47
         60        FETCH_R                      global              ~49     '_SESSION'
         61        FETCH_DIM_R                                      ~50     ~49, 's1'
         62        CONCAT                                           ~51     ~48, ~50
         63        ASSIGN                                                   !2, ~51
   34    64        ECHO                                                     !2
   38    65    >   FETCH_IS                                         ~53     '_GET'
         66        ISSET_ISEMPTY_DIM_OBJ                         0  ~54     ~53, 'conyx'
         67        BOOL_NOT                                         ~55     ~54
         68      > JMPZ                                                     ~55, ->71
   39    69    >   ASSIGN                                                   !3, ''
   38    70      > JMP                                                      ->128
   45    71    >   INIT_FCALL                                               'strpos'
         72        FETCH_R                      global              ~57     '_SESSION'
         73        FETCH_DIM_R                                      ~58     ~57, 's2'
         74        SEND_VAL                                                 ~58
         75        FETCH_R                      global              ~59     '_SESSION'
         76        FETCH_DIM_R                                      ~60     ~59, 's1'
         77        SEND_VAL                                                 ~60
         78        DO_ICALL                                         $61     
         79        ASSIGN                                                   !4, $61
   46    80        INIT_FCALL                                               'strpos'
         81        FETCH_R                      global              ~63     '_SESSION'
         82        FETCH_DIM_R                                      ~64     ~63, 's1'
         83        SEND_VAL                                                 ~64
         84        FETCH_R                      global              ~65     '_SESSION'
         85        FETCH_DIM_R                                      ~66     ~65, 's2'
         86        SEND_VAL                                                 ~66
         87        DO_ICALL                                         $67     
         88        ASSIGN                                                   !5, $67
   48    89        TYPE_CHECK                                  1018          !4
         90      > JMPZ                                                     ~69, ->100
   50    91    >   FETCH_R                      global              ~70     '_SESSION'
         92        FETCH_DIM_R                                      ~71     ~70, 's1'
         93        CONCAT                                           ~72     'String+', ~71
         94        CONCAT                                           ~73     ~72, '+is+a+substring+of+'
         95        FETCH_R                      global              ~74     '_SESSION'
         96        FETCH_DIM_R                                      ~75     ~74, 's2'
         97        CONCAT                                           ~76     ~73, ~75
         98        ASSIGN                                                   !3, ~76
   48    99      > JMP                                                      ->108
   52   100    >   FETCH_R                      global              ~78     '_SESSION'
        101        FETCH_DIM_R                                      ~79     ~78, 's1'
        102        CONCAT                                           ~80     'String+', ~79
        103        CONCAT                                           ~81     ~80, '+is+NOT+a+substring+of+'
        104        FETCH_R                      global              ~82     '_SESSION'
        105        FETCH_DIM_R                                      ~83     ~82, 's2'
        106        CONCAT                                           ~84     ~81, ~83
        107        ASSIGN                                                   !3, ~84
   54   108    >   TYPE_CHECK                                  1018          !5
        109      > JMPZ                                                     ~86, ->119
   56   110    >   FETCH_R                      global              ~87     '_SESSION'
        111        FETCH_DIM_R                                      ~88     ~87, 's2'
        112        CONCAT                                           ~89     '+and+string+', ~88
        113        CONCAT                                           ~90     ~89, '+is+a+substring+of+'
        114        FETCH_R                      global              ~91     '_SESSION'
        115        FETCH_DIM_R                                      ~92     ~91, 's1'
        116        CONCAT                                           ~93     ~90, ~92
        117        ASSIGN_OP                                     1          !3, ~93
   54   118      > JMP                                                      ->127
   58   119    >   FETCH_R                      global              ~95     '_SESSION'
        120        FETCH_DIM_R                                      ~96     ~95, 's2'
        121        CONCAT                                           ~97     '+and+string+', ~96
        122        CONCAT                                           ~98     ~97, '+is+NOT+a+substring+of+'
        123        FETCH_R                      global              ~99     '_SESSION'
        124        FETCH_DIM_R                                      ~100    ~99, 's1'
        125        CONCAT                                           ~101    ~98, ~100
        126        ASSIGN_OP                                     1          !3, ~101
   60   127    >   ECHO                                                     !3
   62   128    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.2 ms | 1475 KiB | 17 Q