Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28410 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4129 invoked by uid 1010); 19 Mar 2007 07:49:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 4114 invoked from network); 19 Mar 2007 07:49:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Mar 2007 07:49:27 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 85.214.94.56 cause and error) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Received: from [85.214.94.56] ([85.214.94.56:50984] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/10-02567-5804EF54 for ; Mon, 19 Mar 2007 02:49:26 -0500 Received: from baumbart.mbo (dslb-084-063-014-105.pools.arcor-ip.net [84.63.14.105]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id F16581B350E; Mon, 19 Mar 2007 08:49:22 +0100 (CET) Date: Mon, 19 Mar 2007 08:48:00 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <6210357294.20070319084800@marcus-boerger.de> To: Gwynne CC: internals@lists.php.net In-Reply-To: <5916E5BC-BF13-4723-A97A-AE6057B780A7@skytag.com> References: <86478A67-DCA2-4000-9EF0-DA4338E8389B@omniti.com> <24F7763B-824F-42B9-B7DA-C831BCF37D04@omniti.com> <458C4061-9633-4D3A-BD25-5256A7CAF6B2@skytag.com> <4ACF3DC6-C41E-481D-9222-BE461D4E5061@omniti.com> <5916E5BC-BF13-4723-A97A-AE6057B780A7@skytag.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: PATCH: anonymous functions in PHP From: helly@php.net (Marcus Boerger) Hello Gwynne, Monday, March 19, 2007, 3:13:28 AM, you wrote: > On Mar 18, 2007, at 9:30 PM, Wez Furlong wrote: >> Your nitpicking happens to be wrong ;-) >> >> sizeof("string constant") is the "same" as strlen("string constant") >> +1, but is resolved at compile time, so we use sizeof("string >> constant")-1 to get a compile time evaluated strlen(). This trick >> is used throughout the PHP internals. > Ah. I've never seen it used that way before; I apologize for my > ignorance :). In my experience, sizeof() on a character constant > would evaluate as sizeof( const char * const ). Actually it is not a "const char *" here. Instead the language generates a "const char[]" which works asexpected. Best regards, Marcus