3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public function __construct(int $one, int $two = 666) {} } class B extends A { public function __construct(string $whatever) { parent::__construct(1); } } new B('foo'); new A(2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QYsC8
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   NEW                                                  $0      'B'
          1        SEND_VAL_EX                                                  'foo'
          2        DO_FCALL                                          0          
          3        FREE                                                         $0
   14     4        NEW                                                  $2      'A'
          5        SEND_VAL_EX                                                  2
          6        DO_FCALL                                          0          
          7        FREE                                                         $2
          8      > RETURN                                                       1

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

End of function __construct

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/QYsC8
function name:  __construct
number of ops:  5
compiled vars:  !0 = $whatever
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
    9     1        INIT_STATIC_METHOD_CALL                                      
          2        SEND_VAL_EX                                                  1
          3        DO_FCALL                                          0          
   10     4      > RETURN                                                       null

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.08 ms | 1314 KiB | 12 Q