1.2.1076. Set Class Remote Definition With Global

Links method call to its definition, thanks to the global definition. The link is DEFINITION.

<?php

class x {
    public function bar() {    }
}

global $a;
$a = new X;

function foo() {
    global $a;

    // This links to class x, method bar(), thanks to global.
    return $a->bar();
}

?>

1.2.1076.1. Specs

Short name

Complete/SetClassRemoteDefinitionWithGlobal

Rulesets

All, Changed Behavior, NoDoc

Exakat since

1.9.3

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

Very high

Available in

Entreprise Edition, Exakat Cloud