Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

libphutil is a collection of utility classes for PHP. Currently an unstable preview release.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 resources
Octocat-spinner-32 scripts
Octocat-spinner-32 src
Octocat-spinner-32 support
Octocat-spinner-32 .arcconfig
Octocat-spinner-32 .divinerconfig
Octocat-spinner-32 .editorconfig
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 NOTICE
Octocat-spinner-32 README

libphutil is a collection of utility classes and functions for PHP. Some
features of the library include:

libphutil Library System
  A system for organizing, loading and introspecting PHP classes and functions.
  Uses static analysis to generate, validate and update library contents and
  includes. Based on Facebook's similar 'flib' system.

  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 two provided concrete
  Future implementations: ExecFuture for executing system commands, and
  HTTPFuture for making HTTP requests.

  The builtin PHP filesystem functions return error codes and emit warnings.
  It is tedious to check these consistently. The Filesystem class provides a
  simple API for common filesystem operations that throws exceptions on failure.

  This module allows you to build sprintf()-style functions that have arbitrary
  conversions. This is particularly useful for escaping data correctly. Three
  concrete implementations are provided:
    csprintf(): safely escape data for system commands
    jsprintf(): safely escape data for Javascript
    qsprintf(): safely escape data for MySQL (in Phabricator)

  An abstract, abstract syntax tree which can make it easier to perform simple
  static analysis, and a concrete AST for PHP.

  A Markdown-like lightweight markup language. Remarkup's syntax is defined by
  parser plugins and fairly easy to extend and configure.

  Enables running PHP scripts as stable, long-lived daemons.

  A handful of solid utility functions.

libphutil is used by Phabricator, Arcanist and Diviner.


libphutil is released under the Apache 2.0 license except as otherwise noted.
Something went wrong with that request. Please try again.