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
https://forums.phpfreaks.com/topic/254440-crashing-while-debugging-the-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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