Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28569 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33670 invoked by uid 1010); 23 Mar 2007 09:30:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 33655 invoked from network); 23 Mar 2007 09:30:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Mar 2007 09:30:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.226.6.51 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.226.6.51 darkcity.gna.ch Received: from [195.226.6.51] ([195.226.6.51:38077] helo=mail.gna.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/A6-02386-A3E93064 for ; Fri, 23 Mar 2007 04:30:36 -0500 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id 1A73D69C1C; Fri, 23 Mar 2007 10:30:29 +0100 (CET) Received: from unknown by localhost (amavisd-new, unix socket) id client-XXiEHEef; Fri, 23 Mar 2007 10:30:26 +0100 (CET) Received: from [192.168.1.42] (217-162-171-242.dclient.hispeed.ch [217.162.171.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTP id D5461A62F3; Fri, 23 Mar 2007 10:30:25 +0100 (CET) Message-ID: <46039E2C.2020304@cschneid.com> Date: Fri, 23 Mar 2007 10:30:20 +0100 User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) MIME-Version: 1.0 To: Tomas Kuliavas CC: PHP Developers Mailing List Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at gna.ch Subject: Re: [PHP-DEV] String BC break \{$a} From: cschneid@cschneid.com (Christian Schneider) Tomas Kuliavas wrote: > It was changed in 5.1.0-5.1.1 versions. > > According to PHP Manual (http://www.php.net/language.types.string) curly > brackets are not escaped with backslash. Escape worked in older PHP > versions. It does not work in 5.1.1+. > > http://bugs.php.net/31341 > http://bugs.php.net/35411 These two (fixed and closed) bugs diff from mine I think: 31341: $ \{ => $ \{ vs. 35411: \{$string} => {$string} vs. my problem with PHP 5.1.5/5.2.1: \${string} => \{abc} vs. PHP4: \{$string} => {abc} So with PHP 5.1.5 and PHP 5.2.1 curly braces *are* escaped (they are still output) but the backslash is output as well. If they would not be escaped at all I would have expected \abc. I still think the PHP4 way has the lowest WTF factor. Is this behaviour an oversight (and I should open a bug report) or is this intentional? I'm still not sure. - Chris