A question in the PHP manual

Source: Internet
Author: User
All use:: No.
Does this mean that this is a static method?
Or does it simply mean that there is this method in this class?


Reply to discussion (solution)

Indicates that there is this method
Most non-instantiation is not available.

Indicates that there is this method in the class, is not a static method to see the document, should most of it is not.

$memcache _obj = Memcache_connect ("localhost", 11211);/* Process Programming API */memcache_add ($memcache _obj, ' var_key ', ' Test Variable ', false, 30);/* Object-oriented Programming API */$memcache _obj->add (' Var_key ', ' Test variable ', false, 30);

Thank you all, there is a question is the class inside self and __class__ is not the same?

__class__ just the name of the class is the string
Self is a reference to a class

@ Proud Snow star Maple Moderator Trouble reply to my question: Is it a $ A? If it is, the variable is not assigned. Why not error?

Equivalent to defining a variable, but without assigning a value. is not an error.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.