Skip to content

InvalidNamedArgument

A named argument does not correspond to any parameter of the callable.

<?php
function connect(string $host, int $port): void {}
connect(host: 'localhost', timeout: 30); // no parameter named 'timeout'

Use the correct parameter name or switch to a positional argument.