Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Phar

Phar is the PHP Archive. It groups multiple files into a single one, and allows the direct execution or inclusion of that code.

ext/phar is also a PHP extension, used to create and read the PHAR archives.

Phar archives may be zipped.

<?php

    $phar = new Phar('myphar.phar');
    $pgz = $phar->convertToExecutable(Phar::TAR, Phar::GZ); // makes myphar.phar.tar.gz

?>

Documentation

See Also