1.2.488. Function With Dynamic Code

Mark a method, function, closure <https://www.php.net/`closure>`_, arrow function that includes dynamic code.

Dynamic code is based on usage of include(), require(), require_once() and include(), extract() and eval().

This is a support rule, to help omits some special cases in other rules.

<?php

// Function with dynamic code
function foo($x) {
    include $x;
    return $y;
}

// Static coe Function
function foo($x) {
    return $y + $x;
}

?>

1.2.488.1. Specs

Short name

Functions/DynamicCode

Rulesets

All, CE, Changed Behavior

Exakat since

2.1.8

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

dynamic-call

Available in

Entreprise Edition, Community Edition, Exakat Cloud