search

Home  >  Q&A  >  body text

What does extends followed by \XXX mean in php?

for example:

class SendSmsRequest extends \RpcAcsRequest{}

What does \ here mean?

黄舟黄舟2706 days ago957

reply all(2)I'll reply

  • 黄舟

    黄舟2017-07-03 11:42:20

    The meaning of top-level namespace.

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

    reply
    0
  • ringa_lee

    ringa_lee2017-07-03 11:42:20

    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...

    reply
    0
  • Cancelreply