3v4l.org

run code in 300+ PHP versions simultaneously
<?php $kat_url = "http://defenderoftexel.wikia.com/wiki/Special:Categories?limit=5000"; $a = kategorien_suchen($kat_url); $FA = array_unique ($a); sort($FA); echo "<pre>"; print_r($FA); echo "</pre>"; function kategorien_suchen($kat_url){ $suchstring = "<a href=\"/wiki/Category:"; $file = fopen($kat_url,"r"); $i=0; while (!feof($file)) { $zeile[$i] = fgets($file,2000); $i++; } fclose($file); for ($j=0;$j<$i;$j++) { if(substr(preg_replace("/\r|\n/s", "", strip_tags($zeile[$j], '<a>')),0,24)=="<a href=\"/wiki/Category:"){ $katliste = split("\" title=\"", "http://defenderoftexel.wikia.com".str_replace("<a href=\"","",preg_replace("/\r|\n/s", "", strip_tags($zeile[$j], '<a>'))), 2); $katliste[0] = str_replace("%3F","?",$katliste[0]); $katlistefertig[] = $katliste[0]; } } return $katlistefertig; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7KQUT
function name:  (null)
number of ops:  18
compiled vars:  !0 = $kat_url, !1 = $a, !2 = $FA
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fdefenderoftexel.wikia.com%2Fwiki%2FSpecial%3ACategories%3Flimit%3D5000'
    4     1        INIT_FCALL_BY_NAME                                       'kategorien_suchen'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !1, $4
    5     5        INIT_FCALL                                               'array_unique'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
    6     9        INIT_FCALL                                               'sort'
         10        SEND_REF                                                 !2
         11        DO_ICALL                                                 
    7    12        ECHO                                                     '%3Cpre%3E'
    8    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
    9    16        ECHO                                                     '%3C%2Fpre%3E'
   30    17      > RETURN                                                   1

Function kategorien_suchen:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 9
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 77
Branch analysis from position: 77
2 jumps found. (Code = 44) Position 1 = 79, Position 2 = 26
Branch analysis from position: 79
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 76
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 79, Position 2 = 26
Branch analysis from position: 79
Branch analysis from position: 26
Branch analysis from position: 76
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 9
Branch analysis from position: 21
Branch analysis from position: 9
filename:       /in/7KQUT
function name:  kategorien_suchen
number of ops:  81
compiled vars:  !0 = $kat_url, !1 = $suchstring, !2 = $file, !3 = $i, !4 = $zeile, !5 = $j, !6 = $katliste, !7 = $katlistefertig
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ASSIGN                                                   !1, '%3Ca+href%3D%22%2Fwiki%2FCategory%3A'
   13     2        INIT_FCALL                                               'fopen'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'r'
          5        DO_ICALL                                         $9      
          6        ASSIGN                                                   !2, $9
   14     7        ASSIGN                                                   !3, 0
   15     8      > JMP                                                      ->16
   16     9    >   INIT_FCALL                                               'fgets'
         10        SEND_VAR                                                 !2
         11        SEND_VAL                                                 2000
         12        DO_ICALL                                         $13     
         13        ASSIGN_DIM                                               !4, !3
         14        OP_DATA                                                  $13
   17    15        PRE_INC                                                  !3
   15    16    >   INIT_FCALL                                               'feof'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $15     
         19        BOOL_NOT                                         ~16     $15
         20      > JMPNZ                                                    ~16, ->9
   19    21    >   INIT_FCALL                                               'fclose'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                                 
   20    24        ASSIGN                                                   !5, 0
         25      > JMP                                                      ->77
   21    26    >   INIT_FCALL                                               'substr'
         27        INIT_FCALL                                               'preg_replace'
         28        SEND_VAL                                                 '%2F%0D%7C%0A%2Fs'
         29        SEND_VAL                                                 ''
         30        INIT_FCALL                                               'strip_tags'
         31        FETCH_DIM_R                                      ~19     !4, !5
         32        SEND_VAL                                                 ~19
         33        SEND_VAL                                                 '%3Ca%3E'
         34        DO_ICALL                                         $20     
         35        SEND_VAR                                                 $20
         36        DO_ICALL                                         $21     
         37        SEND_VAR                                                 $21
         38        SEND_VAL                                                 0
         39        SEND_VAL                                                 24
         40        DO_ICALL                                         $22     
         41        IS_EQUAL                                                 $22, '%3Ca+href%3D%22%2Fwiki%2FCategory%3A'
         42      > JMPZ                                                     ~23, ->76
   22    43    >   INIT_FCALL_BY_NAME                                       'split'
         44        SEND_VAL_EX                                              '%22+title%3D%22'
         45        INIT_FCALL                                               'str_replace'
         46        SEND_VAL                                                 '%3Ca+href%3D%22'
         47        SEND_VAL                                                 ''
         48        INIT_FCALL                                               'preg_replace'
         49        SEND_VAL                                                 '%2F%0D%7C%0A%2Fs'
         50        SEND_VAL                                                 ''
         51        INIT_FCALL                                               'strip_tags'
         52        FETCH_DIM_R                                      ~24     !4, !5
         53        SEND_VAL                                                 ~24
         54        SEND_VAL                                                 '%3Ca%3E'
         55        DO_ICALL                                         $25     
         56        SEND_VAR                                                 $25
         57        DO_ICALL                                         $26     
         58        SEND_VAR                                                 $26
         59        DO_ICALL                                         $27     
         60        CONCAT                                           ~28     'http%3A%2F%2Fdefenderoftexel.wikia.com', $27
         61        SEND_VAL_EX                                              ~28
         62        SEND_VAL_EX                                              2
         63        DO_FCALL                                      0  $29     
         64        ASSIGN                                                   !6, $29
   23    65        INIT_FCALL                                               'str_replace'
         66        SEND_VAL                                                 '%253F'
         67        SEND_VAL                                                 '%3F'
         68        FETCH_DIM_R                                      ~32     !6, 0
         69        SEND_VAL                                                 ~32
         70        DO_ICALL                                         $33     
         71        ASSIGN_DIM                                               !6, 0
         72        OP_DATA                                                  $33
   24    73        FETCH_DIM_R                                      ~35     !6, 0
         74        ASSIGN_DIM                                               !7
         75        OP_DATA                                                  ~35
   20    76    >   PRE_INC                                                  !5
         77    >   IS_SMALLER                                               !5, !3
         78      > JMPNZ                                                    ~37, ->26
   27    79    > > RETURN                                                   !7
   28    80*     > RETURN                                                   null

End of function kategorien_suchen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.65 ms | 1404 KiB | 35 Q