sj-i/php-fuse: PHP FFI bindings for libfuse. You can write your own filesystems in PHP.

This page summarizes the projects mentioned and recommended in the original post on /r/PHP

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • php-fuse

    PHP FFI bindings for libfuse

  • The introduction of FFI in PHP was done with the reference to LuaJIT. As a result, FFI's CData is a completely dynamic type, similar to stdClass, and does not get proper support from the IDE or static analysis. For this reason, php-fuse has introduced a muddy mechanism to map CData to PHP classes. https://github.com/sj-i/php-fuse/tree/master/src/FFI It is a shame that CData is such a dynamic type since PHP nowadays is a language that easily benefits from static types, unlike Lua or Ruby. I'm hoping that I or someone else can come up with a better solution, such as allowing C types to be mapped to user-defined CData subclasses, as the idea was seen in the early discussions when FFI was introduced. https://externals.io/message/102036#102050

  • libfuse

    The reference implementation of the Linux FUSE (Filesystem in Userspace) interface

  • Well, one need do nothing more than look at the list of fuse-powered filesystems to get some ideas of why: https://github.com/libfuse/libfuse/wiki/Filesystems

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • reli-prof

    A sampling profiler or a memory profiler for PHP written in PHP, which reads information about running PHP VM from outside the process. You can find performance bottlenecks or memory leaks of your scripts without changing the target script or loading extensions.

  • There are a few things about FFI that bother me, though not so much the problems. These are things that I found a bit annoying, not only in this project but also in my experience with another project (https://github.com/sj-i/php-profiler). Let me try to share some of them with you.

  • phpstorm-stubs

    PHP runtime & extensions header files for PhpStorm

  • The other thing that bothers me is that most of the function arguments in FFI are ZEND_SEND_PREFER_REF, which sneakily tries to change the type of value I pass as an argument. This is not a documented behavior either. https://github.com/JetBrains/phpstorm-stubs/pull/777#issuecomment-620589391

  • php-ffi

    PHP Foreign Function Interface

  • So far this has not been a major issue in this project, but as mentioned in the RFC and the original FFI repository, the use of PHP callbacks involves leaks until the end of the process. https://wiki.php.net/rfc/ffi#php_callbacks https://github.com/dstogov/php-ffi#php-callbacks There is no detailed description of the leak, but it is probably the same problem as in LuaJIT. https://luajit.org/ext_ffi_semantics.html#callback_resources If you are using a few callbacks during a process execution, as in the php-fuse example, it seems to be okay. However, for example, if you try to use qsort() in a loop, the leakage caused by callbacks may be problematic. As in the case of LuaJIT, it is probably needed to provide an API to explicitly cast the callable to a function pointer that can be called from the C side, and also to provide a way to manually release it.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Reli 0.9.0 is released with a memory profiling tool

    1 project | /r/PHP | 26 Nov 2023
  • Show HN: Reli – a VM state inspector written in PHP for PHP

    1 project | news.ycombinator.com | 23 Nov 2023
  • sj-i/php-profiler: a sampling profiler for PHP written in PHP

    2 projects | /r/PHP | 6 Feb 2022
  • Database Abstraction Layers: I absolutely love $wpdb php class from Wordpress, why does nothing like this exist? Is Laravel similar?

    1 project | /r/PHPhelp | 22 May 2023
  • Random shower thought I got: PhpStorm developers are Java developers who know PHP better than most PHP developers

    1 project | /r/PHP | 23 Jan 2023