3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types = 1); class HelloWorld { public function __construct(private readonly string $secret, private readonly string $notSecret) { throw new \Exception('a'); } } class Bar extends HelloWorld { public function __construct(#[\SensitiveParameter] string $secret, string $notSecret) { parent::__construct($secret, $notSecret); } } echo serialize(new Bar('foo', 'bar')) . PHP_EOL;

preferences:
22.3 ms | 475 KiB | 4 Q