https://github.com/encritary/streamfd
A simple PHP extension that allows to get the FD of a stream resource
https://github.com/encritary/streamfd
fd parallel php php-extension php-parallel php7 php72 php73 php74 socket-sharing stream-sharing
Last synced: about 2 months ago
JSON representation
A simple PHP extension that allows to get the FD of a stream resource
- Host: GitHub
- URL: https://github.com/encritary/streamfd
- Owner: Encritary
- License: mit
- Created: 2020-05-16T11:04:13.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-16T12:57:08.000Z (about 5 years ago)
- Last Synced: 2025-04-09T20:04:57.170Z (about 2 months ago)
- Topics: fd, parallel, php, php-extension, php-parallel, php7, php72, php73, php74, socket-sharing, stream-sharing
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# streamfd
[](https://travis-ci.org/Encritary/streamfd)A simple PHP extension that allows you to get the FD of a stream resource.
# Building
```
git clone https://github.com/Encritary/streamfd.git
cd streamfd
phpize
./configure --enable-streamfd
make && make test && sudo make install
```# Usage
The extension adds only one new PHP function:
``streamfd(resource $stream) : int|bool``
It will return the file descriptor (a positive integer) of the given stream resource, or ``false`` if an error occurs.