Skip to content

Files

Latest commit

 

History

History
21 lines (14 loc) · 977 Bytes

PHPCompatibility.FunctionUse.ArgumentFunctionsUsage.md

File metadata and controls

21 lines (14 loc) · 977 Bytes

Pattern: Use of func_get_args()/func_get_arg()/func_num_args() in invalid context

Issue: -

Description

Detects usage of func_get_args(), func_get_arg() and func_num_args() in invalid context.

Checks for:

  • Prior to PHP 5.3, these functions could not be used as a function call parameter.
  • Calling these functions from the outermost scope of a file which has been included by calling include or require from within a function in the calling file, worked prior to PHP 5.3. As of PHP 5.3, this will generate a warning and will always return false/-1. If the file was called directly or included in the global scope, calls to these functions would already generate a warning prior to PHP 5.3.

PHP version 5.3

Further Reading