PHPNG (next generation)

This page gives short information about development state of a new PHP branch based on refactored Zend Engine.

The phpng branch has been merged into master and has been used as the base for PHP 7.0

Some technical implementation details are available at phpng-int. Information for extension maintainers at phpng-upgrading.

Slides from a talk at ZendCon-2014 phpng-php7.pdf

How to Download, Build, Install and Test

Note: For anonymous checkout, use https://git.php.net/repository/php-src.git instead of git@git.php.net:php-src.git

mkdir ~/tmp
cd ~/tmp
git clone git@git.php.net:php-src.git
cd php-src
./buildconf
./configure \
--prefix=$HOME/tmp/usr \
--with-config-file-path=$HOME/tmp/usr/etc \
--enable-mbstring \
--enable-zip \
--enable-bcmath \
--enable-pcntl \
--enable-ftp \
--enable-exif \
--enable-calendar \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--with-curl \
--with-mcrypt \
--with-iconv \
--with-gmp \
--with-pspell \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--with-xpm-dir=/usr \
--with-freetype-dir=/usr \
--with-t1lib=/usr \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-openssl \
--with-mysql=/usr \
--with-pdo-mysql=/usr \
--with-gettext=/usr \
--with-zlib=/usr \
--with-bz2=/usr \
--with-recode=/usr \
--with-mysqli=/usr/bin/mysql_config
make
make install
mkdir $HOME/tmp/usr/etc
vi $HOME/tmp/usr/etc/php.ini
max_execution_time=600
memory_limit=128M
error_reporting=0
display_errors=0
log_errors=0
user_ini.filename=
realpath_cache_size=2M
cgi.check_shebang_line=0 zend_extension=opcache.so
opcache.enable_cli=1
opcache.save_comments=0
opcache.fast_shutdown=1
opcache.validate_timestamps=1
opcache.revalidate_freq=60
opcache.use_cwd=1
opcache.max_accelerated_files=100000
opcache.max_wasted_percentage=5
opcache.memory_consumption=128
opcache.consistency_checks=0

Now PHP must be installed and configured. The final check.

$ sapi/cli/php -v
PHP 7.0.0-dev (cli) (built: Apr 28 2014 11:13:04)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.7.0-dev, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies

You may run synthetic benchmarks

$ sapi/cli/php Zend/bench.php
$ sapi/cli/php Zend/micro_bench.php

You may measure the performance of some web applications

$ sapi/cgi/php-cgi -T 1000 /var/www/html/wordpress/index.php > /dev/null''

You may do the same with callgrind profiler

$ valgrind --tool=callgrind --dump-instr=yes --separate-recs=1 sapi/cgi/php-cgi -T 100 /var/www/html/wordpress/index.php > /dev/null

Finally, you may run PHP as FastCGI server using CGI SAPI or FPM (it requires additional configuration)

$ PHP_FCGI_CHILDREN=4 PHP_FCGI_MAX_REQUESTS=0 sapi/cgi/php-cgi -b /tmp/fcgi-php

I would recommend build PHP from master and phpng branches and compare their performance

PHPNG (next generation)的更多相关文章

  1. 用Zephir编写PHP扩展

    自从NodeJS,和Golang出来后,很多人都投奔过去了.不为什么,冲着那牛X的性能.那PHP的性能什么时候能提升一下呢?要不然就会被人鄙视了.其实大牛们也深刻体会到了这些威胁,于是都在秘密开发各种 ...

  2. 论文阅读(Zhuoyao Zhong——【aixiv2016】DeepText A Unified Framework for Text Proposal Generation and Text Detection in Natural Images)

    Zhuoyao Zhong--[aixiv2016]DeepText A Unified Framework for Text Proposal Generation and Text Detecti ...

  3. Task set generation

    Task set generation for uni- and multiprocessors: “Unifying Fixed- and Dynamic-Priority Scheduling b ...

  4. 使用-MM生成include指令和依赖生成(make include directive and dependency generation with -MM)

    I want a build rule to be triggered by an include directive if the target of the include is out of d ...

  5. test generation和MBIST

    The problem of test generation Random test generation Deterministic algorithm for test generation fo ...

  6. 关于conversation generation的论文笔记

    对话模型此前的研究大致有三个方向:基于规则.基于信息检索.基于机器翻译.基于规则的对话系统,顾名思义,依赖于人们周密设计的规则,对话内容限制在特定领域下,实际应用如智能客服,智能场馆预定系统.基于信息 ...

  7. 1094. The Largest Generation (25)

    A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level bel ...

  8. Case Study: Random Number Generation(翻译教材)

    很荣幸,经过三天的努力.终于把自己翻译的教材做完了,现在把它贴出来,希望能指出其中的不足.   Case Study: Random Number Generation Fig. 6.7  C++ 标 ...

  9. Index Generation

    Index Generation Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 230   Accepted: 89 Des ...

随机推荐

  1. Java基础-CGLIB动态代理

    JDK的动态代理机制只能代理实现了接口的类,而不能实现接口的类就不能实现JDK的动态代理,cglib是针对类来实现代理的,他的原理是对指定的目标类生成一个子类,并覆盖其中方法实现增强,但因为采用的是继 ...

  2. 【POJ 1416】Shredding Company

    题 题意 给你一个target number,和一个最多六位的数num,让你把数分段,使总和最接近但不大于target number. 如果只有一种方法就输出总和.分段,如果有多种方法,输出rejec ...

  3. 【poj1274】 The Perfect Stall

    http://poj.org/problem?id=1274 (题目链接) 题意 懒得写了 Solution 二分图匹配裸题.注意清空数组. 代码 // poj3020 #include<alg ...

  4. 【bzoj2819】 Nim

    www.lydsy.com/JudgeOnline/problem.php?id=2819 (题目链接) 题意 动态树上路径异或和. Solution Nim取石子游戏的sg值就是每堆石子的异或和,所 ...

  5. UVa247 Calling Circles

    Time Limit: 3000MS     64bit IO Format: %lld & %llu map存人名,floyd传递闭包,DFS查询. 输出答案的逗号后面还有个空格,被坑到了2 ...

  6. 利用Arraylist输入学生的成绩,求出平均分和总分。

    Console.WriteLine("请输入学生人数:"); int n=int.Parse(Console.ReadLine()); ArrayList arr= new Arr ...

  7. java中request,application,session三个域及参数简单示例

    直接上代码: java代码: public class HelloAction implements Action { @Override public String execute() throws ...

  8. php-5.3 zend opcache 的设置

    故障现象,修改了代码上传到生产服务器之后,需要等待60秒才生效. 细查了一下,是opcache引起的,默认是60秒.于是我给关了,之前是ea加速,现在新版本的php好像用这个opcache了:; 2s ...

  9. Netbeans连接数据库

    /* Netbeans连接数据库 NetBeans项目的“项目属性”中“库”一栏中.Tab页“编译和运行”中已经加上jdbc的驱动文件 */ Connection conn = null;//连接数据 ...

  10. 新浪微博客户端(22)-创建微博Cell

    DJStatusCell.h #import <UIKit/UIKit.h> @class DJStatusCellFrame; @interface DJStatusCell : UIT ...