3v4l.org

run code in 300+ PHP versions simultaneously
<?php class WithFinalPrivate { public function test() { $this->privateNonOverloadable(); $this->nonFinal(); self::privateNonOverloadable(); self::nonFinal(); } final private function privateNonOverloadable() { echo __CLASS__, '::', __FUNCTION__, PHP_EOL; } private function nonFinal() { echo __CLASS__, '::', __FUNCTION__, PHP_EOL; } } class Child extends WithFinalPrivate { public function childTest() { $this->privateNonOverloadable(); $this->nonFinal(); self::privateNonOverloadable(); self::nonFinal(); } private function privateNonOverloadable() { echo __CLASS__, '::', __FUNCTION__, PHP_EOL; } private function nonFinal() { echo __CLASS__, '::', __FUNCTION__, PHP_EOL; } } $obj = new Child; $obj->childTest(); $obj->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/68teR
function name:  (null)
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   NEW                                              $1      'Child'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   36     3        INIT_METHOD_CALL                                         !0, 'childTest'
          4        DO_FCALL                                      0          
   37     5        INIT_METHOD_CALL                                         !0, 'test'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class WithFinalPrivate:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/68teR
function name:  test
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_METHOD_CALL                                         'privateNonOverloadable'
          1        DO_FCALL                                      0          
    7     2        INIT_METHOD_CALL                                         'nonFinal'
          3        DO_FCALL                                      0          
    8     4        INIT_STATIC_METHOD_CALL                                  'privateNonOverloadable'
          5        DO_FCALL                                      0          
    9     6        INIT_STATIC_METHOD_CALL                                  'nonFinal'
          7        DO_FCALL                                      0          
   10     8      > RETURN                                                   null

End of function test

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

End of function privatenonoverloadable

Function nonfinal:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/68teR
function name:  nonFinal
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'WithFinalPrivate'
          1        ECHO                                                     '%3A%3A'
          2        ECHO                                                     'nonFinal'
          3        ECHO                                                     '%0A'
   16     4      > RETURN                                                   null

End of function nonfinal

End of class WithFinalPrivate.

Class Child:
Function childtest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/68teR
function name:  childTest
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_METHOD_CALL                                         'privateNonOverloadable'
          1        DO_FCALL                                      0          
   23     2        INIT_METHOD_CALL                                         'nonFinal'
          3        DO_FCALL                                      0          
   24     4        INIT_STATIC_METHOD_CALL                                  'privateNonOverloadable'
          5        DO_FCALL                                      0          
   25     6        INIT_STATIC_METHOD_CALL                                  'nonFinal'
          7        DO_FCALL                                      0          
   26     8      > RETURN                                                   null

End of function childtest

Function privatenonoverloadable:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/68teR
function name:  privateNonOverloadable
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   ECHO                                                     'Child'
          1        ECHO                                                     '%3A%3A'
          2        ECHO                                                     'privateNonOverloadable'
          3        ECHO                                                     '%0A'
   29     4      > RETURN                                                   null

End of function privatenonoverloadable

Function nonfinal:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/68teR
function name:  nonFinal
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   ECHO                                                     'Child'
          1        ECHO                                                     '%3A%3A'
          2        ECHO                                                     'nonFinal'
          3        ECHO                                                     '%0A'
   32     4      > RETURN                                                   null

End of function nonfinal

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

End of function test

End of class Child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.28 ms | 1000 KiB | 13 Q