forked from julkiewicz/libphutil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
50 lines (38 loc) · 1.88 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
WHAT IS LIBPHUTIL?
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
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.
Filesystem
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.
xsprintf
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
AAST/PHPAST
An abstract, abstract syntax tree which can make it easier to perform simple
static analysis, and a concrete AST for PHP.
Remarkup
A Markdown-like lightweight markup language. Remarkup's syntax is defined by
parser plugins and fairly easy to extend and configure.
Daemons
Enables running PHP scripts as stable, long-lived daemons.
Utilities
A handful of solid utility functions.
libphutil is used by Phabricator, Arcanist and Diviner.
LICENSE
libphutil is released under the Apache 2.0 license except as otherwise noted.