Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
106 lines (69 sloc) 2.58 KB

Pheanstalk PHP 5.3 fork

Pheanstalk is a pure PHP 5.3+ client for the beanstalkd workqueue. It has been actively developed, and used in production by many, since late 2008.

Created by Paul Annesley, modified by Brian Nelson for PHP 5.3 namespaces, Pheanstalk is rigorously unit tested and written using encapsulated, maintainable object oriented design. Community feedback, bug reports and patches has led to a stable 1.0.0 release in 2010.

beanstalkd up to the latest version 1.4 is supported. All commands and responses specified in the protocol documentation for beanstalkd 1.3 are implemented.

Usage Example


// register Pheanstalk class loader

$pheanstalk = new \Pheanstalk('');

// ----------------------------------------
// producer (queues jobs)

  ->put("job payload goes here\n");

// ----------------------------------------
// worker (performs jobs)

$job = $pheanstalk

echo $job->getData();



Running the tests

# ensure you have simpletest
$ git submodule init
$ git submodule update

$ ./tests/runtests.php
All Tests
Test cases run: 4/4, Passes: 103, Failures: 0, Exceptions: 0

# extra tests relying on a beanstalkd on
$ ./tests/runtests.php --with-server
All Tests
Test cases run: 7/7, Passes: 198, Failures: 0, Exceptions: 0

$ ./tests/runtests.php --help

CLI test runner.

Available options:

  --with-server      Includes tests which connect to a beanstalkd server
  --testfile   Only run the specified test file.
  --help             This documentation.



(c) Paul Annesley

Released under the The MIT License

Jump to Line
Something went wrong with that request. Please try again.