nikic / scalar_objects

Extension that adds support for method calls on primitive types in PHP
MIT License
1.13k stars 44 forks source link

Can this extention be ported to FFI? #39

Closed HallofFamer closed 4 years ago

HallofFamer commented 4 years ago

I am curious with the new FFI feature in PHP 7.4, is it possible to rewrite this extension in PHP so it can be enabled for servers that does not allow root access(ie. a client is on a shared host, but wants to use my scalar objects/classes library)? Or perhaps FFI has its limitations and such things cannot be done?

rask commented 4 years ago

FFI itself requires root access to be usable though, unless you plan on running CLI apps only, otherwise you need to alter the main PHP-FPM INI file, which is not possible on 99% of shared hosts (if I understand what you mean with shared hosts).

nikic commented 4 years ago

It's probably possible using https://github.com/lisachenko/z-engine.