How does PhP internally represent string?
- by Jim Thio
UTF8?
UTF16?
Does the string in PhP also keep tracks the encoding used for that string?
A good answer would give me a sample of
Let's look at this script for example.
Say I do
$original = "??????????????";
What actually happen?
Obviously I think $original will not contain just 7 characters. Those glyps must each be represented by several bytes there.
Then I do
$converted= mb_convert_encoding ($original , "UTF-8")
What will happen to $converted? How will $converted be different than $original?
Will it be just the exact same byte sequence with $original but with different encoding?
Or what?