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 -> $atr1</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/7V8fH
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   ECHO                                                     '%3Chtml%3E%0A%3Chead%3E%0A%3Ctitle%3EPage+Title%3C%2Ftitle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%0A+'
   48     1        INIT_FCALL                                               'tabulka'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   50     4        ECHO                                                     '%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   52     5      > RETURN                                                   1

Function napln:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7V8fH
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 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/7V8fH
function name:  tabulka
number of ops:  14
compiled vars:  !0 = $table_str, !1 = $table, !2 = $tab
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  $4      
          3        ASSIGN                                                   !1, $4
   29     4      > FE_RESET_R                                       $6      !1, ->10
          5    > > FE_FETCH_R                                               $6, !2, ->10
   31     6    >   ASSIGN_OP                                     8          !0, '%3Ctr%3E'
   32     7        ASSIGN_OP                                     8          !0, '+%3Ctd%3E%24tab+-%3E+%24atr1%3C%2Ftd%3E%0A%09%09++++++++++++++%3Ctd%3E%24tab+-%3E+%24atr1%3C%2Ftd%3E%0A%09%09%09%09%09++%3Ctd%3E%24tab+-%3E+%24atr3%3C%2Ftd%3E'
   35     8        ASSIGN_OP                                     8          !0, '%3C%2Ftr%3E'
   29     9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $6
   37    11        ASSIGN_OP                                     8          !0, '%3C%2Ftable%3E'
   38    12      > RETURN                                                   !0
   39    13*     > 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/7V8fH
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:
154.24 ms | 948 KiB | 16 Q