RonnieT
RonnieT

Reputation: 2203

What does string() “value" mean when using var_dump

When using var_dump on a string I get the return of string(12) “55″. What does this mean exactly? The value of 55 makes sense as that's what the string is defined as but what does string(12) represent?

Upvotes: 2

Views: 412

Answers (2)

Steve
Steve

Reputation: 642

It's the length of the string. I don't see why your script is saying 12 though..

http://codepad.viper-7.com/Bb4dfx

Upvotes: 0

Jeroen
Jeroen

Reputation: 13257

It means the variable is a string of length 12. The length of 12 can be caused by:

A string is series of characters, where a character is the same as a byte.

Upvotes: 5

Related Questions