3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Drzewo { public $waga; public $znaki; // tworzymy nowe Drzewo - zeby to zrozumiec przydaje sie zajrzec do konstruktora Rozgalezionego drzewa function nowe_Drzewo($prawe) { $nowawaga = $this->waga + $prawe->waga; $noweznaki = $this->znaki + $prawe->znaki; return new Rozgalezione($this,$prawe,$noweznaki,$nowawaga); } // to nalezy przeczytac po zobaczeniu jak tworzone sa drzewa function dekoduj_znak($bity) { if ($this instanceof Lisc) return array($this->znak,$bity); else if ($bity[0] == 0) $nowedrzewo = $this->lewe; else $nowedrzewo = $this->prawe; return $nowedrzewo->dekoduj_znak(array_slice($bity,1)); } function dekoduj($bity){ if ($bity == array()) array(); else { $odkodowany_znak = dekoduj_znak($bity); $znak = $odkodowany_znak[0]; $nowebity = $odkodowany_znak[1]; $dekodowanareszta = $this->dekoduj($nowebity); return array_merge(array($a),$dekodowanareszta); } } } //Drzewo jest Lisciem class Lisc extends Drzewo { public $znak; function __construct($z,$w){ $this->znak = $z; $this->waga = $w; $this->znaki = array($z); } } // ... albo ma poddrzewa class Rozgalezione extends Drzewo { public $lewe; public $prawe; function __construct($podDrzewo_lewe, $podDrzewo_prawe, $z , $w){ $this->lewe = $podDrzewo_lewe; $this->prawe = $podDrzewo_prawe; $this->znaki = $z; $this->waga = $w; } } /* function nowe_Drzewo($lewe,$prawe) { $nowawaga = $lewe->waga + $prawe->waga; $noweznaki = array_merge($lewe->znaki, $prawe->znaki); return new Rozgalezione($lewe,$prawe, $noweznaki, $nowawaga); } function zamien_na_tablice($str){ //oprocz zmiany w tablice usuwamy spacje $str = str_replace(' ','',$str); return str_split($str); } /*nazwa sama sie wyjasnia wystapienia_w_tekscie : array[Char] -> array[(Char,Int)] */ function wystapienia_w_tekscie($tekst) { $wystapienia = array(); $dl = count($tekst); // ZAL TEKST JEST LISTA CHAR'OW for ($i = 0; $i < $dl ; $i++){ $litera = $tekst[$i]; $wystapienia[$litera] +=1; } return $wystapienia; } /* stworz_liste_Lisci_dla_znakow : array[(Char,Int)] -> array[drzewa] */ function stworz_liste_Lisci_dla_znakow( $wystapienia ) { usort($wystapienia); $a = array(); foreach ($wystapienia as $znak => $ile) { $Lisc_w_Liscie = new Lisc($znak,$ile); $a = array_merge($a,array($Lisc_w_Liscie)); } return $a; } /*to jest to samo co insert z insertion sort umiesc_w_odpowiednim_miejscu : drzewa x array[drzewa] -> array[drzewa] */ function umiesc_w_odpowiednim_miejscu($d , $a){ if ($a == array()) return array($d); else { $glowa = $a[0]; $ogon = array_slice($a,1); if ($glowa->waga <= $d->waga) return array_merge( array($glowa) , umiesc_w_odpowiednim_miejscu($d,$ogon)); else return array_merge( array($d), $a); } } /* konstruuj_z_drzew : array[drzewa] -> drzewa MOMENT - NAJWAZNIEJSZY POMYSL HUFFMANNA jesli mamy poszeregowane wzgl. czestosci znaki, to tworzymy Drzewo kodujace w nast sposob : - umieszczamy 'na dole' Drzewo scalone z Lisci o 2 najrzadziej wystepujace symbolach - rekurencyjnie stosujemy funkcje do reszty - doklejamy wyzej opisane Liscie */ function konstruuj_z_drzew($drzewa) { /* zakladamy ze drzewa sa wysortowane - funkcja stworz_liste_Lisci_dla_znakow sortuje wejscie, a ta funkcje bedziemy stosować do jej wyjscia */ if (length($drzewa) <= 1) return $drzewa; else { // TO WARTO SOBIE NARYSOWAC $d1 = $drzewa[0]; $d2 = $drzewa[1]; $dolne = $d1->nowe_Drzewo($d2) ; $reszta = array_slice($drzewa,2); umiesc_w_odpowiednim_miejscu($dolne,konstruuj_Drzewo_huffmana($reszta)); } } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  147     0  E > > RETURN                                                   1

Function wystapienia_w_tekscie:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 6
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 6
Branch analysis from position: 13
Branch analysis from position: 6
filename:       /in/uFJQs
function name:  wystapienia_w_tekscie
number of ops:  15
compiled vars:  !0 = $tekst, !1 = $wystapienia, !2 = $dl, !3 = $i, !4 = $litera
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   77     0  E >   RECV                                             !0      
   78     1        ASSIGN                                                   !1, <array>
   79     2        COUNT                                            ~6      !0
          3        ASSIGN                                                   !2, ~6
   80     4        ASSIGN                                                   !3, 0
          5      > JMP                                                      ->11
   81     6    >   FETCH_DIM_R                                      ~9      !0, !3
          7        ASSIGN                                                   !4, ~9
   82     8        ASSIGN_DIM_OP                +=               1          !1, !4
          9        OP_DATA                                                  1
   80    10        PRE_INC                                                  !3
         11    >   IS_SMALLER                                               !3, !2
         12      > JMPNZ                                                    ~13, ->6
   84    13    > > RETURN                                                   !1
   85    14*     > RETURN                                                   null

End of function wystapienia_w_tekscie

Function stworz_liste_lisci_dla_znakow:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 20
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 20
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/uFJQs
function name:  stworz_liste_Lisci_dla_znakow
number of ops:  23
compiled vars:  !0 = $wystapienia, !1 = $a, !2 = $ile, !3 = $znak, !4 = $Lisc_w_Liscie
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   90     0  E >   RECV                                             !0      
   91     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
   92     4        ASSIGN                                                   !1, <array>
   93     5      > FE_RESET_R                                       $7      !0, ->20
          6    > > FE_FETCH_R                                       ~8      $7, !2, ->20
          7    >   ASSIGN                                                   !3, ~8
   94     8        NEW                                              $10     'Lisc'
          9        SEND_VAR_EX                                              !3
         10        SEND_VAR_EX                                              !2
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !4, $10
   95    13        INIT_FCALL                                               'array_merge'
         14        SEND_VAR                                                 !1
         15        INIT_ARRAY                                       ~13     !4
         16        SEND_VAL                                                 ~13
         17        DO_ICALL                                         $14     
         18        ASSIGN                                                   !1, $14
   93    19      > JMP                                                      ->6
         20    >   FE_FREE                                                  $7
   97    21      > RETURN                                                   !1
   98    22*     > RETURN                                                   null

End of function stworz_liste_lisci_dla_znakow

Function umiesc_w_odpowiednim_miejscu:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 29
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  umiesc_w_odpowiednim_miejscu
number of ops:  36
compiled vars:  !0 = $d, !1 = $a, !2 = $glowa, !3 = $ogon
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  103     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  104     2        IS_EQUAL                                                 !1, <array>
          3      > JMPZ                                                     ~4, ->7
  105     4    >   INIT_ARRAY                                       ~5      !0
          5      > RETURN                                                   ~5
          6*       JMP                                                      ->35
  108     7    >   FETCH_DIM_R                                      ~6      !1, 0
          8        ASSIGN                                                   !2, ~6
  109     9        INIT_FCALL                                               'array_slice'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 1
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !3, $8
  110    14        FETCH_OBJ_R                                      ~10     !2, 'waga'
         15        FETCH_OBJ_R                                      ~11     !0, 'waga'
         16        IS_SMALLER_OR_EQUAL                                      ~10, ~11
         17      > JMPZ                                                     ~12, ->29
  111    18    >   INIT_FCALL                                               'array_merge'
         19        INIT_ARRAY                                       ~13     !2
         20        SEND_VAL                                                 ~13
         21        INIT_FCALL_BY_NAME                                       'umiesc_w_odpowiednim_miejscu'
         22        SEND_VAR_EX                                              !0
         23        SEND_VAR_EX                                              !3
         24        DO_FCALL                                      0  $14     
         25        SEND_VAR                                                 $14
         26        DO_ICALL                                         $15     
         27      > RETURN                                                   $15
         28*       JMP                                                      ->35
  113    29    >   INIT_FCALL                                               'array_merge'
         30        INIT_ARRAY                                       ~16     !0
         31        SEND_VAL                                                 ~16
         32        SEND_VAR                                                 !1
         33        DO_ICALL                                         $17     
         34      > RETURN                                                   $17
  115    35*     > RETURN                                                   null

End of function umiesc_w_odpowiednim_miejscu

Function konstruuj_z_drzew:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  konstruuj_z_drzew
number of ops:  29
compiled vars:  !0 = $drzewa, !1 = $d1, !2 = $d2, !3 = $dolne, !4 = $reszta
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  128     0  E >   RECV                                             !0      
  134     1        INIT_FCALL_BY_NAME                                       'length'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $5      
          4        IS_SMALLER_OR_EQUAL                                      $5, 1
          5      > JMPZ                                                     ~6, ->8
  135     6    > > RETURN                                                   !0
          7*       JMP                                                      ->28
  138     8    >   FETCH_DIM_R                                      ~7      !0, 0
          9        ASSIGN                                                   !1, ~7
  139    10        FETCH_DIM_R                                      ~9      !0, 1
         11        ASSIGN                                                   !2, ~9
  140    12        INIT_METHOD_CALL                                         !1, 'nowe_Drzewo'
         13        SEND_VAR_EX                                              !2
         14        DO_FCALL                                      0  $11     
         15        ASSIGN                                                   !3, $11
  141    16        INIT_FCALL                                               'array_slice'
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 2
         19        DO_ICALL                                         $13     
         20        ASSIGN                                                   !4, $13
  142    21        INIT_FCALL                                               'umiesc_w_odpowiednim_miejscu'
         22        SEND_VAR                                                 !3
         23        INIT_FCALL_BY_NAME                                       'konstruuj_Drzewo_huffmana'
         24        SEND_VAR_EX                                              !4
         25        DO_FCALL                                      0  $15     
         26        SEND_VAR                                                 $15
         27        DO_FCALL                                      0          
  144    28      > RETURN                                                   null

End of function konstruuj_z_drzew

Class Drzewo:
Function nowe_drzewo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  nowe_Drzewo
number of ops:  18
compiled vars:  !0 = $prawe, !1 = $nowawaga, !2 = $noweznaki
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_R                                      ~3      'waga'
          2        FETCH_OBJ_R                                      ~4      !0, 'waga'
          3        ADD                                              ~5      ~3, ~4
          4        ASSIGN                                                   !1, ~5
   10     5        FETCH_OBJ_R                                      ~7      'znaki'
          6        FETCH_OBJ_R                                      ~8      !0, 'znaki'
          7        ADD                                              ~9      ~7, ~8
          8        ASSIGN                                                   !2, ~9
   11     9        NEW                                              $11     'Rozgalezione'
         10        FETCH_THIS                                       $12     
         11        SEND_VAR_EX                                              $12
         12        SEND_VAR_EX                                              !0
         13        SEND_VAR_EX                                              !2
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
         16      > RETURN                                                   $11
   12    17*     > RETURN                                                   null

End of function nowe_drzewo

Function dekoduj_znak:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  dekoduj_znak
number of ops:  26
compiled vars:  !0 = $bity, !1 = $nowedrzewo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        FETCH_THIS                                       ~2      
          2        INSTANCEOF                                               ~2, 'Lisc'
          3      > JMPZ                                                     ~3, ->9
   16     4    >   FETCH_OBJ_R                                      ~4      'znak'
          5        INIT_ARRAY                                       ~5      ~4
          6        ADD_ARRAY_ELEMENT                                ~5      !0
          7      > RETURN                                                   ~5
          8*       JMP                                                      ->17
   18     9    >   FETCH_DIM_R                                      ~6      !0, 0
         10        IS_EQUAL                                                 ~6, 0
         11      > JMPZ                                                     ~7, ->15
   19    12    >   FETCH_OBJ_R                                      ~8      'lewe'
         13        ASSIGN                                                   !1, ~8
         14      > JMP                                                      ->17
   21    15    >   FETCH_OBJ_R                                      ~10     'prawe'
         16        ASSIGN                                                   !1, ~10
   22    17    >   INIT_METHOD_CALL                                         !1, 'dekoduj_znak'
         18        INIT_FCALL                                               'array_slice'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 1
         21        DO_ICALL                                         $12     
         22        SEND_VAR_NO_REF_EX                                       $12
         23        DO_FCALL                                      0  $13     
         24      > RETURN                                                   $13
   23    25*     > RETURN                                                   null

End of function dekoduj_znak

Function dekoduj:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  dekoduj
number of ops:  23
compiled vars:  !0 = $bity, !1 = $odkodowany_znak, !2 = $znak, !3 = $nowebity, !4 = $dekodowanareszta, !5 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   25     1        IS_EQUAL                                                 !0, <array>
          2      > JMPZ                                                     ~6, ->4
   26     3    > > JMP                                                      ->22
   29     4    >   INIT_FCALL_BY_NAME                                       'dekoduj_znak'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !1, $7
   30     8        FETCH_DIM_R                                      ~9      !1, 0
          9        ASSIGN                                                   !2, ~9
   31    10        FETCH_DIM_R                                      ~11     !1, 1
         11        ASSIGN                                                   !3, ~11
   32    12        INIT_METHOD_CALL                                         'dekoduj'
         13        SEND_VAR_EX                                              !3
         14        DO_FCALL                                      0  $13     
         15        ASSIGN                                                   !4, $13
   33    16        INIT_FCALL                                               'array_merge'
         17        INIT_ARRAY                                       ~15     !5
         18        SEND_VAL                                                 ~15
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                         $16     
         21      > RETURN                                                   $16
   35    22    > > RETURN                                                   null

End of function dekoduj

End of class Drzewo.

Class Lisc:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  __construct
number of ops:  10
compiled vars:  !0 = $z, !1 = $w
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   43     2        ASSIGN_OBJ                                               'znak'
          3        OP_DATA                                                  !0
   44     4        ASSIGN_OBJ                                               'waga'
          5        OP_DATA                                                  !1
   45     6        INIT_ARRAY                                       ~5      !0
          7        ASSIGN_OBJ                                               'znaki'
          8        OP_DATA                                                  ~5
   46     9      > RETURN                                                   null

End of function __construct

Function nowe_drzewo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  nowe_Drzewo
number of ops:  18
compiled vars:  !0 = $prawe, !1 = $nowawaga, !2 = $noweznaki
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_R                                      ~3      'waga'
          2        FETCH_OBJ_R                                      ~4      !0, 'waga'
          3        ADD                                              ~5      ~3, ~4
          4        ASSIGN                                                   !1, ~5
   10     5        FETCH_OBJ_R                                      ~7      'znaki'
          6        FETCH_OBJ_R                                      ~8      !0, 'znaki'
          7        ADD                                              ~9      ~7, ~8
          8        ASSIGN                                                   !2, ~9
   11     9        NEW                                              $11     'Rozgalezione'
         10        FETCH_THIS                                       $12     
         11        SEND_VAR_EX                                              $12
         12        SEND_VAR_EX                                              !0
         13        SEND_VAR_EX                                              !2
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
         16      > RETURN                                                   $11
   12    17*     > RETURN                                                   null

End of function nowe_drzewo

Function dekoduj_znak:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  dekoduj_znak
number of ops:  26
compiled vars:  !0 = $bity, !1 = $nowedrzewo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        FETCH_THIS                                       ~2      
          2        INSTANCEOF                                               ~2, 'Lisc'
          3      > JMPZ                                                     ~3, ->9
   16     4    >   FETCH_OBJ_R                                      ~4      'znak'
          5        INIT_ARRAY                                       ~5      ~4
          6        ADD_ARRAY_ELEMENT                                ~5      !0
          7      > RETURN                                                   ~5
          8*       JMP                                                      ->17
   18     9    >   FETCH_DIM_R                                      ~6      !0, 0
         10        IS_EQUAL                                                 ~6, 0
         11      > JMPZ                                                     ~7, ->15
   19    12    >   FETCH_OBJ_R                                      ~8      'lewe'
         13        ASSIGN                                                   !1, ~8
         14      > JMP                                                      ->17
   21    15    >   FETCH_OBJ_R                                      ~10     'prawe'
         16        ASSIGN                                                   !1, ~10
   22    17    >   INIT_METHOD_CALL                                         !1, 'dekoduj_znak'
         18        INIT_FCALL                                               'array_slice'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 1
         21        DO_ICALL                                         $12     
         22        SEND_VAR_NO_REF_EX                                       $12
         23        DO_FCALL                                      0  $13     
         24      > RETURN                                                   $13
   23    25*     > RETURN                                                   null

End of function dekoduj_znak

Function dekoduj:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  dekoduj
number of ops:  23
compiled vars:  !0 = $bity, !1 = $odkodowany_znak, !2 = $znak, !3 = $nowebity, !4 = $dekodowanareszta, !5 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   25     1        IS_EQUAL                                                 !0, <array>
          2      > JMPZ                                                     ~6, ->4
   26     3    > > JMP                                                      ->22
   29     4    >   INIT_FCALL_BY_NAME                                       'dekoduj_znak'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !1, $7
   30     8        FETCH_DIM_R                                      ~9      !1, 0
          9        ASSIGN                                                   !2, ~9
   31    10        FETCH_DIM_R                                      ~11     !1, 1
         11        ASSIGN                                                   !3, ~11
   32    12        INIT_METHOD_CALL                                         'dekoduj'
         13        SEND_VAR_EX                                              !3
         14        DO_FCALL                                      0  $13     
         15        ASSIGN                                                   !4, $13
   33    16        INIT_FCALL                                               'array_merge'
         17        INIT_ARRAY                                       ~15     !5
         18        SEND_VAL                                                 ~15
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                         $16     
         21      > RETURN                                                   $16
   35    22    > > RETURN                                                   null

End of function dekoduj

End of class Lisc.

Class Rozgalezione:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  __construct
number of ops:  13
compiled vars:  !0 = $podDrzewo_lewe, !1 = $podDrzewo_prawe, !2 = $z, !3 = $w
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   54     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   55     4        ASSIGN_OBJ                                               'lewe'
          5        OP_DATA                                                  !0
   56     6        ASSIGN_OBJ                                               'prawe'
          7        OP_DATA                                                  !1
   57     8        ASSIGN_OBJ                                               'znaki'
          9        OP_DATA                                                  !2
   58    10        ASSIGN_OBJ                                               'waga'
         11        OP_DATA                                                  !3
   59    12      > RETURN                                                   null

End of function __construct

Function nowe_drzewo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  nowe_Drzewo
number of ops:  18
compiled vars:  !0 = $prawe, !1 = $nowawaga, !2 = $noweznaki
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_R                                      ~3      'waga'
          2        FETCH_OBJ_R                                      ~4      !0, 'waga'
          3        ADD                                              ~5      ~3, ~4
          4        ASSIGN                                                   !1, ~5
   10     5        FETCH_OBJ_R                                      ~7      'znaki'
          6        FETCH_OBJ_R                                      ~8      !0, 'znaki'
          7        ADD                                              ~9      ~7, ~8
          8        ASSIGN                                                   !2, ~9
   11     9        NEW                                              $11     'Rozgalezione'
         10        FETCH_THIS                                       $12     
         11        SEND_VAR_EX                                              $12
         12        SEND_VAR_EX                                              !0
         13        SEND_VAR_EX                                              !2
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
         16      > RETURN                                                   $11
   12    17*     > RETURN                                                   null

End of function nowe_drzewo

Function dekoduj_znak:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uFJQs
function name:  dekoduj_znak
number of ops:  26
compiled vars:  !0 = $bity, !1 = $nowedrzewo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        FETCH_THIS         

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.49 ms | 1422 KiB | 20 Q