3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Brands { public function create_brand_table(): void { echo __FUNCTION__, PHP_EOL; } public function delete_brand_table(): void { echo __FUNCTION__, PHP_EOL; } } class TablesManager { private $brands; public function __construct(Brands $brands) { $this->brands = $brands; } public function create_tables(): void { $this->brands->create_brand_table(); } public function delete_tables(): void { $this->brands->delete_brand_table(); } } $brands = new Brands(); $tables_manager = new TablesManager($brands); $tables_manager->create_tables(); $tables_manager->delete_tables();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iTmY6
function name:  (null)
number of ops:  12
compiled vars:  !0 = $brands, !1 = $tables_manager
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   NEW                                              $2      'Brands'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   34     3        NEW                                              $5      'TablesManager'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   35     7        INIT_METHOD_CALL                                         !1, 'create_tables'
          8        DO_FCALL                                      0          
   36     9        INIT_METHOD_CALL                                         !1, 'delete_tables'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Brands:
Function create_brand_table:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iTmY6
function name:  create_brand_table
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'create_brand_table'
          1        ECHO                                                     '%0A'
    7     2      > RETURN                                                   null

End of function create_brand_table

Function delete_brand_table:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iTmY6
function name:  delete_brand_table
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'delete_brand_table'
          1        ECHO                                                     '%0A'
   10     2      > RETURN                                                   null

End of function delete_brand_table

End of class Brands.

Class TablesManager:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iTmY6
function name:  __construct
number of ops:  4
compiled vars:  !0 = $brands
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1        ASSIGN_OBJ                                               'brands'
          2        OP_DATA                                                  !0
   20     3      > RETURN                                                   null

End of function __construct

Function create_tables:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iTmY6
function name:  create_tables
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   FETCH_OBJ_R                                      ~0      'brands'
          1        INIT_METHOD_CALL                                         ~0, 'create_brand_table'
          2        DO_FCALL                                      0          
   25     3      > RETURN                                                   null

End of function create_tables

Function delete_tables:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iTmY6
function name:  delete_tables
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   FETCH_OBJ_R                                      ~0      'brands'
          1        INIT_METHOD_CALL                                         ~0, 'delete_brand_table'
          2        DO_FCALL                                      0          
   30     3      > RETURN                                                   null

End of function delete_tables

End of class TablesManager.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.48 ms | 1403 KiB | 13 Q