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:
50.47 ms | 1481 KiB | 5 Q