Obviously, "\9" equals chr(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?
Obviously, "\9" equals chr(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?
You can't do it with numbers in base 10.
You can do it with numbers in base 8 or 16.
On 4 Jan 2006 14:19:01 -0800, "yawnmoth" <te*******@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.