3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); /** * @param array<string,mixed> $a */ function f(array $headers): void { foreach ($headers as $name => $value) { if (str_starts_with($name, 'x-')) { // ... } } } f(['0' => 'hello php']);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
168.03 ms | 3421 KiB | 12 Q