fdopen extension for PHP