3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo ' <div class="content_box"><b>Random Spawn Array Generator - Generates a random spawn array from SavedPositions.txt!</b></div> <form method="POST" name="editor"> <textarea name="code" cols="80" rows="30" class="paste_textarea">'; if(!empty($_POST['code'])) { $text = $_POST['code']; $text = explode("\n",$text); $incAngles = $_POST['incAngles']; $counter = 0; $string = ""; for($i = 0; $i < sizeof($text); $i++) { $sText = explode(",",$text[$i]); if(empty($sText[1]) || empty($sText[2]) || empty($sText[3]) || empty($sText[4])) continue; if($incAngles == "on") if($i != sizeof($text) - 1) $string .= " {".$sText[1].",".$sText[2].",".$sText[3].",".$sText[4]."},\n"; else $string .= " {".$sText[1].",".$sText[2].",".$sText[3].",".$sText[4]."}\n"; else if($i != sizeof($text) - 1) $string .= " {".$sText[1].",".$sText[2].",".$sText[3]."},\n"; else $string .= " {".$sText[1].",".$sText[2].",".$sText[3]."}\n"; $counter++; } echo "new Float:".$_POST['format']."[".$counter."][".($incAngles == "on" ? "4" : "3")."] = {\n"; echo $string; echo '};'; } echo '</textarea> <div class="form_frame"> <div class="form_left"> Array name: </div> <div class="form_right"> <input type="text" value="randomSpawns" name="format" size="20" class="post_input"> </div> <div class="form_left"> Include angles: </div> <div class="form_right"> <input type="checkbox" name="incAngles"> </div> </div> <input type="submit" value="Split String" name="Submit"> </form>'; ?> echo ' <div class="content_box"><b>Random Spawn Array Generator - Generates a random spawn array from SavedPositions.txt!</b></div> <form method="POST" name="editor"> <textarea name="code" cols="80" rows="30" class="paste_textarea">'; if(!empty($_POST['code'])) { $text = $_POST['code']; $text = explode("\n",$text); $incAngles = $_POST['incAngles']; $counter = 0; $string = ""; for($i = 0; $i < sizeof($text); $i++) { $sText = explode(",",$text[$i]); if(empty($sText[1]) || empty($sText[2]) || empty($sText[3]) || empty($sText[4])) continue; if($incAngles == "on") if($i != sizeof($text) - 1) $string .= " {".$sText[1].",".$sText[2].",".$sText[3].",".$sText[4]."},\n"; else $string .= " {".$sText[1].",".$sText[2].",".$sText[3].",".$sText[4]."}\n"; else if($i != sizeof($text) - 1) $string .= " {".$sText[1].",".$sText[2].",".$sText[3]."},\n"; else $string .= " {".$sText[1].",".$sText[2].",".$sText[3]."}\n"; $counter++; } echo "new Float:".$_POST['format']."[".$counter."][".($incAngles == "on" ? "4" : "3")."] = {\n"; echo $string; echo '};'; } echo '</textarea> <div class="form_frame"> <div class="form_left"> Array name: </div> <div class="form_right"> <input type="text" value="randomSpawns" name="format" size="20" class="post_input"> </div> <div class="form_left"> Include angles: </div> <div class="form_right"> <input type="checkbox" name="incAngles"> </div> </div> <input type="submit" value="Split String" name="Submit"> </form>'; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 118
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 99
Branch analysis from position: 99
2 jumps found. (Code = 44) Position 1 = 102, Position 2 = 20
Branch analysis from position: 102
2 jumps found. (Code = 43) Position 1 = 110, Position 2 = 112
Branch analysis from position: 110
1 jumps found. (Code = 42) Position 1 = 113
Branch analysis from position: 113
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 112
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 47) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
2 jumps found. (Code = 47) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
2 jumps found. (Code = 47) Position 1 = 34, Position 2 = 36
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 38
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 98
Branch analysis from position: 98
2 jumps found. (Code = 44) Position 1 = 102, Position 2 = 20
Branch analysis from position: 102
Branch analysis from position: 20
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 72
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 58
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 71
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 97
Branch analysis from position: 97
2 jumps found. (Code = 44) Position 1 = 102, Position 2 = 20
Branch analysis from position: 102
Branch analysis from position: 20
Branch analysis from position: 58
1 jumps found. (Code = 42) Position 1 = 97
Branch analysis from position: 97
Branch analysis from position: 72
2 jumps found. (Code = 43) Position 1 = 76, Position 2 = 87
Branch analysis from position: 76
1 jumps found. (Code = 42) Position 1 = 97
Branch analysis from position: 97
Branch analysis from position: 87
2 jumps found. (Code = 44) Position 1 = 102, Position 2 = 20
Branch analysis from position: 102
Branch analysis from position: 20
Branch analysis from position: 36
Branch analysis from position: 33
Branch analysis from position: 30
Branch analysis from position: 118
filename:       /in/qLYar
function name:  (null)
number of ops:  121
compiled vars:  !0 = $text, !1 = $incAngles, !2 = $counter, !3 = $string, !4 = $i, !5 = $sText
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     '%0A%3Cdiv+class%3D%22content_box%22%3E%3Cb%3ERandom+Spawn+Array+Generator+-+Generates+a+random+spawn+array+from+SavedPositions.txt%21%3C%2Fb%3E%3C%2Fdiv%3E%0A++++++++%3Cform+method%3D%22POST%22+name%3D%22editor%22%3E%0A++++++++++++++++%3Ctextarea+name%3D%22code%22+cols%3D%2280%22+rows%3D%2230%22+class%3D%22paste_textarea%22%3E'
    8     1        FETCH_IS                                         ~6      '_POST'
          2        ISSET_ISEMPTY_DIM_OBJ                         1  ~7      ~6, 'code'
          3        BOOL_NOT                                         ~8      ~7
          4      > JMPZ                                                     ~8, ->118
   10     5    >   FETCH_R                      global              ~9      '_POST'
          6        FETCH_DIM_R                                      ~10     ~9, 'code'
          7        ASSIGN                                                   !0, ~10
   11     8        INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '%0A'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $12     
         12        ASSIGN                                                   !0, $12
   12    13        FETCH_R                      global              ~14     '_POST'
         14        FETCH_DIM_R                                      ~15     ~14, 'incAngles'
         15        ASSIGN                                                   !1, ~15
   13    16        ASSIGN                                                   !2, 0
   14    17        ASSIGN                                                   !3, ''
   16    18        ASSIGN                                                   !4, 0
         19      > JMP                                                      ->99
   18    20    >   INIT_FCALL                                               'explode'
         21        SEND_VAL                                                 '%2C'
         22        FETCH_DIM_R                                      ~20     !0, !4
         23        SEND_VAL                                                 ~20
         24        DO_ICALL                                         $21     
         25        ASSIGN                                                   !5, $21
   20    26        ISSET_ISEMPTY_DIM_OBJ                         1  ~23     !5, 1
         27      > JMPNZ_EX                                         ~23     ~23, ->30
         28    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~24     !5, 2
         29        BOOL                                             ~23     ~24
         30    > > JMPNZ_EX                                         ~23     ~23, ->33
         31    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~25     !5, 3
         32        BOOL                                             ~23     ~25
         33    > > JMPNZ_EX                                         ~23     ~23, ->36
         34    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~26     !5, 4
         35        BOOL                                             ~23     ~26
         36    > > JMPZ                                                     ~23, ->38
         37    > > JMP                                                      ->98
   22    38    >   IS_EQUAL                                                 !1, 'on'
         39      > JMPZ                                                     ~27, ->72
   23    40    >   COUNT                                            ~28     !0
         41        SUB                                              ~29     ~28, 1
         42        IS_NOT_EQUAL                                             !4, ~29
         43      > JMPZ                                                     ~30, ->58
         44    >   FETCH_DIM_R                                      ~31     !5, 1
         45        CONCAT                                           ~32     '++++%7B', ~31
         46        CONCAT                                           ~33     ~32, '%2C'
         47        FETCH_DIM_R                                      ~34     !5, 2
         48        CONCAT                                           ~35     ~33, ~34
         49        CONCAT                                           ~36     ~35, '%2C'
         50        FETCH_DIM_R                                      ~37     !5, 3
         51        CONCAT                                           ~38     ~36, ~37
         52        CONCAT                                           ~39     ~38, '%2C'
         53        FETCH_DIM_R                                      ~40     !5, 4
         54        CONCAT                                           ~41     ~39, ~40
         55        CONCAT                                           ~42     ~41, '%7D%2C%0A'
         56        ASSIGN_OP                                     8          !3, ~42
         57      > JMP                                                      ->71
   24    58    >   FETCH_DIM_R                                      ~44     !5, 1
         59        CONCAT                                           ~45     '++++%7B', ~44
         60        CONCAT                                           ~46     ~45, '%2C'
         61        FETCH_DIM_R                                      ~47     !5, 2
         62        CONCAT                                           ~48     ~46, ~47
         63        CONCAT                                           ~49     ~48, '%2C'
         64        FETCH_DIM_R                                      ~50     !5, 3
         65        CONCAT                                           ~51     ~49, ~50
         66        CONCAT                                           ~52     ~51, '%2C'
         67        FETCH_DIM_R                                      ~53     !5, 4
         68        CONCAT                                           ~54     ~52, ~53
         69        CONCAT                                           ~55     ~54, '%7D%0A'
         70        ASSIGN_OP                                     8          !3, ~55
         71    > > JMP                                                      ->97
   26    72    >   COUNT                                            ~57     !0
         73        SUB                                              ~58     ~57, 1
         74        IS_NOT_EQUAL                                             !4, ~58
         75      > JMPZ                                                     ~59, ->87
         76    >   FETCH_DIM_R                                      ~60     !5, 1
         77        CONCAT                                           ~61     '++++%7B', ~60
         78        CONCAT                                           ~62     ~61, '%2C'
         79        FETCH_DIM_R                                      ~63     !5, 2
         80        CONCAT                                           ~64     ~62, ~63
         81        CONCAT                                           ~65     ~64, '%2C'
         82        FETCH_DIM_R                                      ~66     !5, 3
         83        CONCAT                                           ~67     ~65, ~66
         84        CONCAT                                           ~68     ~67, '%7D%2C%0A'
         85        ASSIGN_OP                                     8          !3, ~68
         86      > JMP                                                      ->97
   27    87    >   FETCH_DIM_R                                      ~70     !5, 1
         88        CONCAT                                           ~71     '++++%7B', ~70
         89        CONCAT                                           ~72     ~71, '%2C'
         90        FETCH_DIM_R                                      ~73     !5, 2
         91        CONCAT                                           ~74     ~72, ~73
         92        CONCAT                                           ~75     ~74, '%2C'
         93        FETCH_DIM_R                                      ~76     !5, 3
         94        CONCAT                                           ~77     ~75, ~76
         95        CONCAT                                           ~78     ~77, '%7D%0A'
         96        ASSIGN_OP                                     8          !3, ~78
   29    97    >   PRE_INC                                                  !2
   16    98    >   PRE_INC                                                  !4
         99    >   COUNT                                            ~82     !0
        100        IS_SMALLER                                               !4, ~82
        101      > JMPNZ                                                    ~83, ->20
   32   102    >   FETCH_R                      global              ~84     '_POST'
        103        FETCH_DIM_R                                      ~85     ~84, 'format'
        104        CONCAT                                           ~86     'new+Float%3A', ~85
        105        CONCAT                                           ~87     ~86, '%5B'
        106        CONCAT                                           ~88     ~87, !2
        107        CONCAT                                           ~89     ~88, '%5D%5B'
        108        IS_EQUAL                                                 !1, 'on'
        109      > JMPZ                                                     ~90, ->112
        110    >   QM_ASSIGN                                        ~91     '4'
        111      > JMP                                                      ->113
        112    >   QM_ASSIGN                                        ~91     '3'
        113    >   CONCAT                                           ~92     ~89, ~91
        114        CONCAT                                           ~93     ~92, '%5D+%3D+%7B%0A'
        115        ECHO                                                     ~93
   34   116        ECHO                                                     !3
   36   117        ECHO                                                     '%7D%3B'
   39   118    >   ECHO                                                     '%3C%2Ftextarea%3E++++++%0A++++++++++++++++%3Cdiv+class%3D%22form_frame%22%3E%0A++++++++++++++++++++++++%3Cdiv+class%3D%22form_left%22%3E%0A++++++++++++++++++++++++++++++++Array+name%3A%0A++++++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++++++++++%3Cdiv+class%3D%22form_right%22%3E%0A++++++++++++++++++++++++++++++++%3Cinput+type%3D%22text%22+value%3D%22randomSpawns%22+name%3D%22format%22+size%3D%2220%22+class%3D%22post_input%22%3E%0A++++++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++++++++++%3Cdiv+class%3D%22form_left%22%3E%0A++++++++++++++++++++++++++++++++Include+angles%3A%0A++++++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++++++++++%3Cdiv+class%3D%22form_right%22%3E%0A++++++++++++++++++++++++++++++++%3Cinput+type%3D%22checkbox%22+name%3D%22incAngles%22%3E%0A++++++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++%3Cinput+type%3D%22submit%22+value%3D%22Split+String%22+name%3D%22Submit%22%3E%0A++++++++%3C%2Fform%3E'
   58   119        ECHO                                                     'echo+%27%0A%3Cdiv+class%3D%22content_box%22%3E%3Cb%3ERandom+Spawn+Array+Generator+-+Generates+a+random+spawn+array+from+SavedPositions.txt%21%3C%2Fb%3E%3C%2Fdiv%3E%0A++++++++%3Cform+method%3D%22POST%22+name%3D%22editor%22%3E%0A++++++++++++++++%3Ctextarea+name%3D%22code%22+cols%3D%2280%22+rows%3D%2230%22+class%3D%22paste_textarea%22%3E%27%3B%0A+++++++++++++++%0Aif%28%21empty%28%24_POST%5B%27code%27%5D%29%29%0A%7B%0A++++++++%24text+%3D+%24_POST%5B%27code%27%5D%3B%0A++++++++%24text+%3D+explode%28%22%5Cn%22%2C%24text%29%3B%0A++++++++%24incAngles+%3D+%24_POST%5B%27incAngles%27%5D%3B%0A++++++++%24counter+%3D+0%3B%0A++++++++%24string+%3D+%22%22%3B%0A+++++++%0A++++++++for%28%24i+%3D+0%3B+%24i+%3C+sizeof%28%24text%29%3B+%24i%2B%2B%29%0A++++++++%7B%0A++++++++++++++++%24sText+%3D+explode%28%22%2C%22%2C%24text%5B%24i%5D%29%3B%0A+++++++++++++++%0A++++++++++++++++if%28empty%28%24sText%5B1%5D%29+%7C%7C+empty%28%24sText%5B2%5D%29+%7C%7C+empty%28%24sText%5B3%5D%29+%7C%7C+empty%28%24sText%5B4%5D%29%29+continue%3B%0A+++++++++++++++%0A++++++++++++++++if%28%24incAngles+%3D%3D+%22on%22%29%0A++++++++++++++++++++++++if%28%24i+%21%3D+sizeof%28%24text%29+-+1%29+%24string+.%3D+%22++++%7B%22.%24sText%5B1%5D.%22%2C%22.%24sText%5B2%5D.%22%2C%22.%24sText%5B3%5D.%22%2C%22.%24sText%5B4%5D.%22%7D%2C%5Cn%22%3B%0A++++++++++++++++++++++++else+%24string+.%3D++%22++++%7B%22.%24sText%5B1%5D.%22%2C%22.%24sText%5B2%5D.%22%2C%22.%24sText%5B3%5D.%22%2C%22.%24sText%5B4%5D.%22%7D%5Cn%22%3B%0A++++++++++++++++else%0A++++++++++++++++++++++++if%28%24i+%21%3D+sizeof%28%24text%29+-+1%29+%24string+.%3D++%22++++%7B%22.%24sText%5B1%5D.%22%2C%22.%24sText%5B2%5D.%22%2C%22.%24sText%5B3%5D.%22%7D%2C%5Cn%22%3B%0A++++++++++++++++++++++++else+%24string+.%3D++%22++++%7B%22.%24sText%5B1%5D.%22%2C%22.%24sText%5B2%5D.%22%2C%22.%24sText%5B3%5D.%22%7D%5Cn%22%3B++++++++++%0A+%0A++++++++++++++++%24counter%2B%2B%3B%0A++++++++%7D%0A+++++++%0A++++++++echo+%22new+Float%3A%22.%24_POST%5B%27format%27%5D.%22%5B%22.%24counter.%22%5D%5B%22.%28%24incAngles+%3D%3D+%22on%22+%3F+%224%22+%3A+%223%22%29.%22%5D+%3D+%7B%5Cn%22%3B%0A+++++++%0A++++++++echo+%24string%3B%0A+++++++%0A++++++++echo+%27%7D%3B%27%3B%0A%7D%0A+%0Aecho+%27%3C%2Ftextarea%3E++++++%0A++++++++++++++++%3Cdiv+class%3D%22form_frame%22%3E%0A++++++++++++++++++++++++%3Cdiv+class%3D%22form_left%22%3E%0A++++++++++++++++++++++++++++++++Array+name%3A%0A++++++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++++++++++%3Cdiv+class%3D%22form_right%22%3E%0A++++++++++++++++++++++++++++++++%3Cinput+type%3D%22text%22+value%3D%22randomSpawns%22+name%3D%22format%22+size%3D%2220%22+class%3D%22post_input%22%3E%0A++++++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++++++++++%3Cdiv+class%3D%22form_left%22%3E%0A++++++++++++++++++++++++++++++++Include+angles%3A%0A++++++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++++++++++%3Cdiv+class%3D%22form_right%22%3E%0A++++++++++++++++++++++++++++++++%3Cinput+type%3D%22checkbox%22+name%3D%22incAngles%22%3E%0A++++++++++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++%3C%2Fdiv%3E%0A++++++++++++++++%3Cinput+type%3D%22submit%22+value%3D%22Split+String%22+name%3D%22Submit%22%3E%0A++++++++%3C%2Fform%3E%27%3B%0A+++++++%0A%3F%3E'
  112   120      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.64 ms | 1404 KiB | 15 Q