3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait WithFinalPrivate { public function test() { $this->privateNonOverloadable(); $this->nonFinal(); self::privateNonOverloadable(); self::nonFinal(); } final private function privateNonOverloadable() { echo __TRAIT__, '::', __FUNCTION__, PHP_EOL; } private function nonFinal() { echo __TRAIT__, '::', __FUNCTION__, PHP_EOL; } } class Child { use 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/VOPVj
function name:  (null)
number of ops:  9
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   DECLARE_CLASS                                            'child'
   36     1        NEW                                              $1      'Child'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   37     4        INIT_METHOD_CALL                                         !0, 'childTest'
          5        DO_FCALL                                      0          
   38     6        INIT_METHOD_CALL                                         !0, 'test'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class WithFinalPrivate:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOPVj
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/VOPVj
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/VOPVj
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/VOPVj
function name:  childTest
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_METHOD_CALL                                         'privateNonOverloadable'
          1        DO_FCALL                                      0          
   24     2        INIT_METHOD_CALL                                         'nonFinal'
          3        DO_FCALL                                      0          
   25     4        INIT_STATIC_METHOD_CALL                                  'privateNonOverloadable'
          5        DO_FCALL                                      0          
   26     6        INIT_STATIC_METHOD_CALL                                  'nonFinal'
          7        DO_FCALL                                      0          
   27     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/VOPVj
function name:  privateNonOverloadable
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   ECHO                                                     'Child'
          1        ECHO                                                     '%3A%3A'
          2        ECHO                                                     'privateNonOverloadable'
          3        ECHO                                                     '%0A'
   30     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/VOPVj
function name:  nonFinal
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   ECHO                                                     'Child'
          1        ECHO                                                     '%3A%3A'
          2        ECHO                                                     'nonFinal'
          3        ECHO                                                     '%0A'
   33     4      > RETURN                                                   null

End of function nonfinal

End of class Child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.59 ms | 1445 KiB | 13 Q