Jump to content

Crashing while debugging the code


mavera2

Recommended Posts

I'm a beginner.

I should debug my code from the webserver.

When i use arrays and get some error, i generally make "var_dump" or "print_r" to check my data contents.

Most of the time, by echo'ing, i can get the errors with related to structure of arrays etc.

 

But when dumped file is too big, webserver crashes. I use shared hosting, so it becomes problem.

For example

$html = file_get_html(  'http://www.example.com'   );
var_dump($html);

I suppose, PHP runs it very long and reserved memory, RAM etc. becomes exhausted.

 

To solve this i sometime write the outputs to txt files.

But it would be handy to check the results from browser.

What can you recommend me to not to crash server?

 

Thank you

 

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.