PHPackages                             php-io-extensions/posi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. php-io-extensions/posi

ActivePhp-ext[Utility &amp; Helpers](/categories/utility)

php-io-extensions/posi
======================

PHP-Controllable UNIX POSIX Extension

0.4.8(2w ago)026↓66.7%MITCPHP &gt;=8.0

Since May 21Pushed 1w agoCompare

[ Source](https://github.com/php-io-extensions/posi)[ Packagist](https://packagist.org/packages/php-io-extensions/posi)[ RSS](/packages/php-io-extensions-posi/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (6)Used By (0)

Posi - The POSIX extension to unlock PHP's System Call ability.
===============================================================

[](#posi---the-posix-extension-to-unlock-phps-system-call-ability)

This project provides bindings to the UNIX Portable Operating System Interface (POSIX).

Extension repository:

Highlights
----------

[](#highlights)

- Retrieve file descriptors to replace `fopen`
- Read and write to file descriptors beyond streams, replacing `fread` and `fwrite`
- Direct access to `fcntl`
- Direct access to `ioctl`

Requirements
------------

[](#requirements)

- PHP 8.3+

Compilation Requirements
------------------------

[](#compilation-requirements)

- A C language toolchain
- Manual installation

    - Zephir PHP
    - ext-zephir\_parser
- Automated installation

    - PIE

Manual compilation instructions
-------------------------------

[](#manual-compilation-instructions)

### Zephir

[](#zephir)

- Clone this repository and checkout the release to use (or master for the latest updates)
- `cd posi`
- Run the installer for your platform
    - Raspberry Pi: `bash install-debian-trixie.sh`
    - macOS: `bash install-macos.sh`
    - Jetson Orin (Nano Super): `bash install-jetpack6.sh`
    - The installer will compile the extension and add it to your PHP ini automatically

### PIE

[](#pie)

- NOTE: If using Laravel Herd to serve PHP, use Zephir via the install scripts.
- Clone this repository and checkout the release to use (or master for the latest updates)
- `cd posi`
- `pie install`

Automated compilation instructions
----------------------------------

[](#automated-compilation-instructions)

- `pie install php-io-extensions/posi`
- The installer should compile and stash the extension where the default PHP binary stores its ini.
- If PIE does not automatically enable the extension, add it to your `php.ini` (module name is typically `pposix`):

    ```
    extension=posi
    ```

Usage
-----

[](#usage)

POSIX I/O is invoked through the `Posi\System` class. All methods are static.

```
