3v4l.org

run code in 300+ PHP versions simultaneously
<?php ###################### # Minetext By Cassa_ # ###################### function minetext($text){ preg_match_all("/[^&&]*[^&&]|[&&][0-9a-z][^&&]*/", $text, $brokenupstrings); $returnstring = ""; foreach ($brokenupstrings as $results){ $ending = ''; foreach ($results as $individual){ $code = preg_split("/[&§][0-9a-z]/", $individual); preg_match("/[&§][0-9a-z]/", $individual, $prefix); if (isset($prefix[0])){ $actualcode = substr($prefix[0], 1); switch ($actualcode){ case "1": $returnstring = $returnstring.'<FONT COLOR="0000AA">'; $ending = $ending ."</FONT>"; break; case "2": $returnstring = $returnstring.'<FONT COLOR="00AA00">'; $ending =$ending ."</FONT>"; break; case "3": $returnstring = $returnstring.'<FONT COLOR="00AAAA">'; $ending = $ending ."</FONT>"; break; case "4": $returnstring = $returnstring.'<FONT COLOR="AA0000">'; $ending =$ending ."</FONT>"; break; case "5": $returnstring = $returnstring.'<FONT COLOR="AA00AA">'; $ending =$ending . "</FONT>"; break; case "6": $returnstring = $returnstring.'<FONT COLOR="FFAA00">'; $ending =$ending ."</FONT>"; break; case "7": $returnstring = $returnstring.'<FONT COLOR="AAAAAA">'; $ending = $ending ."</FONT>"; break; case "8": $returnstring = $returnstring.'<FONT COLOR="555555">'; $ending =$ending ."</FONT>"; break; case "9": $returnstring = $returnstring.'<FONT COLOR="5555FF">'; $ending =$ending . "</FONT>"; break; case "a": $returnstring = $returnstring.'<FONT COLOR="55FF55">'; $ending =$ending ."</FONT>"; break; case "b": $returnstring = $returnstring.'<FONT COLOR="55FFFF">'; $ending = $ending ."</FONT>"; break; case "c": $returnstring = $returnstring.'<FONT COLOR="FF5555">'; $ending =$ending ."</FONT>"; break; case "d": $returnstring = $returnstring.'<FONT COLOR="FF55FF">'; $ending =$ending ."</FONT>"; break; case "e": $returnstring = $returnstring.'<FONT COLOR="FFFF55">'; $ending = $ending ."</FONT>"; break; case "f": $returnstring = $returnstring.'<FONT COLOR="FFFFFF">'; $ending =$ending ."</FONT>"; break; case "l": if (strlen($individual)>2){ $returnstring = $returnstring.'<span style="font-weight:bold;">'; $ending = "</span>".$ending; break; } case "m": if (strlen($individual)>2){ $returnstring = $returnstring.'<strike>'; $ending = "</strike>".$ending; break; } case "n": if (strlen($individual)>2){ $returnstring = $returnstring.'<span style="text-decoration: underline;">'; $ending = "</span>".$ending; break; } case "o": if (strlen($individual)>2){ $returnstring = $returnstring.'<i>'; $ending ="</i>".$ending; break; } case "r": $returnstring = $returnstring.$ending; $ending = ''; break; } if (isset($code[1])){ $returnstring = $returnstring.$code[1]; if (isset($ending)&&strlen($individual)>2){ $returnstring = $returnstring.$ending; $ending = ''; } } } else{ $returnstring = $returnstring.$individual; } } } return $returnstring; } echo minetext('&4Test'); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cB4Uc
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  122     0  E >   INIT_FCALL                                               'minetext'
          1        SEND_VAL                                                 '%264Test'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
  123     4      > RETURN                                                   1

Function minetext:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 202
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 202
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 200
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 200
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 197
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 71
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 76
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 81
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 38, Position 2 = 86
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 91
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 96
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 101
Branch analysis from position: 44
2 jumps found. (Code = 44) Position 1 = 46, Position 2 = 106
Branch analysis from position: 46
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 111
Branch analysis from position: 48
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 116
Branch analysis from position: 50
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 121
Branch analysis from position: 52
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 126
Branch analysis from position: 54
2 jumps found. (Code = 44) Position 1 = 56, Position 2 = 131
Branch analysis from position: 56
2 jumps found. (Code = 44) Position 1 = 58, Position 2 = 136
Branch analysis from position: 58
2 jumps found. (Code = 44) Position 1 = 60, Position 2 = 141
Branch analysis from position: 60
2 jumps found. (Code = 44) Position 1 = 62, Position 2 = 146
Branch analysis from position: 62
2 jumps found. (Code = 44) Position 1 = 64, Position 2 = 154
Branch analysis from position: 64
2 jumps found. (Code = 44) Position 1 = 66, Position 2 = 162
Branch analysis from position: 66
2 jumps found. (Code = 44) Position 1 = 68, Position 2 = 170
Branch analysis from position: 68
2 jumps found. (Code = 44) Position 1 = 70, Position 2 = 178
Branch analysis from position: 70
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
2 jumps found. (Code = 43) Position 1 = 184, Position 2 = 196
Branch analysis from position: 184
2 jumps found. (Code = 46) Position 1 = 189, Position 2 = 192
Branch analysis from position: 189
2 jumps found. (Code = 43) Position 1 = 193, Position 2 = 196
Branch analysis from position: 193
1 jumps found. (Code = 42) Position 1 = 199
Branch analysis from position: 199
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 196
Branch analysis from position: 192
Branch analysis from position: 196
Branch analysis from position: 178
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 170
2 jumps found. (Code = 43) Position 1 = 173, Position 2 = 178
Branch analysis from position: 173
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 178
Branch analysis from position: 162
2 jumps found. (Code = 43) Position 1 = 165, Position 2 = 170
Branch analysis from position: 165
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 170
Branch analysis from position: 154
2 jumps found. (Code = 43) Position 1 = 157, Position 2 = 162
Branch analysis from position: 157
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 162
Branch analysis from position: 146
2 jumps found. (Code = 43) Position 1 = 149, Position 2 = 154
Branch analysis from position: 149
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 154
Branch analysis from position: 141
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 136
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 131
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 126
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 121
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 116
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 111
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 106
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 101
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 96
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 91
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 86
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 81
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 76
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 182
Branch analysis from position: 182
Branch analysis from position: 197
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 200
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 200
Branch analysis from position: 202
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 202
filename:       /in/cB4Uc
function name:  minetext
number of ops:  205
compiled vars:  !0 = $text, !1 = $brokenupstrings, !2 = $returnstring, !3 = $results, !4 = $ending, !5 = $individual, !6 = $code, !7 = $prefix, !8 = $actualcode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%5B%5E%26%26%5D%2A%5B%5E%26%26%5D%7C%5B%26%26%5D%5B0-9a-z%5D%5B%5E%26%26%5D%2A%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    7     6        ASSIGN                                                   !2, ''
    8     7      > FE_RESET_R                                       $11     !1, ->202
          8    > > FE_FETCH_R                                               $11, !3, ->202
    9     9    >   ASSIGN                                                   !4, ''
   10    10      > FE_RESET_R                                       $13     !3, ->200
         11    > > FE_FETCH_R                                               $13, !5, ->200
   11    12    >   INIT_FCALL                                               'preg_split'
         13        SEND_VAL                                                 '%2F%5B%26%C2%A7%5D%5B0-9a-z%5D%2F'
         14        SEND_VAR                                                 !5
         15        DO_ICALL                                         $14     
         16        ASSIGN                                                   !6, $14
   12    17        INIT_FCALL                                               'preg_match'
         18        SEND_VAL                                                 '%2F%5B%26%C2%A7%5D%5B0-9a-z%5D%2F'
         19        SEND_VAR                                                 !5
         20        SEND_REF                                                 !7
         21        DO_ICALL                                                 
   13    22        ISSET_ISEMPTY_DIM_OBJ                         0          !7, 0
         23      > JMPZ                                                     ~17, ->197
   14    24    >   INIT_FCALL                                               'substr'
         25        FETCH_DIM_R                                      ~18     !7, 0
         26        SEND_VAL                                                 ~18
         27        SEND_VAL                                                 1
         28        DO_ICALL                                         $19     
         29        ASSIGN                                                   !8, $19
   16    30        IS_EQUAL                                                 !8, '1'
         31      > JMPNZ                                                    ~21, ->71
   20    32    >   IS_EQUAL                                                 !8, '2'
         33      > JMPNZ                                                    ~21, ->76
   24    34    >   IS_EQUAL                                                 !8, '3'
         35      > JMPNZ                                                    ~21, ->81
   28    36    >   IS_EQUAL                                                 !8, '4'
         37      > JMPNZ                                                    ~21, ->86
   32    38    >   IS_EQUAL                                                 !8, '5'
         39      > JMPNZ                                                    ~21, ->91
   36    40    >   IS_EQUAL                                                 !8, '6'
         41      > JMPNZ                                                    ~21, ->96
   40    42    >   IS_EQUAL                                                 !8, '7'
         43      > JMPNZ                                                    ~21, ->101
   44    44    >   IS_EQUAL                                                 !8, '8'
         45      > JMPNZ                                                    ~21, ->106
   48    46    >   IS_EQUAL                                                 !8, '9'
         47      > JMPNZ                                                    ~21, ->111
   52    48    >   IS_EQUAL                                                 !8, 'a'
         49      > JMPNZ                                                    ~21, ->116
   56    50    >   IS_EQUAL                                                 !8, 'b'
         51      > JMPNZ                                                    ~21, ->121
   60    52    >   IS_EQUAL                                                 !8, 'c'
         53      > JMPNZ                                                    ~21, ->126
   64    54    >   IS_EQUAL                                                 !8, 'd'
         55      > JMPNZ                                                    ~21, ->131
   68    56    >   IS_EQUAL                                                 !8, 'e'
         57      > JMPNZ                                                    ~21, ->136
   72    58    >   IS_EQUAL                                                 !8, 'f'
         59      > JMPNZ                                                    ~21, ->141
   76    60    >   IS_EQUAL                                                 !8, 'l'
         61      > JMPNZ                                                    ~21, ->146
   82    62    >   IS_EQUAL                                                 !8, 'm'
         63      > JMPNZ                                                    ~21, ->154
   88    64    >   IS_EQUAL                                                 !8, 'n'
         65      > JMPNZ                                                    ~21, ->162
   94    66    >   IS_EQUAL                                                 !8, 'o'
         67      > JMPNZ                                                    ~21, ->170
  100    68    >   IS_EQUAL                                                 !8, 'r'
         69      > JMPNZ                                                    ~21, ->178
         70    > > JMP                                                      ->182
   17    71    >   CONCAT                                           ~22     !2, '%3CFONT+COLOR%3D%220000AA%22%3E'
         72        ASSIGN                                                   !2, ~22
   18    73        CONCAT                                           ~24     !4, '%3C%2FFONT%3E'
         74        ASSIGN                                                   !4, ~24
   19    75      > JMP                                                      ->182
   21    76    >   CONCAT                                           ~26     !2, '%3CFONT+COLOR%3D%2200AA00%22%3E'
         77        ASSIGN                                                   !2, ~26
   22    78        CONCAT                                           ~28     !4, '%3C%2FFONT%3E'
         79        ASSIGN                                                   !4, ~28
   23    80      > JMP                                                      ->182
   25    81    >   CONCAT                                           ~30     !2, '%3CFONT+COLOR%3D%2200AAAA%22%3E'
         82        ASSIGN                                                   !2, ~30
   26    83        CONCAT                                           ~32     !4, '%3C%2FFONT%3E'
         84        ASSIGN                                                   !4, ~32
   27    85      > JMP                                                      ->182
   29    86    >   CONCAT                                           ~34     !2, '%3CFONT+COLOR%3D%22AA0000%22%3E'
         87        ASSIGN                                                   !2, ~34
   30    88        CONCAT                                           ~36     !4, '%3C%2FFONT%3E'
         89        ASSIGN                                                   !4, ~36
   31    90      > JMP                                                      ->182
   33    91    >   CONCAT                                           ~38     !2, '%3CFONT+COLOR%3D%22AA00AA%22%3E'
         92        ASSIGN                                                   !2, ~38
   34    93        CONCAT                                           ~40     !4, '%3C%2FFONT%3E'
         94        ASSIGN                                                   !4, ~40
   35    95      > JMP                                                      ->182
   37    96    >   CONCAT                                           ~42     !2, '%3CFONT+COLOR%3D%22FFAA00%22%3E'
         97        ASSIGN                                                   !2, ~42
   38    98        CONCAT                                           ~44     !4, '%3C%2FFONT%3E'
         99        ASSIGN                                                   !4, ~44
   39   100      > JMP                                                      ->182
   41   101    >   CONCAT                                           ~46     !2, '%3CFONT+COLOR%3D%22AAAAAA%22%3E'
        102        ASSIGN                                                   !2, ~46
   42   103        CONCAT                                           ~48     !4, '%3C%2FFONT%3E'
        104        ASSIGN                                                   !4, ~48
   43   105      > JMP                                                      ->182
   45   106    >   CONCAT                                           ~50     !2, '%3CFONT+COLOR%3D%22555555%22%3E'
        107        ASSIGN                                                   !2, ~50
   46   108        CONCAT                                           ~52     !4, '%3C%2FFONT%3E'
        109        ASSIGN                                                   !4, ~52
   47   110      > JMP                                                      ->182
   49   111    >   CONCAT                                           ~54     !2, '%3CFONT+COLOR%3D%225555FF%22%3E'
        112        ASSIGN                                                   !2, ~54
   50   113        CONCAT                                           ~56     !4, '%3C%2FFONT%3E'
        114        ASSIGN                                                   !4, ~56
   51   115      > JMP                                                      ->182
   53   116    >   CONCAT                                           ~58     !2, '%3CFONT+COLOR%3D%2255FF55%22%3E'
        117        ASSIGN                                                   !2, ~58
   54   118        CONCAT                                           ~60     !4, '%3C%2FFONT%3E'
        119        ASSIGN                                                   !4, ~60
   55   120      > JMP                                                      ->182
   57   121    >   CONCAT                                           ~62     !2, '%3CFONT+COLOR%3D%2255FFFF%22%3E'
        122        ASSIGN                                                   !2, ~62
   58   123        CONCAT                                           ~64     !4, '%3C%2FFONT%3E'
        124        ASSIGN                                                   !4, ~64
   59   125      > JMP                                                      ->182
   61   126    >   CONCAT                                           ~66     !2, '%3CFONT+COLOR%3D%22FF5555%22%3E'
        127        ASSIGN                                                   !2, ~66
   62   128        CONCAT                                           ~68     !4, '%3C%2FFONT%3E'
        129        ASSIGN                                                   !4, ~68
   63   130      > JMP                                                      ->182
   65   131    >   CONCAT                                           ~70     !2, '%3CFONT+COLOR%3D%22FF55FF%22%3E'
        132        ASSIGN                                                   !2, ~70
   66   133        CONCAT                                           ~72     !4, '%3C%2FFONT%3E'
        134        ASSIGN                                                   !4, ~72
   67   135      > JMP                                                      ->182
   69   136    >   CONCAT                                           ~74     !2, '%3CFONT+COLOR%3D%22FFFF55%22%3E'
        137        ASSIGN                                                   !2, ~74
   70   138        CONCAT                                           ~76     !4, '%3C%2FFONT%3E'
        139        ASSIGN                                                   !4, ~76
   71   140      > JMP                                                      ->182
   73   141    >   CONCAT                                           ~78     !2, '%3CFONT+COLOR%3D%22FFFFFF%22%3E'
        142        ASSIGN                                                   !2, ~78
   74   143        CONCAT                                           ~80     !4, '%3C%2FFONT%3E'
        144        ASSIGN                                                   !4, ~80
   75   145      > JMP                                                      ->182
   77   146    >   STRLEN                                           ~82     !5
        147        IS_SMALLER                                               2, ~82
        148      > JMPZ                                                     ~83, ->154
   78   149    >   CONCAT                                           ~84     !2, '%3Cspan+style%3D%22font-weight%3Abold%3B%22%3E'
        150        ASSIGN                                                   !2, ~84
   79   151        CONCAT                                           ~86     '%3C%2Fspan%3E', !4
        152        ASSIGN                                                   !4, ~86
   80   153      > JMP                                                      ->182
   83   154    >   STRLEN                                           ~88     !5
        155        IS_SMALLER                                               2, ~88
        156      > JMPZ                                                     ~89, ->162
   84   157    >   CONCAT                                           ~90     !2, '%3Cstrike%3E'
        158        ASSIGN                                                   !2, ~90
   85   159        CONCAT                                           ~92     '%3C%2Fstrike%3E', !4
        160        ASSIGN                                                   !4, ~92
   86   161      > JMP                                                      ->182
   89   162    >   STRLEN                                           ~94     !5
        163        IS_SMALLER                                               2, ~94
        164      > JMPZ                                                     ~95, ->170
   90   165    >   CONCAT                                           ~96     !2, '%3Cspan+style%3D%22text-decoration%3A+underline%3B%22%3E'
        166        ASSIGN                                                   !2, ~96
   91   167        CONCAT                                           ~98     '%3C%2Fspan%3E', !4
        168        ASSIGN                                                   !4, ~98
   92   169      > JMP                                                      ->182
   95   170    >   STRLEN                                           ~100    !5
        171        IS_SMALLER                                               2, ~100
        172      > JMPZ                                                     ~101, ->178
   96   173    >   CONCAT                                           ~102    !2, '%3Ci%3E'
        174        ASSIGN                                                   !2, ~102
   97   175        CONCAT                                           ~104    '%3C%2Fi%3E', !4
        176        ASSIGN                                                   !4, ~104
   98   177      > JMP                                                      ->182
  101   178    >   CONCAT                                           ~106    !2, !4
        179        ASSIGN                                                   !2, ~106
  102   180        ASSIGN                                                   !4, ''
  103   181      > JMP                                                      ->182
  105   182    >   ISSET_ISEMPTY_DIM_OBJ                         0          !6, 1
        183      > JMPZ                                                     ~109, ->196
  106   184    >   FETCH_DIM_R                                      ~110    !6, 1
        185        CONCAT                                           ~111    !2, ~110
        186        ASSIGN                                                   !2, ~111
  107   187        ISSET_ISEMPTY_CV                                 ~113    !4
        188      > JMPZ_EX                                          ~113    ~113, ->192
        189    >   STRLEN                                           ~114    !5
        190        IS_SMALLER                                       ~115    2, ~114
        191        BOOL                                             ~113    ~115
        192    > > JMPZ                                                     ~113, ->196
  108   193    >   CONCAT                                           ~116    !2, !4
        194        ASSIGN                                                   !2, ~116
  109   195        ASSIGN                                                   !4, ''
        196    > > JMP                                                      ->199
  114   197    >   CONCAT                                           ~119    !2, !5
        198        ASSIGN                                                   !2, ~119
   10   199    > > JMP                                                      ->11
        200    >   FE_FREE                                                  $13
    8   201      > JMP                                                      ->8
        202    >   FE_FREE                                                  $11
  120   203      > RETURN                                                   !2
  121   204*     > RETURN                                                   null

End of function minetext

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.54 ms | 1423 KiB | 22 Q