3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait x { public function bar(){ echo "a"; } } trait y { abstract protected function bar(); } abstract class foo { use x; } class baz extends foo { use y; } $b = new baz; $b->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O4Yp6
function name:  (null)
number of ops:  8
compiled vars:  !0 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   DECLARE_CLASS                                                'foo'
   19     1        DECLARE_CLASS                                                'baz', 'foo'
   24     2        NEW                                                  $1      'baz'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $1
   25     5        INIT_METHOD_CALL                                             !0, 'bar'
          6        DO_FCALL                                          0          
          7      > RETURN                                                       1

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

End of function bar

End of class x.

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

End of function bar

End of class y.

Class foo: [no user functions]
Class baz: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
125.29 ms | 474 KiB | 7 Q