3v4l.org

run code in 500+ PHP versions simultaneously
<?php #[Attribute(Attribute::TARGET_CLASS)] class AttributeForClasses { } #[NonexistentAttribute] #[AttributeForClasses] function doFoo(): void { } // uncomment for errors /*$r = new ReflectionFunction('doFoo'); foreach ($r->getAttributes() as $ra) { try { $ra->newInstance(); } catch (\Throwable $e) { echo $e->getMessage() . "\n"; } }*/
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pmai6
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   23     0  E > > RETURN                                                       1

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

End of function dofoo

Class AttributeForClasses: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.18 ms | 1360 KiB | 13 Q