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?
2 Answers
It means the variable is a string of length 12. The length of 12 can be caused by:
- additional whitespace before/after
55(use the trim() function) - HTML within the string
A string is series of characters, where a character is the same as a byte.
1 Comment
Steve
Example of this in my answer.
It's the length of the string. I don't see why your script is saying 12 though..
<pre>tag or viewing the source code works well for this.