Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103583 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 15761 invoked from network); 11 Dec 2018 19:10:06 -0000 Received: from unknown (HELO NAM05-DM3-obe.outbound.protection.outlook.com) (40.107.73.128) by pb1.pair.com with SMTP; 11 Dec 2018 19:10:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9KxfoY4DP6cqrw0Cqd3uGClZkSn8OrkJLMGFmIOfCII=; b=RqIAzVIibNrbEuYytF9g91J+MU93JSz4/zCr4Mr+EjP7/CDUY7q+mk/iJqp9+wBzqgYKI4+VPnW5ugPLfGt2z2JaGXDD4h3Jgdfn+TZqRI7rNTuLD7nh4mINtPpHi3aq+ATuf096D/9B4qVYgRY1Qrm062Jl3zqkDa7xMqVHrAk= Received: from BY1PR02MB1260.namprd02.prod.outlook.com (10.162.109.14) by BY1PR02MB1276.namprd02.prod.outlook.com (10.162.109.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.19; Tue, 11 Dec 2018 15:37:12 +0000 Received: from BY1PR02MB1260.namprd02.prod.outlook.com ([fe80::d820:ec53:686e:d032]) by BY1PR02MB1260.namprd02.prod.outlook.com ([fe80::d820:ec53:686e:d032%6]) with mapi id 15.20.1404.026; Tue, 11 Dec 2018 15:37:12 +0000 To: Marco Pivetta CC: PHP Internals List Thread-Topic: [PHP-DEV] [RFC] FFI - Foreign Function Interface Thread-Index: AQHUjXpko1rEMMDoSkumhvX3R+wd3qVx5g6AgAfK3WI= Date: Tue, 11 Dec 2018 15:37:12 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dmitry@zend.com; x-originating-ip: [212.232.72.197] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR02MB1276;6:zjPIQRSeITWfYBrec5cmgC2AzPndCOzKrMjuCCzTnPssp+9m/WeqyLnZ0qfdLAH6Neu0t0ej/DIA3Jun7JOuvjgpgeOfYREm46NafwqLrXiSuR0ngXS3LZ6Y17oCb6/9ZyfvwizjjPR3I1m9+afvOIi+btHKWtQDbn6g62RoI/fs3muGckfL9X14Dn0uKjBmT5vUm4u9agVI71POX4euf6fvfMRI4iTDdMKg18OHhV7QshbDoZxaShkZPt3LY/N5MlHJI+/oefM7f3wK3CQlrtXk0D5ncp/VGJK5Hp35Zqjfv4y2N8RGjYbPqWJPd0IC0gkydYUaS3K0xkf20Qoh2+1+GmGqrFNLfIb10UOJtEQwTzJcYDkO4H5A4rhBOf07lEvjrWXqGWnxD10B1qz4+TmxNdhA5X4HMzuixN0nwrklOV9vjZECp/aGHvF8wsirdGC3+KV456H6/SPZeroj7A==;5:KRkbxx1ixPWqLVXeAVNZsm4EpX+ihZzmTdfLIfZKQxe7Pp/86nGqViA2Xb0qKRowmjy3VDUykA4USd9wdngOTomGrqioF8rN1lEFSbYBZj2fpUeHMUOHDgLjmqfbOKUm6kiF/pn70EuXug0wveQaYknfitWVcqbVFYOCefPlocM=;7:2WPF0qVPqImppKnkUq5qo9FjafhKHxHBQtXPpZYfI1cyTZucw9rMT5MGP17SszaHTkJ2QvaPGWOxxAkeukNYoXjAx18qgANZw8d8AKHibuQ7gIoAXxz/rwWLeIVNJpeFqFPNP1t8LkHT9f+V7YoczA== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: b306bacd-604b-42ee-bc26-08d65f7e8530 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BY1PR02MB1276; x-ms-traffictypediagnostic: BY1PR02MB1276: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231455)(999002)(944501520)(4982022)(52105112)(10201501046)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699051)(76991095);SRVR:BY1PR02MB1276;BCL:0;PCL:0;RULEID:;SRVR:BY1PR02MB1276; x-forefront-prvs: 08831F51DC x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(136003)(396003)(39850400004)(366004)(199004)(189003)(74316002)(66066001)(71200400001)(54896002)(9686003)(6306002)(236005)(71190400001)(229853002)(19627405001)(6116002)(3846002)(53936002)(2906002)(256004)(7736002)(6436002)(55016002)(33656002)(105586002)(68736007)(39060400002)(4326008)(6916009)(6246003)(478600001)(5660300001)(53376002)(486006)(476003)(1411001)(25786009)(14454004)(76176011)(102836004)(26005)(97736004)(106356001)(7696005)(6606003)(186003)(606006)(966005)(8936002)(53546011)(11346002)(6506007)(81156014)(8676002)(316002)(81166006)(86362001)(99286004)(446003);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR02MB1276;H:BY1PR02MB1260.namprd02.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: zend.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: kq2EKY6dk6Hfd+NLmbMGx0M85E5uK+pjWVnxZCRe3Rayf1bBCv71NwGBz3hcm2C9q0vfW4bzqZsF5dWcFEJdfpE13u4uiMOWlsmOKNfbS1QsZtZTQQ2yaAKQm0i/KvlhWKZFH08lYt1CAff2a4Hr/8Kr54lS53kc7boQVnkybFp+X+XxyoRHSqWBtsLmd17CehsFe4zTTQsWs+uxj5w6jR6jAjIWAmk7KjXL/nxDGJiyp1ig9o7kKrqHCLo4KNMOk5R9U5lA2LqlPv1B2G9MJQZUgKRTSFV9C5CwXymiM1yzlTDiXMqcBMOH8G85gq6R spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BY1PR02MB1260BD6551B3F3D0B43BC9B0BFA60BY1PR02MB1260namp_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-Network-Message-Id: b306bacd-604b-42ee-bc26-08d65f7e8530 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Dec 2018 15:37:12.2974 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR02MB1276 Subject: Re: [PHP-DEV] [RFC] FFI - Foreign Function Interface From: dmitry@zend.com (Dmitry Stogov) --_000_BY1PR02MB1260BD6551B3F3D0B43BC9B0BFA60BY1PR02MB1260namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Marco, Some API and naming issues may be changed, e.g. FFI::array_type() was renam= ed to FFI::arrayType(). Changing FFI into ForeignFunctionInterface looks, like an overhead. People = who don't know what FFI is, don't need it. I surprised, there are no any problem reports... It seems, like few people on @internals tried it. Thanks. Dmitry. ________________________________ From: Marco Pivetta Sent: Thursday, December 6, 2018 7:26:57 PM To: Dmitry Stogov Cc: PHP Internals List Subject: Re: [PHP-DEV] [RFC] FFI - Foreign Function Interface Looks very interesting, especially for simplifying the landscape of extensi= ons. Still, the amount of abbreviations and naming issues is quite huge: needs a= lot of care on that end, IMO. Even just the name of the type (`FFI`) can s= imply be expanded to `ForeignFunctionInterface`. Just my 2 cents. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Thu, Dec 6, 2018 at 4:54 PM Dmitry Stogov > wrote: Hi Internals, I would like to start discussion of FFI RFC https://wiki.php.net/rfc/ffi This extension allows calling C function and accessing C data structures in= pure PHP. In conjunction with preloading it gives a possibility to write PHP extensi= on in PHP itself. The extension was tested on attempt to build TensorFlow PHP binding. Thanks. Dmitry. --_000_BY1PR02MB1260BD6551B3F3D0B43BC9B0BFA60BY1PR02MB1260namp_--