Encritary / streamfd

A simple PHP extension that allows to get the FD of a stream resource

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

streamfd

Build Status

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.

About

A simple PHP extension that allows to get the FD of a stream resource

License:MIT License


Languages

Language:PHP 56.4%Language:C 36.6%Language:M4 7.0%