1.2.1358. Use class_alias()¶
class_alias() is a PHP features, that allows the creation of class alias, at execution time.
Those class aliases are application wide, as they are valid everywhere, yet they have a lower precedence over the use expression. This means that even when a class_alias() was called, the local use expression will have right of execution.
<?php
// static type of aliasing
use a as c;
class a {}
class_alias('a', 'b');
new b;
?>
See also class_alias.
1.2.1358.1. Connex PHP features¶
1.2.1358.1.1. Specs¶
Short name |
Php/UseClassAlias |
Rulesets |
|
Exakat since |
2.3.6 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
Very high |
Available in |