1.2.785. New Order

Order in which new calls must be called. When a class uses another class type in its constructor, this means the second class must be instantiated before creating the first. This creates an order for classes.

<?php

class x {}

// class Y has precedence over class X, as it needs to be called first to get to X
class y {
    function foo() {
        return new x();
    }
}


?>

1.2.785.1. Specs

Short name

Dump/NewOrder

Rulesets

All, CE, Changed Behavior, Dump

Exakat since

2.0.2

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

Very high

Features

new

Available in

Entreprise Edition, Community Edition, Exakat Cloud