What does extends followed by \XXX mean in php?
黄舟
黄舟 2017-07-03 11:40:20
0
2
969

for example:

class SendSmsRequest extends \RpcAcsRequest{}

What does \ here mean?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
黄舟

The meaning of top-level namespace.

You can take a look at the php documentation. http://php.net/manual/en/lang...

ringa_lee

In PHP, the first few slashes of xxxxxxxxxxxx represent the namespace, and the last one xxxx represents the variables, classes, etc. in the namespace
The first slash represents the top-level domain name space, which can be omitted, so it is generally For variables or classes in the top-level domain name space, write directly $xxx or XXXX.

PHP documentation:
Global namespace: http://php.net/manual/en/lang...
Namespace: http://php.net/manual/en/lang...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template