Re: [RFC] Constant Scalar Expressions

From: Date: Fri, 16 Aug 2013 00:42:23 +0000
Subject: Re: [RFC] Constant Scalar Expressions
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-68544@lists.php.net to get a copy of this message
On Fri, Aug 16, 2013 at 1:00 AM, Sara Golemon <pollita@php.net> 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

« previous php.internals (#68544) next »