The title tells everything, can i change the limit of a strings length? I've checked this Page on stackoverflow, and it only tells that there is a limit, but how can i change it?

I've tried changing the memory limit using PHP like this:

ini_set('memory_limit', '-1');

But it didn't work...

有帮助吗?

解决方案

From the documentation:

Note: string can be as large as up to 2GB (2147483647 bytes maximum)

and also:

The string in PHP is implemented as an array of bytes and an integer indicating the length of the buffer. It has no information about how those bytes translate to characters, leaving that task to the programmer.

That integer is probably the limit.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top