E0046 reports request-controlled values that reach loops, allocation sinks, or callees without a bound. Cardinality is separate from taint: a value may be tainted without controlling collection size, and an input-controlled collection may contain ordinary strings.
$_GET, $_POST, $_REQUEST, $_COOKIE, and $_FILES$_SERVER keys such as HTTP_*, REQUEST_*,
PHP_AUTH_*, QUERY_STRING, and PATH_INFO; iterating the whole
$_SERVER array is treated as server metadata$argv when include_cli_input is enabledfilter_input(), apache_request_headers(), and
getallheaders()readline() when include_cli_input is enabledfile_get_contents('php://input')input, query, post, get, all,
json, file, cookie, header, or paramstr_repeat(),
range(), array_fill(), array_pad(), str_split(), explode(), and
preg_split()E0046 findings identify the source, such as $_GET or php://input, and the
sink. They do not claim that the input is malicious; they identify a missing
bound or validation step.
Input cardinality is tracked with a conservative taint-and-size model, not with full PHP type inference. The following can cause missed or additional findings:
include_cli_input: true when the
application processes command-line arguments$_SERVER iteration are treated as
trusted server metadata, not request cardinalityrules:
E0046:
runtime_threshold: quadratic
heap_alloc_threshold: quadratic
retained_element_bytes: 32
report_input_cardinality: true
include_cli_input: false
max_findings_per_function: 20
Set report_input_cardinality: false to suppress E0046 findings while keeping
E0044 and E0045 active. max_findings_per_function limits duplicate findings in
one function body.