2

There seems to be a limit how large a php array can be. There's nothing mentioned about this in any documentation I can find, and binging/googling on the problem doesn't give me any help. I am so frustrated right now! Well, to hell with php anyway. This is definitely my last battle with it.

Comments
  • 0
    @J-2FA Yeah, I actually mostly get more relevant search results with bing. Too much blogs, YouTube videos, social media posts and other junk on Google. If search engines were Swedish TV channels, bing would be TV4 and Google would be TV3.
  • 1
    YES!!! After a little more investigation it turned out the array size wasn't the culprit at all, but instead a limit on regexps. If you want to do regexps on a fairly large file, you need to set the backtrack_limit in php ini accordingly. Learnt this from
    https://stackoverflow.com/questions...

    I'm so happy now :)
  • 0
    But yes, I'm still planning on moving to node.js, for other reasons.
  • 1
    There isn’t a set limit for php arrays, it coincides with the amount of memory you have available.

    Up your memory allocation via ini_set or in your php.ini for global.
  • 1
    ...and two years later I'm still using PHP :)
Add Comment