3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Car { public $atr1; public $atr2; public $atr3; function _construct($atr1,$atr2,$atr3) { $this->atr1=$atr1; $this->atr2=$atr2; $this->atr3=$atr3; } function getatr1() { return $this->atr1; } function getatr2() { return $this->atr2; } function getatr3() { return $this->atr3; } } function napln() { $obj1 = new Car('renault','modra','nieco'); $obj2 = new Car('skoda','zelena','neviem'); $obj3 = new Car('opel','cervena','cojaviem'); $pole = array($obj1, $obj2, $obj3); return $pole; } function tabulka() { $table_str='<table>'; $table=napln(); foreach($table as $tab) { echo getatr1(); $table_str.= '<tr>'; $table_str.='<td>'.$tab -> getatr1().'</td><td>'.$tab -> getatr2().'</td><td>'.$tab -> getatr3().'</td>'; $table_str.='</tr>'; } $table_str.='</table>'; return $table_str; } ?> <html> <head> <title>Page Title</title> </head> <body> <?php echo tabulka(); ?> </body> </html>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iTsu7
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   58     0  E >   ECHO                                                     '%3Chtml%3E%0A%3Chead%3E%0A%3Ctitle%3EPage+Title%3C%2Ftitle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%0A+'
   65     1        INIT_FCALL                                               'tabulka'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   67     4        ECHO                                                     '%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   69     5      > RETURN                                                   1

Function napln:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iTsu7
function name:  napln
number of ops:  24
compiled vars:  !0 = $obj1, !1 = $obj2, !2 = $obj3, !3 = $pole
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   NEW                                              $4      'Car'
          1        SEND_VAL_EX                                              'renault'
          2        SEND_VAL_EX                                              'modra'
          3        SEND_VAL_EX                                              'nieco'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $4
   36     6        NEW                                              $7      'Car'
          7        SEND_VAL_EX                                              'skoda'
          8        SEND_VAL_EX                                              'zelena'
          9        SEND_VAL_EX                                              'neviem'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $7
   37    12        NEW                                              $10     'Car'
         13        SEND_VAL_EX                                              'opel'
         14        SEND_VAL_EX                                              'cervena'
         15        SEND_VAL_EX                                              'cojaviem'
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !2, $10
   39    18        INIT_ARRAY                                       ~13     !0
         19        ADD_ARRAY_ELEMENT                                ~13     !1
         20        ADD_ARRAY_ELEMENT                                ~13     !2
         21        ASSIGN                                                   !3, ~13
   40    22      > RETURN                                                   !3
   41    23*     > RETURN                                                   null

End of function napln

Function tabulka:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 25
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 25
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/iTsu7
function name:  tabulka
number of ops:  29
compiled vars:  !0 = $table_str, !1 = $table, !2 = $tab
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   ASSIGN                                                   !0, '%3Ctable%3E'
   46     1        INIT_FCALL                                               'napln'
          2        DO_FCALL                                      0  $4      
          3        ASSIGN                                                   !1, $4
   47     4      > FE_RESET_R                                       $6      !1, ->25
          5    > > FE_FETCH_R                                               $6, !2, ->25
   49     6    >   INIT_FCALL_BY_NAME                                       'getatr1'
          7        DO_FCALL                                      0  $7      
          8        ECHO                                                     $7
   50     9        ASSIGN_OP                                     8          !0, '%3Ctr%3E'
   51    10        INIT_METHOD_CALL                                         !2, 'getatr1'
         11        DO_FCALL                                      0  $9      
         12        CONCAT                                           ~10     '%3Ctd%3E', $9
         13        CONCAT                                           ~11     ~10, '%3C%2Ftd%3E%3Ctd%3E'
         14        INIT_METHOD_CALL                                         !2, 'getatr2'
         15        DO_FCALL                                      0  $12     
         16        CONCAT                                           ~13     ~11, $12
         17        CONCAT                                           ~14     ~13, '%3C%2Ftd%3E%3Ctd%3E'
         18        INIT_METHOD_CALL                                         !2, 'getatr3'
         19        DO_FCALL                                      0  $15     
         20        CONCAT                                           ~16     ~14, $15
         21        CONCAT                                           ~17     ~16, '%3C%2Ftd%3E'
         22        ASSIGN_OP                                     8          !0, ~17
   52    23        ASSIGN_OP                                     8          !0, '%3C%2Ftr%3E'
   47    24      > JMP                                                      ->5
         25    >   FE_FREE                                                  $6
   54    26        ASSIGN_OP                                     8          !0, '%3C%2Ftable%3E'
   55    27      > RETURN                                                   !0
   56    28*     > RETURN                                                   null

End of function tabulka

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

End of function _construct

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

End of function getatr1

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

End of function getatr2

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

End of function getatr3

End of class Car.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.08 ms | 1406 KiB | 15 Q