2 ms·
Sure, but what about when it's a little less clear, and the stakes lower? "How do I increase the PHP memory limit? I'm getting a memory error when I foreach th
by ceejayoz 4y ago
Sure, but what about when it's a little less clear, and the stakes lower?
"How do I increase the PHP memory limit? I'm getting a memory error when I foreach through lots of rows." is likely best answerable not by increasing the memory limit (and running into the same problem with a few more rows), but by chunking the rows to avoid the memory leak.
I don't see a downside to "there's probably a better way of doing this you should at least consider, here's why" as an answer to a question. SO permits multiple answers; someone'll likely be along shortly and give the php.ini answer, but it's not the best approach.
- mjw1007 4y agoI think adding helpful information like that is great. But it's much better if it comes after answering the actual question, not instead of it, because (as you say), SO was intended to be a big reference of answered questions.