2

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?

1
  • 3
    make sure you're checking the preformatted text, and not simply the HTML output. Using a <pre> tag or viewing the source code works well for this. Commented Jun 7, 2012 at 19:18

2 Answers 2

5

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Example of this in my answer.
0

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

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.