3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait A { public function foo() { return 'bar'; } } trait B {use A;} trait C {use A;} class Test { use A, B, C; } echo (new Test())->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nnvOK
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'b'
    9     1        DECLARE_CLASS                                            'c'
   11     2        DECLARE_CLASS                                            'test'
   16     3        NEW                                              $0      'Test'
          4        DO_FCALL                                      0          
          5        INIT_METHOD_CALL                                         $0, 'foo'
          6        DO_FCALL                                      0  $2      
          7        ECHO                                                     $2
          8      > RETURN                                                   1

Class A:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nnvOK
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   'bar'
          1*     > RETURN                                                   null

End of function foo

End of class A.

Class B: [no user functions]
Class C: [no user functions]
Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.91 ms | 1393 KiB | 13 Q