简体   繁体   中英

How to change the limit of a string's max lengt?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM