3v4l.org

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

Class A:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZvPjN
function name:  test
number of ops:  4
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      1
          1        RECV_INIT                                        !1      2
    7     2        ECHO                                                     'A'
    8     3      > RETURN                                                   null

End of function test

Function testpublic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZvPjN
function name:  testPublic
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_METHOD_CALL                                         'test'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 2
          3        DO_FCALL                                      0          
   13     4      > RETURN                                                   null

End of function testpublic

End of class A.

Class B:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZvPjN
function name:  test
number of ops:  5
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV_INIT                                        !0      1
          1        RECV_INIT                                        !1      2
          2        RECV_INIT                                        !2      3
   20     3        ECHO                                                     'B'
   21     4      > RETURN                                                   null

End of function test

Function testpublic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZvPjN
function name:  testPublic
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_METHOD_CALL                                         'test'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 2
          3        DO_FCALL                                      0          
   13     4      > RETURN                                                   null

End of function testpublic

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.08 ms | 940 KiB | 14 Q