Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92609 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12454 invoked from network); 21 Apr 2016 21:13:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Apr 2016 21:13:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 157.56.111.142 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 157.56.111.142 mail-bn1bon0142.outbound.protection.outlook.com Received: from [157.56.111.142] ([157.56.111.142:63520] helo=na01-bn1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/66-14036-07249175 for ; Thu, 21 Apr 2016 17:13:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=C32e39lJjQ4/wsbHwnMW0gAvI9CHPU3jR/wnHsBF4c4=; b=lcRDKf+afeifYvOsSd5gFt8VefSeatXguOy8RN3x0/Mq1HO8Ai4P2SYD1IdGJSMHj3F1MPlgaGNJeXsoPzHOhOBwVN2zf/HEam7926JoJTTTgRt0tg3QqyeVuNePG1jY+l0wdxRh1jV7EL0wfxfGqx9TwspntZpeTDZZCygUnl0= Received: from BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) by BY2PR0201MB1782.namprd02.prod.outlook.com (10.163.72.24) with Microsoft SMTP Server (TLS) id 15.1.466.19; Thu, 21 Apr 2016 21:13:16 +0000 Received: from BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) by BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) with mapi id 15.01.0466.023; Thu, 21 Apr 2016 21:13:16 +0000 To: internals Thread-Topic: [PHP-DEV] [RFC] PHP Attributes Thread-Index: AQHRnBAun0yJJJCyoUaLowSO4sZVNw== Date: Thu, 21 Apr 2016 21:13:15 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lists.php.net; dkim=none (message not signed) header.d=none;lists.php.net; dmarc=none action=none header.from=zend.com; x-originating-ip: [92.62.57.172] x-ms-office365-filtering-correlation-id: 5ae75b5e-233d-4da1-8259-08d36a29c17a x-microsoft-exchange-diagnostics: 1;BY2PR0201MB1782;5:DpPqZsPXS40THm2rLq6fVJDpCj+fNW4VngBBZwd3+eiGkchXcjqJ6pD/Wg1A3vuW7WP6BqIzt54WZsVFpA2fYRqJ1duevVmuEf4SabuqzmUPwn4iP2j/mpz3AxdMqcvbUbaL9CdEtxVy7/xDf1FpqbrALmzRp4l3zZ2ZteSn6GxyMTBH9AfB9jGaiZmlZodQ;24:82PMu9kkxfgNYADiGbBe7VpTrqkCWdhEwCPWBc50mXvWF3jyn5utfc6kpFWlltgoLcfQUoQGI+1zU5o4fVRM8Pgu4PkfQZMHQHhHIhAz/s0=;7:Yy1ImTeYCDcMfTTlF3DlxC+MRg8CGEm/cWd/kQr2LrLUvba2BD/8U5CULcw/XU27VeqAyQiuf14wWfVS9xAJgmhAakmGz7E0RmROuO0M3BE1Sk0vKAHCjfE2YpeDEyGOdnrNh1pq3R8LRFTvLXxNCA1qfc6DRvCFYvyytwRTismTg0+D2+MrSCV8t0lGzzdF1Aa3rfJ0/O7FTBKxeV25t9RReIiyCmtZeOThjIJX9CA= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1782; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(9101521026)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:BY2PR0201MB1782;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1782; x-forefront-prvs: 091949432C x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(19580395003)(54356999)(5008740100001)(5003600100002)(3280700002)(122556002)(3660700001)(5002640100001)(19625215002)(450100001)(92566002)(1220700001)(110136002)(586003)(74316001)(6116002)(189998001)(102836003)(107886002)(81166005)(9686002)(16236675004)(66066001)(5004730100002)(87936001)(11100500001)(19627405001)(106116001)(99286002)(229853001)(86362001)(76576001)(77096005)(19617315012)(2900100001)(15975445007)(10400500002)(50986999)(33656002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0201MB1782;H:BY2PR0201MB1784.namprd02.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BY2PR0201MB178479B3AF8BD49583233034BF6E0BY2PR0201MB1784_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2016 21:13:15.8794 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1782 Subject: [PHP-DEV] [RFC] PHP Attributes From: dmitry@zend.com (Dmitry Stogov) --_000_BY2PR0201MB178479B3AF8BD49583233034BF6E0BY2PR0201MB1784_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I would like to present an RFC proposing support for native annotation. The naming, syntax and behavior are mostly influenced by HHVM Hack, but not= exactly the same. The most interesting difference is an ability to use arbitrary PHP expressi= ons as attribute values. These expressions are not evaluated, but stored as Abstract Syntax Trees, a= nd later may be accessed (node by node) in PHP extensions, preprocessors an= d PHP scripts their selves. I think this ability may be useful for "Design = By Contract", other formal verification systems, Aspect Oriented Programmin= g, etc https://wiki.php.net/rfc/attributes Note that this approach is going to be native, in contrast to doc-comment a= pproach that uses not well defined syntax, and even not parsed by PHP itsel= f. Additional ideas, endorsement and criticism are welcome. Thanks. Dmitry. --_000_BY2PR0201MB178479B3AF8BD49583233034BF6E0BY2PR0201MB1784_--