I want to execute code everytime a apecific attribute is assiggned to a function.
For example:
<?php
#[Attribute]
class exampleAttribute
{
public function __construct()
{
echo "exampleAttribute called";
}
}
#[exampleAttribute()]
function exampleFunction()
{
//...
}
But in this example the echo statement is never called. How do I do this?