You are here: Re: "\90" != chr(90) « PHP Programming Language « IT news, forums, messages
Re: "\90" != chr(90)

Posted by Andy Hassall on 10/09/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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация