1.2.391. Dynamic Function Call

Mark a functioncall made with a variable name. This means the function is only known at execution time, since it depends on the content of the variable.

<?php

// function definition
function foo() {}

// function name is in a variable, as a string.
$var = 'foo';

// dynamic call of a function
$var();

call_user_func($var);

?>

1.2.391.1. Specs

Short name

Functions/Dynamiccall

Rulesets

All, Appinfo, CE

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

dynamic-call

Available in

Entreprise Edition, Community Edition, Exakat Cloud