|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2019-09-15 12:26 UTC] asmqb7 at gmail dot com
[2019-09-18 09:59 UTC] cmb@php.net
[2019-09-19 07:18 UTC] cmb@php.net
[2019-09-19 07:18 UTC] cmb@php.net
-Status: Open
+Status: Closed
[2019-09-19 07:21 UTC] cmb@php.net
-Assigned To:
+Assigned To: cmb
[2019-09-23 13:22 UTC] asmqb7 at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ Unsure what's happening, so not going to make myself look silly with wild and probably incorrect guesses. (Something something FFI\CData not being able to tell the difference between "are you callable" and actually being called... I'll be curious to read the patch.) Just started playing with FFI, which is very fun. I look forward to the crazy and awesome things this is going to make possible. Thanks so much :) Stumbled on this because my d() routine (generic-everything dumper) crashed in its type detector function. (NB. The testcase below drops is_callable()'s return value, since it makes no difference.) Test script: --------------- <?php $ffi = FFI::cdef(' struct test { int dummy; }; '); $test = $ffi->new('struct test'); is_callable($test); Expected result: ---------------- For is_callable() to return false Actual result: -------------- Fatal error: Uncaught FFI\Exception: Attempt to call non C function pointer in ... Stack trace: #0 ...: is_callable(Object(FFI\CData:struct test))