asdf-php icon indicating copy to clipboard operation
asdf-php copied to clipboard

Enable opcache for php 5.5.0+

Open joec4i opened this issue 2 years ago • 0 comments

opcache is bundled with PHP 5.5.0 and later, so --enable-opcache should work with all versions >= 5.5.0.

I'm not entirely sure if we need the version check, since all currently supported php versions have opcache included. But I included the version check in the PR anyway, because I'm not 100% sure if anyone uses asdf-php to install very old versions of PHP.

This was tested locally.

$ php -i | grep opcache Configure Command => './configure' '--with-gmp=/usr/local/opt/gmp' '--with-sodium=/usr/local/opt/libsodium' '--with-freetype-dir=/usr/local/opt/freetype' '--with-gettext=/usr/local/opt/gettext' '--with-icu-dir=/usr/local/opt/icu4c' '--with-jpeg-dir=/usr/local/opt/jpeg' '--with-webp-dir=/usr/local/opt/webp' '--with-png-dir=/usr/local/opt/libpng' '--with-openssl=/usr/local/opt/[email protected]' '--with-libxml-dir=/usr/local/opt/libxml2' '--with-libzip=/usr/local/opt/libzip' '--with-readline=/usr/local/opt/readline' '--with-iconv=/usr/local/opt/libiconv' '--prefix=/Users/joe.cai/.asdf/installs/php/8.0.20' '--enable-bcmath' '--enable-calendar' '--enable-dba' '--enable-exif' '--enable-fpm' '--enable-ftp' '--enable-gd' '--enable-gd-native-ttf' '--enable-intl' '--enable-mbregex' '--enable-mbstring' '--enable-mysqlnd' '--enable-pcntl' '--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--enable-zip' '--sysconfdir=/Users/joe.cai/.asdf/installs/php/8.0.20' '--with-config-file-path=/Users/joe.cai/.asdf/installs/php/8.0.20' '--with-config-file-scan-dir=/Users/joe.cai/.asdf/installs/php/8.0.20/conf.d' '--with-curl' '--with-external-gd' '--with-fpm-group=www-data' '--with-fpm-user=www-data' '--with-gd' '--with-mhash' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-xmlrpc' '--with-zip' '--with-zlib' '--without-snmp' '--enable-opcache' '--with-pear' '--with-pdo-pgsql' 'PKG_CONFIG_PATH=/usr/local/opt/[email protected]/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/krb5/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:'

$ php -v
PHP 8.0.20 (cli) (built: Jun 22 2022 20:33:48) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.20, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.20, Copyright (c), by Zend Technologies

Please review. Thanks!

joec4i avatar Jun 22 '22 10:06 joec4i