A collection of scripts for building PHP Intl with a custom ICU version.
Originally created for CentOS, but you are free to adapt them for any Linux distribution.
This project was inspired by the excellent work in shivammathur/icu-intl
If you are on Ubuntu, that project may suit your needs better and is highly recommended.
Before using the scripts, ensure your environment is correctly prepared.
For CentOS, run:
sudo yum install centos-release-scl -y
# yum list available | grep devtoolset
sudo yum install devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutilssudo yum install php-develClone or download the repository icu-intl by shivammathur:
https://github.com/shivammathur/icu-intl
Place it in a directory accessible to these build.sh script (set this path in the configuration variables of build.sh too).
Before executing any script, open the file and review the configuration block at the top to ensure it matches your system setup and desired ICU/PHP paths.
Builds:
- The ICU library (custom version)
- The PHP Intl extension compiled against the built ICU
Applies the newly built intl.so with the following behavior:
- Automatically creates a backup of the original module
- Restores the original version if any issue occurs
❤️ Good Luck!