3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait ExampleTrait { final function execute() { } } class Example { use ExampleTrait; // Should raise an \E_FATAL with the following message: // "Cannot override final method Example::execute() in [...] on line 26" function execute() { } } class Child extends Example { function execute() {} }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fG69k
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'example'
   21     1        DECLARE_CLASS                                            'child', 'example'
   23     2      > RETURN                                                   1

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

End of function execute

End of class ExampleTrait.

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

End of function execute

End of class Example.

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

End of function execute

End of class Child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.65 ms | 1393 KiB | 13 Q