PHPackages                             hazbo/futures - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. hazbo/futures

ActiveLibrary[HTTP &amp; Networking](/categories/http)

hazbo/futures
=============

Make asynchronous http requests or run system commands asynchronously!

315PHP

Since Aug 30Pushed 12y ago1 watchersCompare

[ Source](https://github.com/hazbo/Future)[ Packagist](https://packagist.org/packages/hazbo/futures)[ RSS](/packages/hazbo-futures/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Futures
=======

[](#futures)

Define: **Futures** -

"Futures (also known as "promises") are objects which act as placeholders for some future result of computation. They let you express parallel and asynchronous execution with a natural syntax. There are three provided concrete Future implementations: ExecFuture for executing system commands, HTTPFuture for making HTTP requests, and QueryFuture for executing database queries." - *Facebook*

This is all true, however *this* library only supports http requests and the ability to execute system commands, asynchronously (or synchronously).

### What is it?

[](#what-is-it)

This set of files was originaly forked from Facebook's [libphutil](https://github.com/facebook/libphutil) which has some pretty nifty little tools, you should go check it out!

These libraries are for everything in the `src/future` so I've namespaced them up, cleaned up the code to follow PSR standards (not finished!) and have only tested a very small part of it; making http requests.

### Install

[](#install)

You can add this component to your project using composer:

```
{
	"require" : {
		"hazbo/futures" : "dev-master"
	}
}
```

`composer install` or `php composer.phar install`

### Asynchronously

[](#asynchronously)

```
