Re: Re: What could the intention be of someone using "\0" in comparison be?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jacob Kruger wrote:

> Well, if I use var_dump("\0") here on my windows7 64 bit machine, it
> spits out the following:
> string '�' (length=1)

This is the Unicode REPLACEMENT CHARACTER[1].

> And, if I check out the ascii character code of that blank character
> here it returns as 65533

Indeed, that is the REPLACEMENT CHARACTER's code point.

However, the REPLACEMENT CHARACTER is not what is actually stored in the
string denoted by the literal "\0", which is the ASCII character NUL.
You can very this with var_dump(ord("\0\")).

See my reply to Toby (<53F38143.4010101@xxxxxx>) for further explanations.

You might it find useful to post general questions regarding PHP to
php-general@xxxxxxxxxxxxx instead of php-windows@xxxxxxxxxxxxx, as the
latter is rather rarely frequented.

[1] <http://www.fileformat.info/info/unicode/char/0fffd/index.htm>

-- 
Christoph M. Becker

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux