| Prev | Next |
PHAR is another format of PHP distribution packages. Generaly, it's idea is very similar to PHK packages, but it differs in many technical aspects. You can find more info about PHAR in PHP manual.
The most important difference is, that PHAR requires additional binary extension (PHK packages work just as PHP files, you don't need any additional extensions) which means people who don't know how to use PECL or simply people who won't be able to compile own extensions will be unable to use PHAR archives.
Unfortunately PHAR extension requires PHP in version 5.2 or newer so if you don't have such then you won't be able to work with PHAR archives.
The only difference between PHK and PHAR archives is that PHAR archives are transparently visible as files tree so you only change the location of OTS.php file. Rest of your code stays unaffected - nothing changes like with PHK archive. Here is simple startup script:
As you can see it differes from normal startup script and PHK startup script only with file inclusion line.
To work with PHAR package, whether you want to modify it or only load, you need to have PECL PHAR extension installed in your PHP. You can install it by using 'pecl install phar' (recommended way).
| Prev | Up | Next |
| PHK package | Additional info | Deprecations |