3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); interface SafeC { /** @throws void */ function get(): null; } class C { /** * @throws \Exception */ function get(): int { return random_int(0, 2) > 0 ? 1 : throw new \Exception("oops"); } } class CSafe1 extends C implements SafeC {}; class CSafe2 extends C implements SafeC { function get(): never { throw new \Exception("oops"); } };

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
164.95 ms | 3379 KiB | 11 Q