3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __construct( private int $v ) {} public function f () { echo $this->v, PHP_EOL; } } class B extends A { public function __construct( $v, private string $v2 ) { parent::__construct($v); } public function f2 () { echo $this->v2, PHP_EOL; } } $i = new B(1,'2'); $i->f(); $i->f2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tea6D
function name:  (null)
number of ops:  10
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $1      'B'
          1        SEND_VAL_EX                                              1
          2        SEND_VAL_EX                                              '2'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   29     5        INIT_METHOD_CALL                                         !0, 'f'
          6        DO_FCALL                                      0          
   30     7        INIT_METHOD_CALL                                         !0, 'f2'
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

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

End of function __construct

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

End of function f

End of class A.

Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tea6D
function name:  __construct
number of ops:  8
compiled vars:  !0 = $v, !1 = $v2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        ASSIGN_OBJ                                               'v2'
          3        OP_DATA                                                  !1
   19     4        INIT_STATIC_METHOD_CALL                                  
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   20     7      > RETURN                                                   null

End of function __construct

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

End of function f2

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

End of function f

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.07 ms | 1002 KiB | 13 Q