Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68544 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70873 invoked from network); 16 Aug 2013 00:42:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Aug 2013 00:42:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=arraypad@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=arraypad@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.174 as permitted sender) X-PHP-List-Original-Sender: arraypad@gmail.com X-Host-Fingerprint: 209.85.216.174 mail-qc0-f174.google.com Received: from [209.85.216.174] ([209.85.216.174:54037] helo=mail-qc0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/7C-06453-2757D025 for ; Thu, 15 Aug 2013 20:42:26 -0400 Received: by mail-qc0-f174.google.com with SMTP id c1so788499qcz.19 for ; Thu, 15 Aug 2013 17:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=j6ljyv4xnD0+kBCOZD0iQpW3R28mx7XS3B1vrRaI0ZM=; b=vio7F6bHn8i9lg5T1QC4MiHGCXduk22nJJJCZXA7nCqv8+X2LyE3xDSVZqwZptsjvO AF5dYAk9cETUVaHpHQJI9yD6PU5sfTDF9lVHgjKPHh4biuxhOJdiKKJnIvqeoh7XRyty /55nR9o7s7/TtntsTw9IuHRqGrnKRiAgrSfTwlVhl2Godc7DWCVLgp05fP+ASxtNZy7R bJRY32ZXEF232zlMR8Fce5gNVCh0wF/DqQ6gT5s7Exoyxs3KUcbQ2biYmHZacO/gHP1+ ezetayzwJ87LoLTE8+OQfXbUFQyguIswxYLtdFWC8t5kRZYtToTpDKE484RlBa8ti2kK M1tg== MIME-Version: 1.0 X-Received: by 10.229.62.136 with SMTP id x8mr1588369qch.62.1376613743743; Thu, 15 Aug 2013 17:42:23 -0700 (PDT) Received: by 10.49.15.129 with HTTP; Thu, 15 Aug 2013 17:42:23 -0700 (PDT) In-Reply-To: References: <520B4772.8090701@sugarcrm.com> <520BBA89.1090208@sugarcrm.com> <520D6758.4050500@sugarcrm.com> Date: Fri, 16 Aug 2013 01:42:23 +0100 Message-ID: To: Sara Golemon Cc: Stas Malyshev , Derick Rethans , Anthony Ferrara , Sebastian Krebs , Julien Pauli , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c1be603058f504e405dd9b Subject: Re: [PHP-DEV] [RFC] Constant Scalar Expressions From: arraypad@gmail.com (Arpad Ray) --001a11c1be603058f504e405dd9b Content-Type: text/plain; charset=ISO-8859-1 On Fri, Aug 16, 2013 at 1:00 AM, Sara Golemon wrote: > I wasn't going to bring this up, but an intersectional idea I had a few > years ago.... Static Constructor. Just like an instance constructor, but > called on initial load. > > class Foo { > public static __static_construct(/* no args allowed */) { > /* Run on class load, similar to (main), but without better > determinance */ > } > } > > * Reduces the footprint wherein a class's definition *can* change. > * Solves the early exit problem > * If exposed to userspace, could provide a nice encapsulation for things > like stream_wrapper_register() calls. > Related - Python metaclasses <3 Arpad --001a11c1be603058f504e405dd9b--