3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Products{ // Properties protected $_title; // Methods public function __construct($title){ $this->_title = $title; } public function getTitle(){ return $this->_title; } } class Order extends Products{ } class OrderDomestic extends Products{ } class OrderInternational extends Products{ public function __construct($title){ parent::__construct($title); } } $OI = new OrderInternational('DVD Blue'); echo $OI->getTitle(); // DVD Blue class OrderInternationalFunky extends OrderInternational{ public function __construct($title){ parent::__construct($title); } } $OI = new OrderInternationalFunky('DVD Red'); echo $OI->getTitle(); // DVD Red class OrderInternationalDoubleFunky extends OrderInternational{ public function __construct($title){ parent::__construct($title); } } $OI = new OrderInternationalDoubleFunky('DVD Green'); echo $OI->getTitle(); // DVD Green
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o9h4L
function name:  (null)
number of ops:  22
compiled vars:  !0 = $OI
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   NEW                                              $1      'OrderInternational'
          1        SEND_VAL_EX                                              'DVD+Blue'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   34     4        INIT_METHOD_CALL                                         !0, 'getTitle'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
   43     7        NEW                                              $5      'OrderInternationalFunky'
          8        SEND_VAL_EX                                              'DVD+Red'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !0, $5
   44    11        INIT_METHOD_CALL                                         !0, 'getTitle'
         12        DO_FCALL                                      0  $8      
         13        ECHO                                                     $8
   53    14        NEW                                              $9      'OrderInternationalDoubleFunky'
         15        SEND_VAL_EX                                              'DVD+Green'
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !0, $9
   54    18        INIT_METHOD_CALL                                         !0, 'getTitle'
         19        DO_FCALL                                      0  $12     
         20        ECHO                                                     $12
         21      > RETURN                                                   1

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

End of function __construct

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

End of function gettitle

End of class Products.

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

End of function __construct

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

End of function gettitle

End of class Order.

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

End of function __construct

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

End of function gettitle

End of class OrderDomestic.

Class OrderInternational:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o9h4L
function name:  __construct
number of ops:  5
compiled vars:  !0 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
   28     1        INIT_STATIC_METHOD_CALL                                  
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   29     4      > RETURN                                                   null

End of function __construct

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

End of function gettitle

End of class OrderInternational.

Class OrderInternationalFunky:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o9h4L
function name:  __construct
number of ops:  5
compiled vars:  !0 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
   39     1        INIT_STATIC_METHOD_CALL                                  
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   40     4      > RETURN                                                   null

End of function __construct

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

End of function gettitle

End of class OrderInternationalFunky.

Class OrderInternationalDoubleFunky:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o9h4L
function name:  __construct
number of ops:  5
compiled vars:  !0 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   48     0  E >   RECV                                             !0      
   49     1        INIT_STATIC_METHOD_CALL                                  
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   50     4      > RETURN                                                   null

End of function __construct

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

End of function gettitle

End of class OrderInternationalDoubleFunky.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.94 ms | 1403 KiB | 13 Q