Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51426 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30980 invoked from network); 4 Feb 2011 04:39:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Feb 2011 04:39:01 -0000 Authentication-Results: pb1.pair.com header.from=mail_ben_schmidt@yahoo.com.au; sender-id=unknown; domainkeys=good Authentication-Results: pb1.pair.com smtp.mail=mail_ben_schmidt@yahoo.com.au; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain yahoo.com.au from 98.139.91.97 cause and error) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: mail_ben_schmidt@yahoo.com.au X-Host-Fingerprint: 98.139.91.97 nm27.bullet.mail.sp2.yahoo.com Received: from [98.139.91.97] ([98.139.91.97:30898] helo=nm27.bullet.mail.sp2.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F4/C1-21221-3E28B4D4 for ; Thu, 03 Feb 2011 23:39:00 -0500 Received: from [98.139.91.68] by nm27.bullet.mail.sp2.yahoo.com with NNFMP; 04 Feb 2011 04:38:56 -0000 Received: from [98.139.91.33] by tm8.bullet.mail.sp2.yahoo.com with NNFMP; 04 Feb 2011 04:38:56 -0000 Received: from [127.0.0.1] by omp1033.mail.sp2.yahoo.com with NNFMP; 04 Feb 2011 04:38:56 -0000 X-Yahoo-Newman-Id: 782306.86760.bm@omp1033.mail.sp2.yahoo.com Received: (qmail 30404 invoked from network); 4 Feb 2011 04:38:56 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=DRqOj7RWmYDQr1B4ON2MZOOyZwazkmOVZWX3XpPVwBbtNH1thCtmS96jd/q1Z6X2a/FffHxlxYbqSAR7CTH6JJTfFy2NF690hBXwa1zffTQJJzD1aDwOINsvqcI0iHxJbBzlcfMTLVGGrQKW/oy5LcU/GWsqvFi6SVeaupX72RA= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s1024; t=1296794336; bh=xkqaEZZme9Q8g9sV1yurt4t+i80zUGMFRIa89BOKVU8=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=U6FdTiJ/jdGc6Yeo9FaQobnC+rqlpfJBx0jX/sEPlnrTGwvAeTzUNKrTFnjTERqdRfkUWV6fzdFWMS9HP3CbWdrEsQCpi6xVY1aTwz2SjaUvAjh65PQu6ClpNiJG/cNVbeUeaP/xpjeYuY69cNfMgVyTH29yfF5qYDQ47IckxOE= Received: from thought.local (mail_ben_schmidt@124.148.189.226 with plain) by smtp134.mail.mud.yahoo.com with SMTP; 03 Feb 2011 20:38:55 -0800 PST X-Yahoo-SMTP: enFMnPSswBAexaHyzgobwuUTrYOhZdJ0KRA2SjA- X-YMail-OSG: XUscJlAVM1lwfwyj15dMyTqrXqOk2MExOLFxCefy4wIjC3H 6RC94Gt9bhDqScAO91MzF8m9SfUT8dyR.pf674httWtsf3TPi9__B9AvqrDL TPuhO6SGe8SjcoCdSWEHia9CaQV1dc6oT7glGwPsvQhYx9Ib87oc777b2xv0 jjvE0WPPAwHkvvnm0S9U6NbCYCquFD.Iq3K6dkjN58yiL5zcoQGDAFtkYGrE lxrSXiZBjrTAfDAYTojb74p7_GpwPGtuqR.w- X-Yahoo-Newman-Property: ymail-3 Message-ID: <4D4B82DD.9040209@yahoo.com.au> Date: Fri, 04 Feb 2011 15:38:53 +1100 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 ThunderBrowse/3.3.4 MIME-Version: 1.0 To: PHP Developers Mailing List References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] A quick consensus on magic method idea From: mail_ben_schmidt@yahoo.com.au (Ben Schmidt) On 4/02/11 3:30 PM, Chris Stockton wrote: > Hello, > > I haven't seen a magic method proposed in a while so I am not sure how > people feel about them, obviously adding them can break BC (although > it is recommended people should not use __). I'm sure a good amount of > use/desire needs to be shown for inclusion. Here is what I decided I > would like to have and just implemented: > > Loader.php: > -- > class Loader { > static public function __compiled() { > echo "I was ran at the end of zend_do_end_class_declaration"; > } > } > > Run script: > include "Loader.php"; > > Prints: > I was ran at the end of zend_do_end_class_declaration > > At first thought I figured this would be pretty simple to implement, > which it is.. for a basic use case. It seems I will need a bit more > work to handle issues when you do certain things inside __compiled. If > anyone has any interest I would fix it and make a clean patch, so > would anyone find this useful? Do you yourself have any situation where this is useful? Does it solve some problem? Does it enable you to do things better than before? Ben.