3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types = 1); class HelloWorld { use Help; public function sayHello(DateTimeImutable $date): void { $this->attachTag(); } } trait Help { public function attachTag( string $type = self::class ): void { var_dump($type); } } $hw = new HelloWorld(); $hw->attachTag();

preferences:
54.56 ms | 1509 KiB | 5 Q