Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84450 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71397 invoked from network); 9 Mar 2015 01:48:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Mar 2015 01:48:02 -0000 Authentication-Results: pb1.pair.com header.from=mails@thomasbley.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mails@thomasbley.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain thomasbley.de from 85.13.137.24 cause and error) X-PHP-List-Original-Sender: mails@thomasbley.de X-Host-Fingerprint: 85.13.137.24 dd15934.kasserver.com Received: from [85.13.137.24] ([85.13.137.24:45632] helo=dd15934.kasserver.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/93-44738-ECBFCF45 for ; Sun, 08 Mar 2015 20:47:59 -0500 Received: from dd15934.kasserver.com (dd0802.kasserver.com [85.13.143.1]) by dd15934.kasserver.com (Postfix) with ESMTPSA id 03680260819; Mon, 9 Mar 2015 02:47:54 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-SenderIP: 92.222.45.59 User-Agent: ALL-INKL Webmail 2.11 In-Reply-To: References: <010801d055d3$ed5a8fa0$c80faee0$@tutteli.ch> <004d01d05696$9d797410$d86c5c30$@tutteli.ch> To: php@tutteli.ch, pjsturgeon@gmail.com Cc: internals@lists.php.net Message-ID: <20150309014755.03680260819@dd15934.kasserver.com> Date: Mon, 9 Mar 2015 02:47:54 +0100 (CET) Subject: Re: [PHP-DEV] [RFC] Anonymous Classes From: mails@thomasbley.de ("Thomas Bley") Just a question, can I do: $c = class { public static function square($i) { return $i*$i; } }); echo $c::square(42); or $c = class extends DateTime { public static function createFromFormat($translateFormat, $time) { $translateFormat = str_replace('foo', 'Y-m-d', $translateFormat); return parent::createFromFormat($translateFormat, $time); } }); $date = $c::createFromFormat('foo', '2015-03-09'); Regards Thomas Philip Sturgeon wrote on 06.03.2015 20:14: > Right, this here RFC has been drastically improved. > > https://wiki.php.net/rfc/anonymous_classes > > Anyone got any doubts or troubles at this point? > > It's about 5 days until the vote starts. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >