3v4l.org

run code in 500+ 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(string $doesntFollowLsp) { } } class Child extends Example { function execute(string $doesntFollowLsp) {} }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RZB2K
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/RZB2K
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/RZB2K
function name:  execute
number of ops:  2
compiled vars:  !0 = $doesntFollowLsp
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   RECV                                                 !0      
   18     1      > 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/RZB2K
function name:  execute
number of ops:  2
compiled vars:  !0 = $doesntFollowLsp
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   22     0  E >   RECV                                                 !0      
          1      > RETURN                                                       null

End of function execute

End of class Child.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.5 ms | 1926 KiB | 13 Q