[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-windows
Subject:    Re: [PHP-WIN] Re: What could the intention be of someone using "\0" in comparison be?
From:       Christoph Becker <cmbecker69 () gmx ! de>
Date:       2014-08-19 17:06:03
Message-ID: 53F383FB.5050107 () gmx ! de
[Download RAW message or body]

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@gmx.de>) for further explanations.

You might it find useful to post general questions regarding PHP to
php-general@lists.php.net instead of php-windows@lists.php.net, 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic