3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { public function test() { $this->testPrivate(); } private function testPrivate() { echo "Bar::testPrivate\n"; } } class Foo extends Bar { private function testPrivate() { echo "Foo::testPrivate\n"; } public function testFooScope() { $this->testPrivate(); } } class Zot extends Foo { } $myZot = new Zot(); $myZot->test(); //What would this do other than Bar::testPrivate $myZot->testFooScope();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EtJK2
function name:  (null)
number of ops:  8
compiled vars:  !0 = $myZot
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   NEW                                              $1      'Zot'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   35     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
   37     5        INIT_METHOD_CALL                                         !0, 'testFooScope'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class Bar:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EtJK2
function name:  test
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_METHOD_CALL                                         'testPrivate'
          1        DO_FCALL                                      0          
    8     2      > RETURN                                                   null

End of function test

Function testprivate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EtJK2
function name:  testPrivate
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'Bar%3A%3AtestPrivate%0A'
   13     1      > RETURN                                                   null

End of function testprivate

End of class Bar.

Class Foo:
Function testprivate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EtJK2
function name:  testPrivate
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ECHO                                                     'Foo%3A%3AtestPrivate%0A'
   21     1      > RETURN                                                   null

End of function testprivate

Function testfooscope:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EtJK2
function name:  testFooScope
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_METHOD_CALL                                         'testPrivate'
          1        DO_FCALL                                      0          
   26     2      > RETURN                                                   null

End of function testfooscope

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

End of function test

End of class Foo.

Class Zot:
Function testprivate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EtJK2
function name:  testPrivate
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ECHO                                                     'Foo%3A%3AtestPrivate%0A'
   21     1      > RETURN                                                   null

End of function testprivate

Function testfooscope:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EtJK2
function name:  testFooScope
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_METHOD_CALL                                         'testPrivate'
          1        DO_FCALL                                      0          
   26     2      > RETURN                                                   null

End of function testfooscope

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

End of function test

End of class Zot.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.86 ms | 1399 KiB | 13 Q