3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { private $first_name; private $last_name; private $gender; private $age; public function __construct($a, $b, $c, $d = null) { $this->first_name = $a; $this->last_name = $b; $this->gender = $c; $this->age = $d. PHP_EOL; //print 'Parent: ' . $a . $b . $c . $d . PHP_EOL; } public function getFirstName(){ return $this->first_name; } } class ChildClass extends ParentClass { public function __construct() { parent::__construct(1, 9, 3, 7); } } $child = new ChildClass(); echo "<br />"; $child->getFirstName();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g0vkY
function name:  (null)
number of ops:  7
compiled vars:  !0 = $child
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'ChildClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3        ECHO                                                     '%3Cbr+%2F%3E'
   28     4        INIT_METHOD_CALL                                         !0, 'getFirstName'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class ParentClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g0vkY
function name:  __construct
number of ops:  14
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV_INIT                                        !3      null
    9     4        ASSIGN_OBJ                                               'first_name'
          5        OP_DATA                                                  !0
   10     6        ASSIGN_OBJ                                               'last_name'
          7        OP_DATA                                                  !1
   11     8        ASSIGN_OBJ                                               'gender'
          9        OP_DATA                                                  !2
   12    10        CONCAT                                           ~8      !3, '%0A'
         11        ASSIGN_OBJ                                               'age'
         12        OP_DATA                                                  ~8
   14    13      > RETURN                                                   null

End of function __construct

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

End of function getfirstname

End of class ParentClass.

Class ChildClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g0vkY
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        SEND_VAL_EX                                              1
          2        SEND_VAL_EX                                              9
          3        SEND_VAL_EX                                              3
          4        SEND_VAL_EX                                              7
          5        DO_FCALL                                      0          
   23     6      > RETURN                                                   null

End of function __construct

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

End of function getfirstname

End of class ChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.79 ms | 1399 KiB | 13 Q