Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:102036
Return-Path: <dmitry@zend.com>
Mailing-List: contact internals-help@lists.php.net; run by ezmlm
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 62125 invoked from network); 13 Apr 2018 13:28:06 -0000
Received: from unknown (HELO lists.php.net) (127.0.0.1)
  by localhost with SMTP; 13 Apr 2018 13:28:06 -0000
Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown
Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown
Received-SPF: error (pb1.pair.com: domain zend.com from 104.47.41.112 cause and error)
X-PHP-List-Original-Sender: dmitry@zend.com
X-Host-Fingerprint: 104.47.41.112 mail-dm3nam03on0112.outbound.protection.outlook.com  
Received: from [104.47.41.112] ([104.47.41.112:25760] helo=NAM03-DM3-obe.outbound.protection.outlook.com)
	by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP
	id 24/ED-36099-160B0DA5 for <internals@lists.php.net>; Fri, 13 Apr 2018 09:28:02 -0400
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;
 bh=Jrj+Egk6ALlXkHWJ7v7PyEtuzUqfbv72jK5wtM5O4DY=;
 b=HyI4m2DrIujsMw4EBBVJwqbiGOF069rVSHFpTmijHUBBVyJIQcrZlQvKkg+uVIPHsbVprdogwaWX0vyCeoCjVHvU7BnzD30VsQ70XllkNSM47GRVGdV2pyCb+gSmht/neh/li6Btf6ybCJL5FuDzHEaziAUTB4XhWs3AaswOP20=
Received: from BN6PR02MB3234.namprd02.prod.outlook.com (10.161.152.32) by
 BN6PR02MB3139.namprd02.prod.outlook.com (10.161.153.32) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id
 15.20.675.11; Fri, 13 Apr 2018 13:27:58 +0000
Received: from BN6PR02MB3234.namprd02.prod.outlook.com
 ([fe80::b5e1:42c:d6ad:56c]) by BN6PR02MB3234.namprd02.prod.outlook.com
 ([fe80::b5e1:42c:d6ad:56c%13]) with mapi id 15.20.0675.014; Fri, 13 Apr 2018
 13:27:57 +0000
To: Zeev Suraski <zeev@zend.com>, Xinchen Hui <laruence@gmail.com>, "Nikita
 Popov" <nikic@php.net>, Bob Weinand <bwoebi@php.net>, "Anatol Belski
 (ab@php.net)" <ab@php.net>
CC: PHP internals list <internals@lists.php.net>
Thread-Topic: PHP FFI extenesion
Thread-Index: AQHT0yrBnLpXxgz1HEWdw/jxKSLJkQ==
Date: Fri, 13 Apr 2018 13:27:57 +0000
Message-ID: <BN6PR02MB323404E036380FA42924D9A7BFB30@BN6PR02MB3234.namprd02.prod.outlook.com>
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;BN6PR02MB3139;7:BjYDYFj+wXmBS0d+j+Ruo98tz9iQZjt4wNN2HUtPdfaginEcfsMdEugUkzHSdk6D/s3DJHUBwCwDn7M+TQHm/kN+6HW9bJ1O85oGc8s0HkW4NtAuWspNw0sxNACQ5SdD9cs0cw1HP6T9gvgom8TgOxC7htbv0actpSKjbf6z8qG2dE7RsuIWgWLSOor3ZgE7GOozZOSOqkKs3VeUSz4DYTnNZh23a/sX8UFb1u1dwGSIuSVovO6Y2JvG6QUOhiha
x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR;
x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10019020)(366004)(346002)(39380400002)(39850400004)(396003)(376002)(199004)(189003)(3280700002)(81156014)(102836004)(81166006)(6306002)(3846002)(55016002)(478600001)(3480700004)(8936002)(9686003)(2906002)(54896002)(236005)(6116002)(26005)(14454004)(2900100001)(68736007)(3660700001)(66066001)(33656002)(316002)(8676002)(110136005)(106356001)(558084003)(6436002)(966005)(476003)(486006)(97736004)(6506007)(86362001)(99286004)(19627405001)(105586002)(5660300001)(39060400002)(4326008)(5250100002)(7696005)(74316002)(25786009)(7116003)(6606003)(186003)(53936002)(7736002)(606006)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR02MB3139;H:BN6PR02MB3234.namprd02.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1;
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:BN6PR02MB3139;
x-ms-traffictypediagnostic: BN6PR02MB3139:
x-microsoft-antispam-prvs: <BN6PR02MB31391A8FC596206BC3192CCFBFB30@BN6PR02MB3139.namprd02.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(166708455590820);
x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(3231232)(944501327)(52105095)(93006095)(93001095)(10201501046)(3002001)(6041310)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(6072148)(201708071742011);SRVR:BN6PR02MB3139;BCL:0;PCL:0;RULEID:;SRVR:BN6PR02MB3139;
x-forefront-prvs: 0641678E68
received-spf: None (protection.outlook.com: zend.com does not designate
 permitted sender hosts)
x-microsoft-antispam-message-info: Hdt9OFY8sYq3EK5RzxMi8j80jv414wLj6kn/Yjk0waBdasYIjhr7LUPbAgmo34eImQkxm36M1gLG/q0smWtSMrZkoCk2LjxaLkhqVRp1D2VsAeT4J4YNxw/AdyxJEV1u76eb1Oyd76z4MP+iONm6mvzuk2UBaSHuFvB54YgHFPZLxX/f0MXmrhdao58Xgv5N
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative;
	boundary="_000_BN6PR02MB323404E036380FA42924D9A7BFB30BN6PR02MB3234namp_"
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: 1b2cb14b-8cfd-48b5-d3be-08d5a1425ec9
X-OriginatorOrg: zend.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 1b2cb14b-8cfd-48b5-d3be-08d5a1425ec9
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2018 13:27:57.0648
 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR02MB3139
Subject: PHP FFI extenesion
From: dmitry@zend.com (Dmitry Stogov)

--_000_BN6PR02MB323404E036380FA42924D9A7BFB30BN6PR02MB3234namp_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,


I've spent some time thinking about simple FFI for PHP, and finally, borrow=
ed most ideas from LuaJIT.

This is an initial PoC. It was tested on Linux only.


https://github.com/dstogov/php-ffi


I would appreciate review, comments and ideas about missing features and fu=
nctionality.


Thanks. Dmitry.



--_000_BN6PR02MB323404E036380FA42924D9A7BFB30BN6PR02MB3234namp_--