|
Posted by Andy Hassall on 10/08/70 11:36
On 4 Jan 2006 14:19:01 -0800, "yawnmoth" <terra1024@yahoo.com> wrote:
>Obviously, "\9" equals chr(9),
That's not obvious, in fact it shouldn't equal chr(9) unless I'm missing an
extra section in the string parsing rules. That's the literal string "\9"
(length 2, slash followed by nine).
andyh@server ~/public_html $ cat test.php
<?php
var_dump("\9");
?>
andyh@server ~/public_html $ php -q test.php
string(2) "\9"
> but what would equal chr(90)? "\90"
>doesn't. Rather, "\90" seems to be equal to chr(9).chr(0). So what
>could I do to get chr(90) using escaped numbers?
\132
As with Perl, C and C++, you use octal in this type of escape sequence.
http://www.php.net/manual/en/language.types.string.php
(scroll down to table 11-1).
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Navigation:
[Reply to this message]
|