1.2.1040. Relay Constant

A relay constant is a constant that gives another name to an existing constant. It is simply build by giving the value of another constant.

Relay constants acts as alias. They also add an extra layer between a constant or a literal and its usage.

<?php

class A {
     const A = 1;
}

class B {
     // this constant is actually the A::A constant
     const B = A::A;
}

?>

1.2.1040.1. Connex PHP features

1.2.1040.1.1. Specs

Short name

Constants/RelayConstant

Rulesets

All, Changed Behavior, Inventory

Exakat since

2.6.7

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

Very high

Available in

Entreprise Edition, Exakat Cloud