Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1049729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:39:47+00:00 2026-05-16T16:39:47+00:00

Whenever I’ve received this error, I just increased the memory to fix it. I

  • 0

Whenever I’ve received this error, I just increased the memory to fix it. I have a case where, for testing purposes, I want to cause a page to use up all the memory however big I set the memory_limit.

I have no idea how to go about doing that.

EDIT:
I tried this:

<?php
echo "start";
@ini_set('memory_limit', '1M');
$test = "a";
while (1) {
    $test = "a" + $test;    
}
echo "done";
?>

But it didn’t crash. At the end it just printed “startstart” which is strange that it was printed twice…

I’d like a simple code example, the “put a lot of stuff in memory”.. well I know that much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:39:48+00:00Added an answer on May 16, 2026 at 4:39 pm

    Here’s the problem:

    $test = "a" + $test;
    

    + in PHP is for arithmetic, not string concatination. Use:

    $test = "a" . $test;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whenever I have Dim catID as integer And I use this in a query
Whenever I use the signal/slot editor dialog box, I have to choose from the
Whenever I run any jython program in Eclipse, I got the following error in
Whenever I click the button I want to open google.com but it closes my
Whenever I install gems I see ri and rdoc follow. I know this is
Whenever I call os.path.exists(variable) it will return false but if I call os.path.exists('/this/is/my/path') it
Whenever I try to get a bitmap I have cached from the context I
Whenever I open some help within eclipse I get a page saying: Server Error.
Whenever PHP outputs an error message it disregards css and a beautifully designed page
Whenever I write a code that includes an ArrayUtil, it causes an unexpected error:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.