Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102047 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98265 invoked from network); 17 Apr 2018 07:29:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2018 07:29:33 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 104.47.32.109 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 104.47.32.109 mail-sn1nam01on0109.outbound.protection.outlook.com Received: from [104.47.32.109] ([104.47.32.109:6504] helo=NAM01-SN1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/C8-36099-B52A5DA5 for ; Tue, 17 Apr 2018 03:29:32 -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=mAnee+LmfL1PILqDpxTN3prBVh3jBGY0xHrt+rlwKqs=; b=j9Z5cgnVOCf9VGAbLiimzlyWSFNVXSRN7JmZu7Br97uQEzNh0ZKvpZqDMvFG85ppJjXw/fbZdorL14Wj44MQopaNKf+yYqoAwEaKV7UCtVzFkgkU4uGQ0EOGiR0wPz1XwKj60DAb7d9eua25DKNvt4rU6WNakUVna0p37j+OzBU= Received: from BN6PR02MB3234.namprd02.prod.outlook.com (10.161.152.32) by BN6PR02MB3361.namprd02.prod.outlook.com (10.161.152.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.696.12; Tue, 17 Apr 2018 07:29:26 +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.015; Tue, 17 Apr 2018 07:29:26 +0000 To: Michael Wallner CC: Stanislav Malyshev , Dmitry Stogov , Zeev Suraski , Xinchen Hui , Nikita Popov , Bob Weinand , "Anatol Belski (ab@php.net)" , PHP internals list Thread-Topic: [PHP-DEV] PHP FFI extenesion Thread-Index: AQHT0yrBnLpXxgz1HEWdw/jxKSLJkaQEFM4AgABk3QCAABugkA== Date: Tue, 17 Apr 2018 07:29:26 +0000 Message-ID: References: <56794c33-a728-d399-2462-b62ba1b7a509@gmail.com>, 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;BN6PR02MB3361;7:Gj5yUQhFh6vKP9OqfqPQD6PhOHCaJYIUcJLrf7K/BD1EgCM7Ey46HFuXNUlxLe8vDWZnRm/LamAiw6c+n79SV2SS97GDqn3+Evqr7f4ybLBSngiCc1HPw67F7UQ9xLShCUSlPuuXq5yJsR8YGEzg7DzgH0l+/RdRN7mrKdlhA/duEvIM09EFAa09rGUJJUGq/3cj8xdV3s+O5wnTYTC2QrvLMdCZT3ArnpapLQNjTnJFBeiesxNg7mo79r5yFBZm x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10019020)(396003)(39850400004)(376002)(366004)(346002)(39380400002)(199004)(189003)(5660300001)(186003)(66066001)(2900100001)(68736007)(316002)(106356001)(3660700001)(14454004)(5250100002)(229853002)(97736004)(6436002)(99286004)(6486002)(3280700002)(54896002)(6512007)(53546011)(6306002)(236005)(9686003)(86362001)(6116002)(3846002)(6506007)(31696002)(6246003)(76176011)(4326008)(39060400002)(25786009)(478600001)(2906002)(6916009)(606006)(486006)(11346002)(476003)(102836004)(966005)(446003)(33896004)(81156014)(26005)(53936002)(81166006)(105586002)(8676002)(8936002)(7736002)(54906003)(31686004)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR02MB3361;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:BN6PR02MB3361; x-ms-traffictypediagnostic: BN6PR02MB3361: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(166708455590820); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3231232)(944501327)(52105095)(10201501046)(93006095)(93001095)(3002001)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011);SRVR:BN6PR02MB3361;BCL:0;PCL:0;RULEID:;SRVR:BN6PR02MB3361; x-forefront-prvs: 0645BEB7AA received-spf: None (protection.outlook.com: zend.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: loVSzw9/9j6QhxFvCZsn6KghmWo025F7dA+jNPHzqjj05NwQm4BLeZc/pjg1cEF6m9shoq1hbxmRB1qCVXc1ISula+1jpEzrDm/1+UR5bWS6w87OdXpsTPlDIYfAbL4aVny9B+CaMwaIjeKQEEK/LiUrKFhRVpupTYLXxvuA2zDKLBg7yoIdPUMp0W6VPQKb spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_a03dfaa3899f4dae8752ba6a117277bfemailandroidcom_" MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: af50319a-1f2a-400f-2025-08d5a434f2e5 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-Network-Message-Id: af50319a-1f2a-400f-2025-08d5a434f2e5 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Apr 2018 07:29:26.2669 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR02MB3361 Subject: Re: [PHP-DEV] PHP FFI extenesion From: dmitry@zend.com (Dmitry Stogov) --_000_a03dfaa3899f4dae8752ba6a117277bfemailandroidcom_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable hi Michael, it's pitty, I didn't found this extension before. thanks for pointing, I'll definetly take a look. I, also, like the idea of preloading ffi definitions on startup, but I woul= d prefer to allow preloading any php files. Especially for FFI, PHP wrapper= s would able to hide dangerous implementation details. Thanks. Dmitry. On Apr 17, 2018 8:50 AM, Michael Wallner wrote: Hi! Nice that FFI is of interest again, so may I kindly point you to ext-psi? https://github.com/m6w6/ext-psi It follows a different approach, though, that it requires definition files on startup, not at runtime. Basically: $ cat >time.psi < /* time_t time(time_t *tloc); man 2 time */ function psi\time() : int { let tloc =3D NULL; return time(tloc) as to_int(time); } EOF $ ./sapi/cli/php -d psi.directory=3D. -r 'var_dump(psi\time());' It stalled the last months because I have been fighting health issues since last summer, but I did post a link to internals about a year ago: https://externals.io/message/98212#98259 -- Regards, Mike Hi! Nice that FFI is of interest again, so may I kindly point you to ext-psi? https://github.com/m6w6/ext-psi It follows a different approach, though, that it requires definition files on startup, not at runtime. Basically: $ cat >time.psi < /* time_t time(time_t *tloc); man 2 time */ function psi\time() : int { let tloc =3D NULL; return time(tloc) as to_int(time); } EOF $ ./sapi/cli/php -d psi.directory=3D. -r 'var_dump(psi\time());' It stalled the last months because I have been fighting health issues since last summer, but I did post a link to internals about a year ago: https://externals.io/message/98212#98259 -- Regards, Mike --_000_a03dfaa3899f4dae8752ba6a117277bfemailandroidcom_--