1.2.393. Dynamic Methodcall

Dynamic calls to class methods.

<?php

class x {
    static public function foo() {}
           public function bar() {}
}

$staticmethod = 'foo';
// dynamic static method call to x::foo()
x::$staticmethod();

$method = 'bar';
// dynamic method call to bar()
$object = new x();
$object->$method();

?>

1.2.393.1. Specs

Short name

Classes/DynamicMethodCall

Rulesets

All, Appinfo, CE

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

High

Features

dynamic-call, method

Available in

Entreprise Edition, Community Edition, Exakat Cloud