1.2.1432. Wrong Argument Name With PHP Function

The name of the argument provided is not a valid parameter name for that PHP native function or method.

This analysis may be configured with extra PHP extensions or external packages.

<?php

// those are the valid names
strcmp(string1: 'a', string2: 'b');

// those are not the valid names
strcmp(string: 'a', stringToo: 'b');

?>

See also Unknown Parameter Name.

1.2.1432.1. Suggestions

  • Use the correct parameter name

  • Remove all the parameter names from the call

  • Create a relay function with the correct parameter names

1.2.1432.2. Specs

Short name

Functions/WrongArgumentNameWithPhpFunction

Rulesets

All, Analyze, CI-checks, IsExt, IsPHP, IsStub

Exakat since

2.2.3

PHP Version

With PHP 8.0 and more recent

Severity

Major

Time To Fix

Instant (5 mins)

Precision

High

Features

named-parameter

Available in

Entreprise Edition, Exakat Cloud