Maximum string size?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aclees86
Forum Newbie
Posts: 5
Joined: Sat Jun 06, 2009 11:58 am

Maximum string size?

Post by aclees86 »

I am struggling to find the maximum size a string can hold in PHP. So far, the results indicate "more than you need", "8mb", "10mb" or "50mb" from most places.

Does anybody have a difinitive answer? In a week I'm going to be doing some work that'll probably include a string of 9mb, and wanted to find out the max size before running into any problems. Any ideas anybody?

Regards
A. Lees
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Maximum string size?

Post by jackpf »

As long as your server has more than 9mb of memory then you'll be fine :P
aclees86
Forum Newbie
Posts: 5
Joined: Sat Jun 06, 2009 11:58 am

Re: Maximum string size?

Post by aclees86 »

So it's not limited by the language itself? - Only by my hardware?

Regards
A. Lees
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Maximum string size?

Post by jackpf »

Yeah. If you read up on strings you can see for yourself.
Post Reply