ffi / location
PHP library for determining the physical location of binaries
1.1.0
2026-10-24 14:24 UTC
Requires
- php: ^7.4|^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.3
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^9.6|^10.5|^11.0|^12.0|^13.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-24 20:37:42 UTC
README
Library for searching binary files in the operating system.
Requirements
- PHP >= 7.4
Installation
Library is available as a Composer repository and can be installed using the following command in the root of your project.
$ composer require ffi/location
Usage
Existence Check
Checking the library for existence.
use FFI\Location\Locator; $exists = Locator::exists('libGL.so'); // Expected true in the case that the binary exists and false otherwise
Binary Pathname
Getting the full path to the library.
use FFI\Location\Locator; $pathname = Locator::pathname('libGL.so'); // Expected "/usr/lib/x86_64-linux-gnu/libGL.so.1.7.0" or null // in the case that the library cannot be found
Binary Resolving
Checking multiple names to find the most suitable library.
use FFI\Location\Locator; $pathname = Locator::resolve('example.so', 'test.so', 'libvulkan.so'); // Expected "/usr/lib/x86_64-linux-gnu/libvulkan.so.1.2.131" or null // in the case that the library cannot be found