addcslashes(), strange behavior

From: Date: Wed, 29 Aug 2001 09:11:30 +0000
Subject: addcslashes(), strange behavior
Groups: php.general 
Request: Send a blank email to php-general+get-64964@lists.php.net to get a copy of this message
Hi All I did echo ord ("\n"); which return 10 so I tried to do this with no success echo addcslashes ("hello\nworld", "\10"); returning: "hello newline world" while doing: echo addcslashes ("hello\nworld", "\9"); returned me what I wanted: "hello\nworld" which mean the string hold "hello\\nworld" Its look like a bug, ord say" /n = 10 while addsclashes replace /n using /9 as ASCII value. What is the list opinion ? -------------------------- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il --------------------------

« previous php.general (#64964) next »