3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Osoba{ private $meno; private $priezvisko; private $vek; function __construct($meno,$priezvisko,$vek){ $this->meno = $meno; $this->priezvisko = $priezvisko; $this->vek = $vek; } function get_meno(){ return $this->meno; } function get_priezvisko(){ return $this->priezvisko; } function get_vek(){ return $this->vek; } } function vytvor(){ $a= new Osoba("J","B",30); $b= new Osoba("V","E",12); $c= new Osoba("S","N",78); $d= new Osoba("Q","W",6); $pole=array($a,$b,$c,$d); return $pole; } function vytvorTabulku(){ vytvor(); $table .= '<table>'; foreach($pole as $osoba){ $table .= '<tr>'; $table .= '<td>'.$osoba->get_meno().'</td><td>'.$osoba->get_priezvisko().'</td><td>'.$osoba->get_vek().'</td>'; $table .= '</tr>'; } $table .= '</table>'; return $table; } ?> <!DOCTYPE html> <html> <head> <title>cviko</title> </head> <body> <table> <tr> <td><a href="?order=name">meno</a></td> <td><a href="?order=priezvisko">priezvisko</a></td> <td><a href="?order=vek">vek</a></td> </tr> <?php echo vytvorTabulku(); ?> </table> </body> </html>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o3GO5
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   46     0  E >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%3Chead%3E%0A%3Ctitle%3Ecviko%3C%2Ftitle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%0A%3Ctable%3E%0A+++%3Ctr%3E%0A++++++++%3Ctd%3E%3Ca+href%3D%22%3Forder%3Dname%22%3Emeno%3C%2Fa%3E%3C%2Ftd%3E%0A++++++++%3Ctd%3E%3Ca+href%3D%22%3Forder%3Dpriezvisko%22%3Epriezvisko%3C%2Fa%3E%3C%2Ftd%3E%0A%09%09%3Ctd%3E%3Ca+href%3D%22%3Forder%3Dvek%22%3Evek%3C%2Fa%3E%3C%2Ftd%3E%0A++++%3C%2Ftr%3E%0A%09'
   61     1        INIT_FCALL                                               'vytvortabulku'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   63     4        ECHO                                                     '%09%0A%09%0A%09%0A%09%0A%3C%2Ftable%3E%0A%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   70     5      > RETURN                                                   1

Function vytvor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o3GO5
function name:  vytvor
number of ops:  31
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d, !4 = $pole
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $5      'Osoba'
          1        SEND_VAL_EX                                              'J'
          2        SEND_VAL_EX                                              'B'
          3        SEND_VAL_EX                                              30
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $5
   28     6        NEW                                              $8      'Osoba'
          7        SEND_VAL_EX                                              'V'
          8        SEND_VAL_EX                                              'E'
          9        SEND_VAL_EX                                              12
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $8
   29    12        NEW                                              $11     'Osoba'
         13        SEND_VAL_EX                                              'S'
         14        SEND_VAL_EX                                              'N'
         15        SEND_VAL_EX                                              78
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !2, $11
   30    18        NEW                                              $14     'Osoba'
         19        SEND_VAL_EX                                              'Q'
         20        SEND_VAL_EX                                              'W'
         21        SEND_VAL_EX                                              6
         22        DO_FCALL                                      0          
         23        ASSIGN                                                   !3, $14
   31    24        INIT_ARRAY                                       ~17     !0
         25        ADD_ARRAY_ELEMENT                                ~17     !1
         26        ADD_ARRAY_ELEMENT                                ~17     !2
         27        ADD_ARRAY_ELEMENT                                ~17     !3
         28        ASSIGN                                                   !4, ~17
   32    29      > RETURN                                                   !4
   33    30*     > RETURN                                                   null

End of function vytvor

Function vytvortabulku:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 21
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/o3GO5
function name:  vytvorTabulku
number of ops:  25
compiled vars:  !0 = $table, !1 = $pole, !2 = $osoba
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   INIT_FCALL                                               'vytvor'
          1        DO_FCALL                                      0          
   36     2        ASSIGN_OP                                     8          !0, '%3Ctable%3E'
   37     3      > FE_RESET_R                                       $5      !1, ->21
          4    > > FE_FETCH_R                                               $5, !2, ->21
   38     5    >   ASSIGN_OP                                     8          !0, '%3Ctr%3E'
   39     6        INIT_METHOD_CALL                                         !2, 'get_meno'
          7        DO_FCALL                                      0  $7      
          8        CONCAT                                           ~8      '%3Ctd%3E', $7
          9        CONCAT                                           ~9      ~8, '%3C%2Ftd%3E%3Ctd%3E'
         10        INIT_METHOD_CALL                                         !2, 'get_priezvisko'
         11        DO_FCALL                                      0  $10     
         12        CONCAT                                           ~11     ~9, $10
         13        CONCAT                                           ~12     ~11, '%3C%2Ftd%3E%3Ctd%3E'
         14        INIT_METHOD_CALL                                         !2, 'get_vek'
         15        DO_FCALL                                      0  $13     
         16        CONCAT                                           ~14     ~12, $13
         17        CONCAT                                           ~15     ~14, '%3C%2Ftd%3E'
         18        ASSIGN_OP                                     8          !0, ~15
   40    19        ASSIGN_OP                                     8          !0, '%3C%2Ftr%3E'
   37    20      > JMP                                                      ->4
         21    >   FE_FREE                                                  $5
   42    22        ASSIGN_OP                                     8          !0, '%3C%2Ftable%3E'
   43    23      > RETURN                                                   !0
   44    24*     > RETURN                                                   null

End of function vytvortabulku

Class Osoba:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o3GO5
function name:  __construct
number of ops:  10
compiled vars:  !0 = $meno, !1 = $priezvisko, !2 = $vek
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    8     3        ASSIGN_OBJ                                               'meno'
          4        OP_DATA                                                  !0
    9     5        ASSIGN_OBJ                                               'priezvisko'
          6        OP_DATA                                                  !1
   10     7        ASSIGN_OBJ                                               'vek'
          8        OP_DATA                                                  !2
   11     9      > RETURN                                                   null

End of function __construct

Function get_meno:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o3GO5
function name:  get_meno
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'meno'
          1      > RETURN                                                   ~0
   15     2*     > RETURN                                                   null

End of function get_meno

Function get_priezvisko:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o3GO5
function name:  get_priezvisko
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_OBJ_R                                      ~0      'priezvisko'
          1      > RETURN                                                   ~0
   19     2*     > RETURN                                                   null

End of function get_priezvisko

Function get_vek:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o3GO5
function name:  get_vek
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   FETCH_OBJ_R                                      ~0      'vek'
          1      > RETURN                                                   ~0
   23     2*     > RETURN                                                   null

End of function get_vek

End of class Osoba.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.05 ms | 1407 KiB | 15 Q