[php-src] Issue #7796: Allow CData to be passed as valid argument to primitive ffi functions

From: Date: Mon, 20 Dec 2021 09:57:15 +0000
Subject: [php-src] Issue #7796: Allow CData to be passed as valid argument to primitive ffi functions
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-238509@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/7796
Comment Author: cmb69

> I hereby would like to request the option to send the CData class to FFI bound functions, to
> bypass this type juggling

But why? Regarding the performance, that float <-> double casting is likely way more efficient
than constructing new CData objects. And as far as I know, a float to double conversion is lossless
(assuming IEEE 754 binary32/binary64).

In my opinion, that would only make sense, if PHP had a native float type.


Thread (1 message)

  • cmb69
« previous php.bugs (#238509) next »