The PHPTAL library is licensed under the terms of the GNU Lesser General Public License (the license allows use of PHPTAL in both free and commercial, closed-source projects).

Installation procedure

Manual installation

  1. Download latest tarball
  2. Unpack it (e.g. tar zxvf PHPTAL-1.3.0.tar.gz)
  3. Copy files from PHPTAL-1.3.0 directory to anywhere you like (your project or include directory)
  4. Include PHPTAL.php in your scripts (e.g. require_once "my/stuff/libs/phptal/PHPTAL.php";)


If you're using Composer to manage dependencies:

composer require phptal/phptal

PEAR installation

The latest stable release of PHPTAL (1.3.0) is always reachable via latest.tar.gz, and the following will work:

pear install
pear upgrade

Future versions

These versions are for testing. If you've found bug in PHPTAL, please check if it's not fixed already. Use of this code in production is risky.

Source code

You can access latest PHPTAL source code using Git or Subversion:

git clone git://

Your contributions are welcome! You can use git format-patch origin/master to send me patches, or fork on GitHub and make a Pull Request.

Old versions

You can also install older releases of PHPTAL using specific URLs:

pear install
pear upgrade