Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32328 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87435 invoked by uid 1010); 14 Sep 2007 18:42:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87420 invoked from network); 14 Sep 2007 18:42:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Sep 2007 18:42:25 -0000 Authentication-Results: pb1.pair.com header.from=nlopess@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=nlopess@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.55.154.25 as permitted sender) X-PHP-List-Original-Sender: nlopess@php.net X-Host-Fingerprint: 212.55.154.25 relay5.ptmail.sapo.pt Linux 2.4/2.6 Received: from [212.55.154.25] ([212.55.154.25:41783] helo=sapo.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 44/C6-44372-016DAE64 for ; Fri, 14 Sep 2007 14:42:25 -0400 Received: (qmail 17974 invoked from network); 14 Sep 2007 18:42:20 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.209) by relay6 with SMTP; 14 Sep 2007 18:42:20 -0000 Received: (qmail 6010 invoked from network); 14 Sep 2007 18:42:21 -0000 X-AntiVirus: PTMail-AV 0.3-0.91.1 X-Virus-Status: Clean (0.00759 seconds) Received: from unknown (HELO pc07653) (nunoplopes@sapo.pt@[85.240.49.252]) (envelope-sender ) by mta14 (qmail-ldap-1.03) with SMTP for ; 14 Sep 2007 18:42:21 -0000 Message-ID: <002501c7f6fe$fbf2d4f0$4001a8c0@pc07653> To: "Hartmut Holzgraefe" Cc: "PHPdev" , , , References: <001f01c7f6f0$dbcf5350$4001a8c0@pc07653> <46EAC0C7.5000600@mysql.com> Date: Fri, 14 Sep 2007 19:42:20 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Subject: Re: [PHP-DEV] RFC: mark functions as const for possible optimizations From: nlopess@php.net ("Nuno Lopes") > Nuno Lopes wrote: > > My proposal is the following: > > some functions when fed with constant arguments always return a constant > > value, too. e.g.: > > strlen('abcd') === 4. > > wouldn't that be called "deterministic" and not "const"? yeah, exactly. I was missing the correct wording. (btw, appart of being deterministic, the function shouldn't have any side-effect). Nuno