Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68540 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62515 invoked from network); 15 Aug 2013 23:29:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2013 23:29:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.192.178 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.192.178 mail-pd0-f178.google.com Received: from [209.85.192.178] ([209.85.192.178:52533] helo=mail-pd0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 12/9A-06453-4646D025 for ; Thu, 15 Aug 2013 19:29:41 -0400 Received: by mail-pd0-f178.google.com with SMTP id w10so1393751pde.23 for ; Thu, 15 Aug 2013 16:29:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=MaSE8M8YOaVua2MFe0wWg7emu4h+/d4lnu/As9RYBes=; b=a+fWg2QeXdbGGXQbTOErw5RDpNrttKDrn1JFOh2/nussZdEFHZoYAFFxNt8OhIiMDR AkHSUKSB6Zs3/qr5BnuaDlRJf0svNeMzan0sRJoi1oUKwzxkNrvGI1Hv6I7Rip5N9Akx toyzvMkNqtp12QpdAmhJmUh108rwbFlI8u4TZwEMzd3OV0Lb3Dk90z3tUMXnbNoxAibh q0RZ5RW6WNT1ea6+eDzXJnmFLhnMtlXP8aT10B8TjHwnXTTsrlBpLdnrQouLFJzaBbPk ivtzlgb2zWxmqkw19AG2KIiH+x7pZ7Ov9RMHC5b/l4ABtjwVthSWWvb3TJUm6gwFRMLl tEeA== X-Gm-Message-State: ALoCoQmuuhPdBJp4DG0yHc0BZqLu7D9R46ibtTDpeb1H1nPespzzgR8JP4/5iSENYZASQ2Cv3Z02 MIME-Version: 1.0 X-Received: by 10.68.249.68 with SMTP id ys4mr10385577pbc.159.1376609377860; Thu, 15 Aug 2013 16:29:37 -0700 (PDT) Sender: php@golemon.com Received: by 10.70.24.33 with HTTP; Thu, 15 Aug 2013 16:29:37 -0700 (PDT) X-Originating-IP: [173.252.71.189] In-Reply-To: <520BBA89.1090208@sugarcrm.com> References: <520B4772.8090701@sugarcrm.com> <520BBA89.1090208@sugarcrm.com> Date: Thu, 15 Aug 2013 16:29:37 -0700 X-Google-Sender-Auth: Gv0GvZCRVkatXgcbSKiLORTY840 Message-ID: To: Stas Malyshev Cc: Derick Rethans , Anthony Ferrara , Sebastian Krebs , Julien Pauli , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b674188f654ba04e404d8c4 Subject: Re: [PHP-DEV] [RFC] Constant Scalar Expressions From: pollita@php.net (Sara Golemon) --047d7b674188f654ba04e404d8c4 Content-Type: text/plain; charset=ISO-8859-1 I have mixed emotions on the yes/no side of things, but on the "how" side, I think we can do this fairly easily. During parse, when a non-scalar const expression is encountered, the actual binding to the class is deferred, and bytecodes are emitted in the "(main)" function. To put it in psuedo-code terms: