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 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) { $table_str.= '<tr>'; $table_str.='<td>'.$tab -> $atr1.'</td><td>'.$tab -> $atr2.'</td><td>'.$tab -> $atr3.'</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/0kMNd
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   ECHO                                                     '%3Chtml%3E%0A%3Chead%3E%0A%3Ctitle%3EPage+Title%3C%2Ftitle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%0A+'
   46     1        INIT_FCALL                                               'tabulka'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   48     4        ECHO                                                     '%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   50     5      > RETURN                                                   1

Function napln:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0kMNd
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
-------------------------------------------------------------------------------------
   18     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
   19     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
   20    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
   22    18        INIT_ARRAY                                       ~13     !0
         19        ADD_ARRAY_ELEMENT                                ~13     !1
         20        ADD_ARRAY_ELEMENT                                ~13     !2
         21        ASSIGN                                                   !3, ~13
   23    22      > RETURN                                                   !3
   24    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 = 19
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/0kMNd
function name:  tabulka
number of ops:  23
compiled vars:  !0 = $table_str, !1 = $table, !2 = $tab, !3 = $atr1, !4 = $atr2, !5 = $atr3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   ASSIGN                                                   !0, '%3Ctable%3E'
   28     1        INIT_FCALL                                               'napln'
          2        DO_FCALL                                      0  $7      
          3        ASSIGN                                                   !1, $7
   29     4      > FE_RESET_R                                       $9      !1, ->19
          5    > > FE_FETCH_R                                               $9, !2, ->19
   31     6    >   ASSIGN_OP                                     8          !0, '%3Ctr%3E'
   32     7        FETCH_OBJ_R                                      ~11     !2, !3
          8        CONCAT                                           ~12     '%3Ctd%3E', ~11
          9        CONCAT                                           ~13     ~12, '%3C%2Ftd%3E%3Ctd%3E'
         10        FETCH_OBJ_R                                      ~14     !2, !4
         11        CONCAT                                           ~15     ~13, ~14
         12        CONCAT                                           ~16     ~15, '%3C%2Ftd%3E%3Ctd%3E'
         13        FETCH_OBJ_R                                      ~17     !2, !5
         14        CONCAT                                           ~18     ~16, ~17
         15        CONCAT                                           ~19     ~18, '%3C%2Ftd%3E'
         16        ASSIGN_OP                                     8          !0, ~19
   33    17        ASSIGN_OP                                     8          !0, '%3C%2Ftr%3E'
   29    18      > JMP                                                      ->5
         19    >   FE_FREE                                                  $9
   35    20        ASSIGN_OP                                     8          !0, '%3C%2Ftable%3E'
   36    21      > RETURN                                                   !0
   37    22*     > 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/0kMNd
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

End of class Car.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.95 ms | 1403 KiB | 15 Q