3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Foo { private function overload() { var_dump(__METHOD__); } } class Bar { use Foo { Foo::overload as test; } } $bar = new Bar(); $bar->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BM2F5
function name:  (null)
number of ops:  7
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   DECLARE_CLASS                                            'bar'
   22     1        NEW                                              $1      'Bar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   23     4        INIT_METHOD_CALL                                         !0, 'test'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Foo:
Function overload:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BM2F5
function name:  overload
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'Foo%3A%3Aoverload'
          2        DO_ICALL                                                 
    9     3      > RETURN                                                   null

End of function overload

End of class Foo.

Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.24 ms | 1394 KiB | 15 Q