{"id":15642114,"url":"https://github.com/shivammathur/php-builder","last_synced_at":"2025-04-09T13:11:28.477Z","repository":{"id":43899133,"uuid":"242026464","full_name":"shivammathur/php-builder","owner":"shivammathur","description":":elephant: Build PHP 5.6 and newer","archived":false,"fork":false,"pushed_at":"2025-03-17T00:42:55.000Z","size":4302,"stargazers_count":66,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T12:07:26.994Z","etag":null,"topics":["nightly-build","php","php8","ubuntu1804","ubuntu2004","ubuntu2204"],"latest_commit_sha":null,"homepage":"https://github.com/shivammathur/php-builder/releases","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shivammathur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"shivammathur"}},"created_at":"2020-02-21T01:13:34.000Z","updated_at":"2025-03-17T00:42:58.000Z","dependencies_parsed_at":"2023-10-11T05:28:54.052Z","dependency_job_id":"604de7da-bb85-49ff-98f9-3e7ba38ae1ac","html_url":"https://github.com/shivammathur/php-builder","commit_stats":{"total_commits":1203,"total_committers":6,"mean_commits":200.5,"dds":0.006650041562759723,"last_synced_commit":"6624133abc944ef5688890f18cc06b037affab00"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivammathur%2Fphp-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivammathur%2Fphp-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivammathur%2Fphp-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivammathur%2Fphp-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shivammathur","download_url":"https://codeload.github.com/shivammathur/php-builder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045266,"owners_count":21038555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nightly-build","php","php8","ubuntu1804","ubuntu2004","ubuntu2204"],"created_at":"2024-10-03T11:54:36.858Z","updated_at":"2025-04-09T13:11:28.460Z","avatar_url":"https://github.com/shivammathur.png","language":"Shell","readme":"# PHP Builder\n\n\u003ca href=\"https://github.com/shivammathur/php-builder\" title=\"PHP Builder\"\u003e\u003cimg alt=\"Build status\" src=\"https://github.com/shivammathur/php-builder/workflows/Build%20PHP/badge.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/shivammathur/php-builder/blob/main/LICENSE\" title=\"license\"\u003e\u003cimg alt=\"LICENSE\" src=\"https://img.shields.io/badge/license-MIT-428f7e.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/shivammathur/php-builder/tree/main/builds\" title=\"builds\"\u003e\u003cimg alt=\"PHP Versions Supported\" src=\"https://img.shields.io/badge/php-5.6 to 8.5-8892BF.svg\"\u003e\u003c/a\u003e\n\n- This projects builds PHP 5.6 and above (including a nightly build from the master branch of PHP) on `Ubuntu` and `Debian`.\n- To install PHP, follow the instructions in the [install](#install) section.\n- To download a PHP build, refer to the [builds](#Builds) section.\n\n## Contents\n\n- [OS Support](#os-support)\n- [Install](#install)\n- [Extensions](#extensions)\n- [JIT](#jit)\n- [SAPI Support](#sapi-support)\n- [Builds](#builds)\n- [Uninstall](#uninstall)\n- [Related Projects](#related-projects)\n- [License](#license)\n- [Dependencies](#dependencies)\n\n## OS Support\n\n- Ubuntu 20.04 (Focal) amd64\n- Ubuntu 22.04 (Jammy) amd64\n- Ubuntu 24.04 (Noble) amd64\n- Debian 11 (Bullseye) amd64\n- Debian 12 (Bookworm) amd64\n\nAll other distributions based on the above operating systems will also be supported on best effort basis.\n\n## Install\n\n- Fetch the installer:\n\n```bash\ncurl -sSLO https://github.com/shivammathur/php-builder/releases/latest/download/install.sh\nchmod a+x ./install.sh\n```\n\nThe installer takes the following options:\n```bash\n./install.sh \u003cphp-version\u003e \u003crelease|debug\u003e \u003cnts|zts\u003e\n```\n\nThe `php-version` is required, and `release` and `nts` are the defaults. \n\n- release: No debugging symbols\n- debug: With debugging symbols\n- nts: Non Thread Safe\n- zts: Thread Safe\n\n### Examples\n\n- To install `PHP 8.4` without debugging symbols and non thread safe:\n\n```bash\n./install.sh 8.4\n```\n\n- or, to install `PHP 8.4` with debugging symbols and thread safe:\n\n```bash\n./install.sh 8.4 debug zts\n```\n\n- Finally, test your PHP version:\n\n```bash\nphp -v\n```\n\n**Notes:**\n\n- All PHP versions have the prefix `/usr` and the directory structure will be same as that of the official Debian builds.\n- Any pre-existing extensions INI configuration for the PHP version will be removed upon installation.\n- The installer will switch to the PHP version you installed.\n\n\n## Extensions\n\n\u003cul\u003e\u003cli\u003e\u003cdetails\u003e\n  \u003csummary\u003eExpand to check the extensions installed along with PHP.\u003c/summary\u003e\n  \u003cbr\u003e\n\n`amqp`, `apcu`, `ast`, `bcmath`, `bz2`, `calendar`, `Core`, `ctype`, `curl`, `date`, `dba`, `dom`, `ds`, `enchant`, `exif`, `FFI`, `fileinfo`, `filter`, `ftp`, `gd`, `gettext`, `gmp`, `hash`, `iconv`, `igbinary`, `imagick`, `imap`, `intl`, `json`, `ldap`, `libxml`, `mbstring`, `memcache`, `memcached`, `mongodb`, `msgpack`, `mysqli`, `mysqlnd`, `odbc`, `openssl`, `pcntl`, `pcov`, `pcre`, `PDO`, `pdo_dblib`, `PDO_Firebird`, `pdo_mysql`, `PDO_ODBC`, `pdo_pgsql`, `pdo_sqlite`, `pdo_sqlsrv`, `pgsql`, `Phar`, `posix`, `pspell`, `readline`, `redis`, `Reflection`, `session`, `shmop`, `SimpleXML`, `soap`, `sockets`, `sodium`, `SPL`, `sqlite3`, `sqlsrv`, `standard`, `sysvmsg`, `sysvsem`, `sysvshm`, `tidy`, `tokenizer`, `xdebug`, `xml`, `xmlreader`, `xmlwriter`, `xsl`, `zip`, `zlib`, `Xdebug`, `Zend OPcache`\n\n\u003c/details\u003e\u003c/li\u003e\u003c/ul\u003e\n\n- Extension PCOV is disabled by default as Xdebug is enabled.\n\n- You can switch to PCOV by disabling Xdebug using `phpdismod` and enabling it using `phpenmod`.\n\n```bash\nphpdismod -v \u003cALL|php-version\u003e -s \u003cALL|sapi-name\u003e xdebug\nphpenmod -v \u003cALL|php-version\u003e -s \u003cALL|sapi-name\u003e pcov\n```\n\n- More extensions can also be installed from [`ppa:ondrej/php`](https://launchpad.net/~ondrej/+archive/ubuntu/php)\n\n- `PECL` is also installed along with PHP, so compatible extensions can also be installed using it. These will be enabled using the `pecl.ini` module which is linked to all SAPIs.\n\n```bash\npecl install \u003cextension\u003e\n```\n\n## JIT\n\nPHP 8.0 and above versions have a JIT(Just-In-Time) compiler.\n\nIt is disabled by default, and can be enabled by the following steps:\n\n- First, disable Xdebug and PCOV as they are not compatible with JIT.\n\n```bash\nphpdismod -v \u003cALL|php-version\u003e -s \u003cALL|sapi-name\u003e xdebug pcov\n```\n\n- Then enable JIT using the `switch_jit` script for the same PHP versions and SAPIs.\n\n```bash\nswitch_jit -v \u003cALL|php-version\u003e -s \u003cALL|sapi-name\u003e enable -m \u003cjit_mode\u003e -b \u003cjit_buffer_size\u003e\n```\n\nIf you do not specify `-m` or `-b`, the default for JIT mode is `tracing`, and for JIT buffer size it is `128M`.\n\n- If you get a warning about incompatible extensions, check if you installed any other third-party extensions which are incompatible with JIT.\n\nTo disable JIT:\n\n```bash\nswitch_jit -v \u003cphp-version\u003e -s \u003cALL|sapi-name\u003e disable\n```\n\n## SAPI support\n\nThese SAPIs are installed by default:\n\n- `apache2-handler`\n- `cli`\n- `cgi`\n- `embed`\n- `fpm`\n- `phpdbg`\n\nThese SAPI:server configurations can be set up with the `switch_sapi` script:\n\n- `apache:apache` (apache2-handler with Apache)\n- `fpm:apache` (php-fpm with Apache)\n- `cgi:apache` (php-cgi with Apache)\n- `fpm:nginx` (php-fpm with Nginx)\n\n```bash\nswitch_sapi -v \u003cphp-version\u003e -s \u003csapi|sapi:server\u003e\n```\n\n**Note:** When you run `switch_sapi`, the servers will have the default document root `/var/www/html`.\n\n## Builds\n\nThe following releases have `nts` and `zts` builds for the following PHP versions along with builds with and without debugging symbols.\n\n- [PHP 8.5.0-dev](https://github.com/shivammathur/php-builder/releases/tag/8.5)\n- [PHP 8.4.x](https://github.com/shivammathur/php-builder/releases/tag/8.4)\n- [PHP 8.3.x](https://github.com/shivammathur/php-builder/releases/tag/8.3)\n- [PHP 8.2.x](https://github.com/shivammathur/php-builder/releases/tag/8.2)\n- [PHP 8.1.x](https://github.com/shivammathur/php-builder/releases/tag/8.1)\n- [PHP 8.0.30](https://github.com/shivammathur/php-builder/releases/tag/8.0)\n- [PHP 7.4.33](https://github.com/shivammathur/php-builder/releases/tag/7.4)\n- [PHP 7.3.33](https://github.com/shivammathur/php-builder/releases/tag/7.3)\n- [PHP 7.2.34](https://github.com/shivammathur/php-builder/releases/tag/7.2)\n- [PHP 7.1.33](https://github.com/shivammathur/php-builder/releases/tag/7.1)\n- [PHP 7.0.33](https://github.com/shivammathur/php-builder/releases/tag/7.0)\n- [PHP 5.6.40](https://github.com/shivammathur/php-builder/releases/tag/5.6)\n\n## Uninstall\n\n- Fetch the installer:\n\n```bash\ncurl -sSLO https://github.com/shivammathur/php-builder/releases/latest/download/install.sh\nchmod a+x ./install.sh\n```\n\n- Then, to remove `PHP 8.4`:\n\n```bash\n./install.sh --remove 8.4\n```\n\nor, to remove `PHP 8.3`:\n\n```bash\n./install.sh --remove 8.3\n```\n\n## Related Projects\n- [shivammathur/homebrew-php](https://github.com/shivammathur/homebrew-php)\n- [shivammathur/php-builder-windows](https://github.com/shivammathur/php-builder-windows)\n- [shivammathur/setup-php](https://github.com/shivammathur/setup-php)\n\n## License\n\nThe scripts and documentation in this project are under the [MIT license](LICENSE). This project has multiple [dependencies](#dependencies). Their licenses can be found in their respective repositories.\n\n## Dependencies\n\n- [AMQP](https://github.com/php-amqp/php-amqp \"AMQP PHP Extension\")\n- [APCU](https://github.com/krakjoe/apcu \"APCU PHP Extension\")\n- [AST](https://github.com/nikic/php-ast \"AST PHP Extension\")\n- [Deb.sury.org](https://github.com/oerdnj/deb.sury.org \"PHP packaging for Ubuntu and Debian\")\n- [igbinary](https://github.com/igbinary/igbinary \"Igbinary PHP Extension\")\n- [Imagick](https://github.com/Imagick/imagick \"Imagick PHP Extension\")\n- [Memcache](https://github.com/websupport-sk/pecl-memcache \"Memcache PHP Extension\")\n- [Memcached](https://github.com/php-memcached-dev/php-memcached \"Memcached PHP Extension\")\n- [Msgpack](https://github.com/msgpack/msgpack-php \"Msgpack PHP Extension\")\n- [Msphpsql](https://github.com/microsoft/msphpsql \"Sqlsrv and pdo_sqlsrv extensions\")\n- [PEAR](https://github.com/pear/pear-core \"PEAR PHP extension installer\")\n- [PCOV](https://github.com/krakjoe/pcov \"PCOV PHP Extension\")\n- [PHP](https://github.com/php/php-src \"PHP Upstream project\")\n- [php-build](https://github.com/php-build/php-build \"php-build project\")\n- [PhpRedis](https://github.com/phpredis/phpredis \"Redis PHP Extension\")\n- [Xdebug](https://github.com/xdebug/xdebug \"Xdebug PHP Extension\")\n- [YAML](https://github.com/php/pecl-file_formats-yaml \"YAML PHP Extension\")\n","funding_links":["https://github.com/sponsors/shivammathur"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivammathur%2Fphp-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshivammathur%2Fphp-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivammathur%2Fphp-builder/lists"}