Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

PHP 8 Attributes

#[Attribute]
class ListensTo
{
    public string $event;

    public function __construct(string $event)
    {
        $this->event = $event;
    }
}
Source by front-line-php.com #
 
PREVIOUS NEXT
Tagged: #PHP #Attributes
ADD COMMENT
Topic
Name
5+3 =