1.2.1071. Set Array Class Definition

Link arrays with their related method definition.

PHP accepts an array structure such as [class, method], or [$object, method] as a valid method callback. This analysis builds such relations, whenever they are static.

<?php

class x {
    public function foo() {}
}

// designate the foo method in the x class
$f = [\x, 'foo'];

array_

?>

See also class.

1.2.1071.1. Specs

Short name

Complete/SetArrayClassDefinition

Rulesets

All, CE, Changed Behavior, NoDoc

Exakat since

1.9.3

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

class

Available in

Entreprise Edition, Community Edition, Exakat Cloud