Date: 10/26/99
- Next message: kk: "[PHPLIB-DEV] cvs commit"
- Previous message: kir: "[PHPLIB-DEV] cvs commit"
- In reply to: ak <email protected>: "Re: [PHPLIB-DEV] cvs commit"
- Next in thread: kir: "[PHPLIB-DEV] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Oct 26, 1999 at 03:29:59PM +0200, ak <email protected> wrote:
AK> One (hopefully) final thought for my understanding:
AK> If you use just one "\", what php does, is, it tries to replace the
AK> escape sequence "\[" with something else. As "\[" is not a valid
AK> escape sequence it gives a warning and replaces nothing, so "ereg()"
AK> sees what it ought to see. If you use "\\[" then "\\" gets replaced
AK> by "\", the result is "\[" and everything is fine.
AK> Am I right?
Quite. If a string contains an invalid escape sequence, php3 does not
do anything (apart for the warning). I mean that if you write $a="\[",
$a contains just that: \[.
Try experimenting with printf("\["), printf("\\[") and so on.
Bye.
--
Massimiliano Masserelli | URL: http://www.interim.it/
Internet Images S.r.l. | Tel: +39-051-3390671
vicolo Viazzolo, 3 | Fax: +39-051-557890
40124 - Bologna - Italy |
-------------------------------------------------------------------------------
What makes the universe so hard to comprehend is that there's nothing
to compare it with.
-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.
- Next message: kk: "[PHPLIB-DEV] cvs commit"
- Previous message: kir: "[PHPLIB-DEV] cvs commit"
- In reply to: ak <email protected>: "Re: [PHPLIB-DEV] cvs commit"
- Next in thread: kir: "[PHPLIB-DEV] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

