PHP7 calling scope not the same as php5?

Source: Internet
Author: User
Tags php class
Today in research __call()And __callStatic()When I read the story of bird brother Php calling Scope

But did you find that the following code did not get the same results in PHP5.5 and PHP7?


  
   test();?>

I didn't find PHP7 's instructions for adjusting this. Thank you for your advice.

Reply content:

Today in the research __call() and __callStatic() the time to read the bird Brother's article php calling Scope

But did you find that the following code did not get the same results in PHP5.5 and PHP7?


  
   test();?>

I didn't find PHP7 's instructions for adjusting this. Thank you for your advice.

With this adjustment, you can find it in the non-backwards compatibility of PHP 7 and have been marked as DEPRECATED in PHP 5.6

A static call to a non-static method is prompted in a static call for undefined $this and an error.

Http://php.net/manual/en/migr ...

Http://m.runoob.com/php/php-d ...

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