3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $foo; public function __construct($foo) { $this->foo = $foo; } } class B extends A { private $bar; private function storeBar($bar) { $this->bar = $bar; } public function __construct($foo, $bar) { $this->storeBar($bar); // parent::__construct($foo); } } $b = new B(1, 2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KmlVg
function name:  (null)
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $1      'B'
          1        SEND_VAL_EX                                              1
          2        SEND_VAL_EX                                              2
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
          5      > RETURN                                                   1

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

End of function __construct

End of class A.

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

End of function storebar

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KmlVg
function name:  __construct
number of ops:  6
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   24     2        INIT_METHOD_CALL                                         'storeBar'
          3        SEND_VAR                                                 !1
          4        DO_FCALL                                      0          
   26     5      > RETURN                                                   null

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.24 ms | 1395 KiB | 13 Q