php-src development with Docker Compose and VSCode Dev Containers
Make sure you have the Dev Containers extension installed in VSCode.
- Clone this project and open in VSCode
- Select Dev Containers: Reopen in Container from the command palette
- Obtaining and building source code as follows:
When connecting to the container, the current directory is set to /home/build/php-src. Then enter the following command:
# Obtain source code
git clone https://github.com/php/php-src.git ./
# Generate configure
./buildconf -f
# **For example:** configure the build settings as follows:
./configure \
--enable-bcmath \
--enable-calendar \
--enable-dba \
--enable-debug \
--enable-dl-test=shared \
--enable-exif \
--enable-ftp \
--enable-gd \
--enable-mbstring \
--enable-option-checking=fatal \
--enable-pcntl \
--enable-shmop \
--enable-soap \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-xmlreader \
--enable-zend-test \
--with-bz2 \
--with-curl \
--with-ffi \
--with-freetype \
--with-gettext \
--with-gmp \
--with-iconv \
--with-jpeg \
--with-libxml \
--with-mhash \
--with-mysqli=mysqlnd \
--with-openssl \
--with-pdo-firebird \
--with-pdo-mysql=mysqlnd \
--with-pdo-pgsql \
--with-pdo-sqlite \
--with-pgsql \
--with-readline \
--with-sodium \
--with-tidy \
--with-webp \
--with-xsl \
--with-zip \
--with-zlib \
# Build the binaries
make -j$(nproc)
- You can connect to PostgreSQL or MySQL by simply typing
psql
/mysql
. No command line options are required. ./sapi/cli/
is set in PATH. Just runphp
and the binary you built will be executed.
I want to support as many extensions and libraries as possible. If there is something that should be addressed on a priority basis, please open an issue. Pull requests are also welcome.
MIT