Home > Backend Development > PHP Tutorial > PHP namespace example description_PHP tutorial

PHP namespace example description_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 15:32:36
Original
957 people have browsed it

Copy code The code is as follows:

namespace bakbaba;
function bab(){
echo "bi";
}
namespace kkk;
function k1(){
echo "k1";
}
bakbababab();//Use other namespaces under the kkk namespace, please note The previous
use bakbaba as b;//is still in the kkk namespace, but the following method is also correct when using an alias
#use bakbaba as b;//you don’t need to use the number
bbab in the front ();//When using a namespace under an alias, there should be no number in front of it
k1();//No error is reported when calling this function, indicating that use does not affect the current namespace

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322793.htmlTechArticleCopy the code as follows: namespace bakbaba; function bab(){ echo "bi"; } namespace kkk; function k1 (){ echo "k1"; } bakbababab();//Use other namespaces under the kkk namespace...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template