Is it possible to create a global namespace alias in PHP or does the alias
have to be defined in EVERY file that I use? Here is an example:
file: main.php
?php
use \this\is\my\custom\namespace\Item as nsItem;
?
file: index.php
?php
require_once “main.php”;
// Attempt to use namespace
Is it possible to create a global namespace alias in PHP or does the alias
have to be defined in EVERY file that I use? Here is an example:
file: main.php
?php
use \this\is\my\custom\namespace\Item as nsItem;
?
file: index.php
?php
require_once “main.php”;
// Attempt to use namespace
2 matches
Mail list logo