More PHP 7 info The PHP 7 Revolution: Return Types and Removed Artifacts
real world PHP 7 matches HHVM right now and without the common HHVM memory leak and memory creep (raising memory usage over time) problems
Yes i think we don't need HHVM with this new version of PHP 7 but we want an improvement on bench.php
PHP7 also experimenting JIT/AOT. Zend JIT Open Sourced - [PHP-DEV] Zend JIT Open Sourced Source - php-src/ext/opcache/jit at zend-jit · zendtech/php-src · GitHub
From php-src/ext/opcache/jit at zend-jit · zendtech/php-src · GitHub it explains why bench.php performance doesn't equate to real life performance and why for real life apps PHP 7 and HHVM are now closely matched ?
testing out new .08 beta PHP upgrade routine now allows for PHP version 7.0.0 input as well as a NGDEBUG version input. 7.0.0 version input at PHP upgrade prompted version, lets you compile normally even with incompatible PHP 7 extensions which will give errors (see example below of PHP Startup: Unable to load dynamic library errors). NGDEBUG version input at PHP version prompt, will remove all known incompatible PHP 7 extensions so there are no errors. both 7.0.0 or NGDEBUG will successfully compile PHP 7.0.0 though just you will need to manually remove incompatible PHP 7 extensions' *.ini files if you select 7.0.0. NGDEBUG auto removes those .ini files already. manual removal includes Code: rm -rf /etc/centminmod/php.d/geoip.ini rm -rf /etc/centminmod/php.d/igbinary.ini rm -rf /etc/centminmod/php.d/imagick.ini rm -rf /etc/centminmod/php.d/memcache.ini rm -rf /etc/centminmod/php.d/memcached.ini Code: -------------------------------------------------------- Centmin Mod 1.2.3-eva2000.08 - http://centminmod.com -------------------------------------------------------- Centmin Mod Menu -------------------------------------------------------- 1). Centmin Install 2). Add Nginx vhost domain 3). NSD setup domain name DNS 4). Nginx Upgrade / Downgrade 5). PHP Upgrade / Downgrade 6). XCache Re-install 7). APC Cache Re-install 8). XCache Install 9). APC Cache Install 10). Memcached Server Re-install 11). MariaDB 5.2, 5.5, 10 Upgrade Sub-Menu 12). Zend OpCache Install/Re-install 13). Install ioping.sh vbtechsupport.com/1239/ 14). SELinux disable 15). Install/Re-install ImageMagick PHP Extension 16). Change SSHD Port Number 17). Multi-thread compression: pigz,pbzip2,lbzip2,p7zip etc 18). Suhosin PHP Extension install 19). Install FFMPEG and FFMPEG PHP Extension 20). NSD Re-install 21). Update - Nginx + PHP-FPM + Siege 22). Exit -------------------------------------------------------- Enter option [ 1 - 22 ] 5 -------------------------------------------------------- Code: Do you want to run YUM install checks ? [y/n] This will increase your upgrade duration time wise. Check the change log centminmod.com/changelog.html to see if any Nginx or PHP related new additions which require checking YUM prequisites are met. If no new additions made, you can skip the YUM install check to speed up upgrade time. [y/n]: n PHP Upgrade - Would you like to continue? [y/n] y ---------------------------------------------------------------- Install which version of PHP? (version i.e. 5.4.38, 7.0.0, NGDEBUG) PHP 7.0.0 is experimental in alpha status and may have broken PHP extensions. NGDEBUG is PHP 7.0.0 minus incompatible PHP extensions ---------------------------------------------------------------- Enter PHP Version number you want to upgrade/downgrade to: 7.0.0 ---------------------------------------------------------------- Want to update to latest php-fpm.conf ? (overwrites will auto backup existing php-fpm.conf) existing php.ini will be backed up at /usr/local/lib/php.ini-oldversion_090315-115606 existing php-fpm.conf will be backed up at /usr/local/etc/php-fpm.conf-oldversion_090315-115606 ---------------------------------------------------------------- Update & overwrite your existing php-fpm.conf [y/n]: y ---------------------------------------------------------------- PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20141001/apc.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20141001/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20141001/igbinary.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20141001/igbinary.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20141001/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20141001/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: memcache: Unable to initialize module Module compiled with module API=20100525 PHP compiled with module API=20141001 These options need to match in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/memcached.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/memcached.so: undefined symbol: zval_used_for_init in Unknown on line 0 Downloading PHP 7.0 from https://git.php.net/repository/php-src.git Cloning into 'php-7.0.0'... on completion of upgrade input PHP version = 7.0.0 which has broken incompatible PHP7 extensions and example of auto backup which has been in place for ages but you folks may not have noticed it Code: Backing up existing php-fpm.conf at /usr/local/etc/php-fpm.conf-oldversion_090315-115606 If you have made an custom changes to /usr/local/etc/php-fpm.conf, you will find they still exist in backup at /usr/local/etc/php-fpm.conf-oldversion_090315-115606 -rw-r--r-- 1 root root 2.0K Mar 9 10:57 php-fpm.conf-oldversion_090315-104806 -rw-r--r-- 1 root root 2.0K Mar 9 10:57 php-fpm.conf -rw-r--r-- 1 root root 4.4K Mar 9 12:02 php-fpm.conf.default -rw-r--r-- 1 root root 2.0K Mar 9 12:02 php-fpm.conf-oldversion_090315-115606 Backing up existing php.conf at /usr/local/nginx/conf/php.conf-oldversion_090315-115606 If you have made an custom changes to /usr/local/nginx/conf/php.conf, you will find they still exist in backup at /usr/local/nginx/conf/php.conf-oldversion_090315-115606 -rw-r--r-- 1 root root 2.5K Mar 9 10:57 php.conf-oldversion_090315-104806 -rw-r--r-- 1 root root 2.4K Mar 9 10:57 php.conf -rw-r--r-- 1 root root 2.4K Mar 9 12:02 php.conf-oldversion_090315-115606 example of PHP Warning: PHP Startup: Unable to load dynamic library for incompatible PHP 7 extensions which require manual removal of their respective *.ini files if you choose PHP version 7.0.0 at upgrade time. Code: service php-fpm restart Gracefully shutting down php-fpm done Starting php-fpm [09-Mar-2015 12:02:58] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20141001/apc.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20141001/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0 [09-Mar-2015 12:02:58] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20141001/igbinary.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20141001/igbinary.so: cannot open shared object file: No such file or directory in Unknown on line 0 [09-Mar-2015 12:02:58] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20141001/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20141001/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0 [09-Mar-2015 12:02:58] NOTICE: PHP message: PHP Warning: PHP Startup: memcache: Unable to initialize module Module compiled with module API=20100525 PHP compiled with module API=20141001 These options need to match in Unknown on line 0 [09-Mar-2015 12:02:58] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/memcached.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/memcached.so: undefined symbol: zval_used_for_init in Unknown on line 0 done ************************************************* Mon Mar 9 12:02:18 UTC 2015 Success: PHP was installed properly ************************************************* *************************************************** * PHP upgraded and auto reinstalled PHP extensions *************************************************** manual removal of incompatible PHP 7 extension *.ini files Code: rm -rf /etc/centminmod/php.d/geoip.ini rm -rf /etc/centminmod/php.d/igbinary.ini rm -rf /etc/centminmod/php.d/imagick.ini rm -rf /etc/centminmod/php.d/memcache.ini rm -rf /etc/centminmod/php.d/memcached.ini and you have PHP 7.0.0 for testing Code: php -v PHP 7.0.0-dev (cli) (built: Mar 9 2015 12:01:31) Copyright (c) 1997-2015 The PHP Group Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies
forgot to re-add detection for Zend Opcache for PHP 7.0.0 and NGDEBUG version inputs on centmin.sh menu option 5 for PHP upgrades Code: Do you want to run YUM install checks ? [y/n] This will increase your upgrade duration time wise. Check the change log centminmod.com/changelog.html to see if any Nginx or PHP related new additions which require checking YUM prequisites are met. If no new additions made, you can skip the YUM install check to speed up upgrade time. [y/n]: n PHP Upgrade - Would you like to continue? [y/n] y ---------------------------------------------------------------- Install which version of PHP? (version i.e. 5.4.38, 7.0.0, NGDEBUG) PHP 7.0.0 is experimental in alpha status and may have broken PHP extensions. NGDEBUG is PHP 7.0.0 minus incompatible PHP extensions ---------------------------------------------------------------- Enter PHP Version number you want to upgrade/downgrade to: 7.0.0 ---------------------------------------------------------------- Want to update to latest php-fpm.conf ? (overwrites will auto backup existing php-fpm.conf) existing php.ini will be backed up at /usr/local/lib/php.ini-oldversion_090315-122200 existing php-fpm.conf will be backed up at /usr/local/etc/php-fpm.conf-oldversion_090315-122200 ---------------------------------------------------------------- Update & overwrite your existing php-fpm.conf [y/n]: y ---------------------------------------------------------------- Downloading PHP 7.0 from https://git.php.net/repository/php-src.git Cloning into 'php-7.0.0'... Download PHP 7.0 completed Creating tar archive ----------------------------------------------------------------------------------------- Detected PHP 7.0 branch. You can compile Zend OPcache (Zend Optimizer Plus+) support as an alternative to using APC Cache or Xcache cache. But Zend OPcache only provides PHP opcode cache and DOESN'T do data caching, so if you web apps such as Wordpress, Drupal or vBulletin require data caching to APC or Xcache, it won't work with Zend OPcache. ----------------------------------------------------------------------------------------- Do you want to use Zend OPcache [y/n] ? Code: php -v PHP 7.0.0-dev (cli) (built: Mar 9 2015 12:28:03) Copyright (c) 1997-2015 The PHP Group Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies Code: php --ri 'zend opcache' Zend OPcache Opcode Caching => Disabled Optimization => Disabled Startup Failed => Opcode Caching is disabled for CLI Directive => Local Value => Master Value opcache.enable => On => On opcache.use_cwd => On => On opcache.validate_timestamps => On => On opcache.inherited_hack => On => On opcache.dups_fix => Off => Off opcache.revalidate_path => Off => Off opcache.log_verbosity_level => 1 => 1 opcache.memory_consumption => 64 => 64 opcache.interned_strings_buffer => 8 => 8 opcache.max_accelerated_files => 8000 => 8000 opcache.max_wasted_percentage => 5 => 5 opcache.consistency_checks => 0 => 0 opcache.force_restart_timeout => 180 => 180 opcache.revalidate_freq => 180 => 180 opcache.file_update_protection => 2 => 2 opcache.preferred_memory_model => no value => no value opcache.blacklist_filename => no value => no value opcache.max_file_size => 0 => 0 opcache.protect_memory => 0 => 0 opcache.save_comments => 1 => 1 opcache.load_comments => 1 => 1 opcache.fast_shutdown => 1 => 1 opcache.optimization_level => 0xFFFFFFFF => 0xFFFFFFFF opcache.enable_file_override => On => On opcache.enable_cli => Off => Off opcache.error_log => no value => no value opcache.restrict_api => no value => no value
Steps to compile PHP 7 with Feedback Directed Optimization: https://twitter.com/ghrd/status/603220329624834048
interesting will need to read up on that from [PHP-DEV] Re: [PHP-CVS] com php-src: Add targets to simplify building PHP with FDO (Feedback Directed Optimisation) PHP should be built with the folowing steps:: Makefile.global configure.in
Just found this useful info on state of PHP extension support for PHP 7 etc extensions catalog · gophp7/gophp7-ext Wiki · GitHub looks like there's a PHP 7 branch of memcached PHP extension available php-memcached-dev/php-memcached at php7 · GitHub github master vs php7 branch diff looks like the PHP7 branch of memcached PHP extension works somewhat - had to remove one compile option for memcached-json and disable igbinary support in memcached/libmemcached as igbinary isn't supported in PHP7 yet Code: php -v PHP 7.0.0-dev (cli) (built: Apr 8 2015 11:54:10) Copyright (c) 1997-2015 The PHP Group Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies Code: php -m [PHP Modules] bcmath bz2 calendar Core ctype curl date dom enchant exif filter ftp gd gettext gmp hash iconv imap intl json libxml mbstring mcrypt memcached mhash mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix pspell readline Reflection session shmop SimpleXML snmp soap sockets SPL sqlite3 standard sysvmsg sysvsem sysvshm tidy tokenizer xml xmlreader xmlrpc xmlwriter Zend OPcache zip zlib [Zend Modules] Zend OPcache memcached-json disabled json support => no Code: php --ri memcached memcached memcached support => enabled Version => 2.2.0 libmemcached version => 1.0.16 SASL support => yes Session support => yes igbinary support => no json support => no msgpack support => no Directive => Local Value => Master Value memcached.sess_locking => 1 => 1 memcached.sess_consistent_hash => 0 => 0 memcached.sess_binary => 0 => 0 memcached.sess_lock_wait => 150000 => 150000 memcached.sess_lock_max_wait => 0 => 0 memcached.sess_lock_expire => 0 => 0 memcached.sess_prefix => memc.sess.key. => memc.sess.key. memcached.sess_number_of_replicas => 0 => 0 memcached.sess_randomize_replica_read => 0 => 0 memcached.sess_remove_failed => 0 => 0 memcached.sess_connect_timeout => 3000 => 3000 memcached.sess_sasl_username => no value => no value memcached.sess_sasl_password => no value => no value memcached.compression_type => fastlz => fastlz memcached.compression_factor => 1.3 => 1.3 memcached.compression_threshold => 2000 => 2000 memcached.serializer => php => php memcached.use_sasl => 0 => 0 memcached.store_retry_count => 2 => 2 looks like despite some memcached-json errors it does show up enabled if i enable it during memcached PHP extension compile time Code: /svr-setup/memcached-php7/php_memcached.c: In function ‘s_unserialize_value’: /svr-setup/memcached-php7/php_memcached.c:3335:4: warning: passing argument 2 of ‘php_json_decode’ discards ‘const’ qualifier from pointer target type [enabled by default] php_json_decode(value, payload, payload_len, (serializer == SERIALIZER_JSON_ARRAY), JSON_PARSER_DEFAULT_DEPTH); ^ In file included from /svr-setup/memcached-php7/php_memcached.c:41:0: /usr/local/include/php/ext/json/php_json.h:101:20: note: expected ‘char *’ but argument is of type ‘const char *’ static inline void php_json_decode(zval *return_value, char *str, int str_len, zend_bool assoc, zend_long depth) ^ Code: php --ri memcached memcached memcached support => enabled Version => 2.2.0 libmemcached version => 1.0.16 SASL support => yes Session support => yes igbinary support => no json support => yes msgpack support => no Directive => Local Value => Master Value memcached.sess_locking => 1 => 1 memcached.sess_consistent_hash => 0 => 0 memcached.sess_binary => 0 => 0 memcached.sess_lock_wait => 150000 => 150000 memcached.sess_lock_max_wait => 0 => 0 memcached.sess_lock_expire => 0 => 0 memcached.sess_prefix => memc.sess.key. => memc.sess.key. memcached.sess_number_of_replicas => 0 => 0 memcached.sess_randomize_replica_read => 0 => 0 memcached.sess_remove_failed => 0 => 0 memcached.sess_connect_timeout => 3000 => 3000 memcached.sess_sasl_username => no value => no value memcached.sess_sasl_password => no value => no value memcached.compression_type => fastlz => fastlz memcached.compression_factor => 1.3 => 1.3 memcached.compression_threshold => 2000 => 2000 memcached.serializer => php => php memcached.use_sasl => 0 => 0 memcached.store_retry_count => 2 => 2