Preg_replace_callback Allowed Memory error

Source: Internet
Author: User
Server PHP Version 5.4.9
preg.php
 
 (.*?) <\/php (\s*?) >/is ', function ($match) use ($a) {return 123;}, $content); Echo $content;

Run the code back:
Fatal error:allowed memory size of 134217728 bytes exhausted (tried to allocate 4169478721 bytes) In/media/raid10/htdocs /xxxx.com/preg.php on line 4

In the local Windows PHP Version 5.3.3
Run code return: ASDFSADF testtest

Where did the error occur?


Reply to discussion (solution)

The error message is that there is not enough memory, and the code itself does not have an extremely memory-intensive component
Visible is a bug

The PHP development Organization has repeatedly stated that it is recommended to upgrade to php5.3.21 or php5.4.19 versions as a result of major bug fixes
Why just ignore it?

Landlord, how do you solve this problem? There seems to be no solution, do you write functions?

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