How is the method of judging an instance obsolete?

Source: Internet
Author: User
The most recent write code has encountered an error like this:
 

Say authenticate this method is obsolete, how can I judge before I execute this method?
Thank you!


Reply to discussion (solution)

Deprecated is obsolete
But just say: in the near future, this method will be abolished. But it's still going to work.

If you don't want to swap alternatives, you can mask the error

Deprecated is obsolete
But just say: in the near future, this method will be abolished. But it's still going to work.

If you don't want to swap alternatives, you can mask the error


I would like to use the if (the function is obsolete) such a method to judge, do not know whether the function is not outdated such a function.

This is related to the version, showing deprecated, it is best to use the official offer of new methods. Because a later version might discard the previous wording.
You can use the version to judge.

For example:
if (php_version > XXX) {
....
}else{
....
}

This is related to the version, showing deprecated, it is best to use the official offer of new methods. Because a later version might discard the previous wording.
You can use the version to judge.

For example:
if (php_version > XXX) {
....
}else{
....
}


Thank you! Already used is_callable has been resolved.
  • Related Article

    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.