search
HomeheadlinesNiao Ge Hui Xinchen, the only member of the PHP open source organization in China

Recently, it was reported that Hui Xinchen (known as "Brother Bird"), the chief architect of Sina's Weibo platform and big data department, resigned from Sina and joined Lianjia. Yesterday, this news was confirmed by Lianjia officials and himself. According to reports, Hui Xinchen will serve as vice president of technology and chief architect after joining Lianjia. InfoQ interviewed Hui Xinchen about this career change to learn about the story behind it and some of his experiences on the career path of programmers.

Hui Xinchen (known as Bird Brother) is the most influential PHP technical expert in China, a core member of the PHP development team, a PECL developer, and an external consultant to Zend Company. He has worked for Yahoo, Baidu, and now Sina Weibo as the chief architect of the platform and data department and chief PHP consultant. Hui Xinchen is the core developer of PHP NG and the main developer of PHP5.4 and 5.5. As a PECL developer, he has contributed many outstanding open source works such as Yaf, Yar, Yac, and Taint. He is also the maintainer of APC, Opcache, Msgpack and other projects.

From a beginner searching for PHP tutorials on the Internet to a core member of the PHP development team, Hui Xinchen feels that the whole process is like "fighting monsters and upgrading." PHP, which like Java is also known as a blue-collar language, in his opinion is the cradle that can cultivate more programmers. In an era when everyone can program, more talented people who can promote technological progress are bound to be produced. He shares research, technology, and news related to the PHP language and Zend engine on his blog Fengxuezhiyu. Code on the left hand, poetry on the right hand.

Niao Ge Hui Xinchen, the only member of the PHP open source organization in China

Q: How did you become interested in programming?

The first time I did "programming" seemed to be on the Xiaobawang learning machine. Later, I studied computer science in college. When I was a graduate student, I was responsible for the campus construction of the school. I actively or passively did a lot of web development work, including the website of many secondary departments of the school at that time, the maintenance of the campus BBS, etc. Thinking about it, there seems to be no one thing or one opportunity that made me fall in love with programming. It felt very natural to work in this industry, and I didn’t feel like I didn’t like it, so I just kept doing it.

Q: How did you fall in love with PHP? How did you become a core member of the PHP development team?

When I was a graduate student, I wanted to make a website. I didn’t know how to do it, so I searched online. I happened to find a PHP tutorial that taught me how to make a simple website, so I tried to follow it. After a while, I found that it was very convenient to install, deploy (there was no centralized deployment tool at that time, but there were many tutorials on how to deploy LAMP), write code, and test. The syntax was very similar to C language, and even the names of many APIs It is also the same as the libc API. So began my indissoluble bond with PHP.

It should be in 2011. At that time, I developed Ap (the predecessor project of Yaf) for Baidu. It was used well within Baidu at that time, so I thought about contributing to PECL and made some modifications. , changed its name to Yaf (Yet another framework, the name is also a bit self-deprecating, because PHP has many frameworks), so I sent an email to the PHP mail group. Because my English was poor, the process was quite tortuous. Fortunately, Pierre Joye was there at that time. Helped me a lot to get Yaf into PECL.

In addition, before submitting Yaf, I had actually been studying the source code of PHP, so I also submitted a lot of bugs and fixes. For example, I remember one day at noon, Rasmus (the father of PHP) said on IRC that he had discovered A bug, I provided a fix in almost 5 minutes.

After I gradually became familiar with some people and gained everyone's trust, I initiated an application, and then obtained the permission to submit PHP core code, participated in the direct development and bug fixing of PHP, and became Become a member of the development team.

As for the core, it is accumulated slowly. In fact, it is also a process of mutual trust. If everyone recognizes your work, then they will respect your opinion. I gradually became acquainted with Dmitry Stogov, obtained submission permission for the core part of Zend, and submitted many core bug fixes and new features. Later, I became an external consultant for Zend, and gradually became a Core Developer.

It sounds like it’s like killing monsters and upgrading.

Q: Under what circumstances did you develop Yaf? How did Baidu support Yaf development at that time?

Before Yaf, there has been a classic debate about using or not using frameworks: "Using frameworks will reduce performance, while not using frameworks will reduce development efficiency."

Internal Baidu at that time There are many frameworks, including open source Yii, ZF, etc., as well as those written by some teams themselves. One problem is that in class libraries, some peripheral facilities cannot communicate with each other.

Another reason is that after many framework authors release the framework, they will find that different people will make various modifications to the framework. As a result, over time, when a framework is released, it becomes various variants, subsequent unified upgrades also become impossible.

So, I decided to use PHP extension to implement a framework to solve these problems. Of course, I was not very confident before writing this extension, and I didn’t know how much performance improvement the extension could bring. Fortunately, the final result is very good.

Q: Why choose to use C language to write Yaf?

PHP is written in C language, so its extensions are also written in C language, so C language was chosen to write Yaf.

Q: Why did you leave Baidu and come to Sina Weibo?

There are actually many reasons for this. For example, I was T7 at Baidu at that time, and I was less involved in business matters. I felt that I didn’t have that much to do, and I felt a bit wasted.

In addition, I was in the commercial search department of Baidu at the time and was not directly exposed to systems with high traffic volume, so I also hoped to find a large platform to practice again, and Weibo happened to be such a platform.

After coming to Weibo, I have indeed been exposed to many challenges that I have never encountered before, and I also feel that my knowledge has a bigger stage to use.

Q: What are you currently responsible for on Sina Weibo?

I am now in the Weibo Technology Department, leading a basic service team. Our main work is also divided into stages. The main work in the first two years is to optimize the performance of Weibo LAMP, including various basic frameworks. Tool development, environment optimization, specification formulation, etc.

In the past two years, Weibo’s LAMP architecture has become stable, and the overall performance has improved several times. We also have our own high-performance LAMP overall solution. So there is less work to optimize LAMP. Now the main focus is on the research and development of infrastructure, such as caching middle layer, transcoding service, communication platform, etc.

Q: Has PHP7 (PHPNG) considered the needs and pain points of using PHP on the Sina Weibo platform as important feedback?

Of course this exists. Since I joined the development team, I have had similar arguments with many other members: I think performance is very important, and some people think that new features are very important, so when a We argue when new features impact performance.

I am very obsessed with performance improvement, which is why I later collaborated more with Dmitry Stogov, because he was also particularly concerned about performance.

The main reason why I care about performance is that I have a very real understanding of the value that every 1% performance improvement can bring to Weibo, the largest LNMP platform in China. Although the overall performance of our Weibo has been greatly improved compared to two years ago, I realize that without affecting development efficiency, further improvements can only rely on language and environment performance improvements. So this part is Weibo’s demand for PHP.

PHP7 has more than 100% real performance improvement (QPS) on WordPress compared to 5.6. I believe that next year, after PHP7 is released, the various services of our Weibo's overall LAMP platform will also be available 100% performance improvement.

Q: What is the process like for you to participate in the development of PHP7 (PHPNG)? How do you collaborate with other development team members?

PHPNG was a secret project at the time. The original participants were only Dmitry and me. I still remember it was in the spring of this year. The JIT project we were doing based on PHP5 was shelved because the effect was not satisfactory. Everyone All rather depressed.

Dmitry said he had an idea to redesign ZVAL and compress the size to reduce memory usage. Then the two of us discussed it, because we actually have various ideas every day, so at that time we just thought: Well, this idea may work. But not very confident yet.

The main idea at the time was to quickly make a working prototype to test the effect. In this process, we mainly discuss ideas, then implement the parts we want to do, and then merge them.

The main tool for cooperation is still Skype, but because he is in St. Petersburg and there is a time difference with us, he will also use email communication and review the code through Github.

Later, when the project was almost concluded, we realized, "Hey, this is a good idea and it works." Then it became public. After that, it became a normal collaboration mode. If you have an idea, you submit an RPC, submit a patch, vote, everyone reacts, and then merge.

Q: What features have been added or subtracted from PHP7 so far? How else will performance be improved before release?

There are many. In addition to the PHPNG branch, which mainly provides performance improvements, we also have AST (Abstract Syntax Tree) support, Uniform Variable syntax, 64bits length string supports, some new syntax sugar, and the recent Native TLS etc.

PHP7 will be officially released in October 2015. Before that, we still have some ideas to try, such as using zend_array to directly replace Hashtable; such as re-sectioning and sorting by specifying functions to reduce iTLB misses; such as Introduce some of the optimization methods of JIT (type pushback) into PHP, and cooperate with some type-specific OPCodeHandlers to speed up; another example is to further improve the locality of code data and reduce Cache misses, etc.

Of course, we also have a JIT project that we are working on in parallel, but I am very worried about whether this project will be ready when PHP7 is released.

Q: Will the new version of PHP be directly upgraded to PHP7 across PHP6? Why?

The main reason is that PHP had a development version called PHP6, but later this version failed and was not released. Therefore, this version should be PHP7.

Q: What is the relationship between the language Hack released by Facebook and PHP? Is the purpose of Hack to replace PHP? What are the advantages of these two languages ​​over each other?

It doesn’t matter much, Hack is not PHP. As for replacement, I believe they (Facebook) may have such an idea, but it depends on whether the community accepts it.

I am not particularly familiar with Hack, so I can’t comment specifically.

Q: Some people think that because PHP is easy to learn and the threshold is low, some people who are not suitable for programming have come in. What do you think of this view?

I really don’t agree with this point of view. When I graduated from my undergraduate degree, I also tried to find some development jobs and interviewed with several units, but was rejected. Maybe in the eyes of those who interviewed me at the time, I was just a person not suitable for programming.

However, because PHP has a low threshold, people can quickly see the results of their "programming", which will have a positive feedback and incentive effect on novices, making interested people more interested. The more people program, the greater the probability that someone will emerge and contribute to the advancement of technology.

Moreover, future programming languages ​​must develop towards ease of use, further lowering the threshold for programming. Maybe one day everyone can program!

Q: What is the knowledge structure of a qualified PHP engineer?

I remember there was a saying before: "PHP engineers are all panacea." In fact, this sentence is not only applicable to PHP engineers, but should be applicable to all engineers.

The knowledge structure should be very broad. Web development involves many technical points. In addition to HTML, CSS, JS, and SQL, you also need to know some common methods for configuring, maintaining, and troubleshooting Nginx, Linux, and Mysql. You should know some of these.

Q: In addition to technical ability, what else do you pay attention to during the interview?

I will pay special attention to clear thinking, communication and speaking. In fact, to put it bluntly, if we work together in the future, will there be any obstacles and whether there is great potential for growth.

Q: Chen Bole, the former webmaster of phpe.net, is now selling men’s socks. What are your plans for the future? Will you always be a coder?

Actually, I am a very lazy person. I never think too far ahead. I am drunk now. So I’m actually not very clear about the future. I just think that now I still like programming, and I like to benefit everyone through my work and gain praise from the community. I think this is good, and I will continue to do it.

People often ask, why do people call you Brother Bird?

When I was young and sentimental, my QQ IM nickname was "Snow Migratory Bird", which is a song by Xiong Tianping The name of the song, after I went to Baidu, maybe because I am relatively old? I slowly started to sing it out.

In fact, I resisted it at first, after all, "Birdman" is nothing. Good words, but then more and more people called me, so it didn’t matter.

So, Brother Bird, who is a Linux private developer, is Taiwanese, Cai Deming, why is he named "Brother Bird"? He is also Taiwanese Questions that Brother Bird is frequently asked. Brother Niao from Taiwan said in his own account that because of his surname "Cai", his classmates before junior high school called him "Caitou", and after high school he was called "rookie". When he went to college, he continued to use the title "rookie". He had many activities and was often called "Rookie Senior" by his junior students. Brother Bird felt that the two did not match each other, so he changed his name to "Brother Bird", and the name was passed down until it was adopted by more and more people. Familiarize and spread. As for why he used "VBird" as the network ID, Brother Niao laughed at himself and said that he was ignorant at first and thought that "rookie" was "Vegetable" ("Vegetable" in English is "Vegetable"). Now, Brother Niao has become every Linux enthusiast. A well-known name.

So, Linux Private Kitchen is not written by me, and Linux Private Kitchen does not teach you how to make fish-flavored shredded pork!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
php怎么把负数转为正整数php怎么把负数转为正整数Apr 19, 2022 pm 08:59 PM

php把负数转为正整数的方法:1、使用abs()函数将负数转为正数,使用intval()函数对正数取整,转为正整数,语法“intval(abs($number))”;2、利用“~”位运算符将负数取反加一,语法“~$number + 1”。

php怎么实现几秒后执行一个函数php怎么实现几秒后执行一个函数Apr 24, 2022 pm 01:12 PM

实现方法:1、使用“sleep(延迟秒数)”语句,可延迟执行函数若干秒;2、使用“time_nanosleep(延迟秒数,延迟纳秒数)”语句,可延迟执行函数若干秒和纳秒;3、使用“time_sleep_until(time()+7)”语句。

php怎么除以100保留两位小数php怎么除以100保留两位小数Apr 22, 2022 pm 06:23 PM

php除以100保留两位小数的方法:1、利用“/”运算符进行除法运算,语法“数值 / 100”;2、使用“number_format(除法结果, 2)”或“sprintf("%.2f",除法结果)”语句进行四舍五入的处理值,并保留两位小数。

php字符串有没有下标php字符串有没有下标Apr 24, 2022 am 11:49 AM

php字符串有下标。在PHP中,下标不仅可以应用于数组和对象,还可应用于字符串,利用字符串的下标和中括号“[]”可以访问指定索引位置的字符,并对该字符进行读写,语法“字符串名[下标值]”;字符串的下标值(索引值)只能是整数类型,起始值为0。

php怎么根据年月日判断是一年的第几天php怎么根据年月日判断是一年的第几天Apr 22, 2022 pm 05:02 PM

判断方法:1、使用“strtotime("年-月-日")”语句将给定的年月日转换为时间戳格式;2、用“date("z",时间戳)+1”语句计算指定时间戳是一年的第几天。date()返回的天数是从0开始计算的,因此真实天数需要在此基础上加1。

php怎么读取字符串后几个字符php怎么读取字符串后几个字符Apr 22, 2022 pm 08:31 PM

在php中,可以使用substr()函数来读取字符串后几个字符,只需要将该函数的第二个参数设置为负值,第三个参数省略即可;语法为“substr(字符串,-n)”,表示读取从字符串结尾处向前数第n个字符开始,直到字符串结尾的全部字符。

php怎么替换nbsp空格符php怎么替换nbsp空格符Apr 24, 2022 pm 02:55 PM

方法:1、用“str_replace(" ","其他字符",$str)”语句,可将nbsp符替换为其他字符;2、用“preg_replace("/(\s|\&nbsp\;||\xc2\xa0)/","其他字符",$str)”语句。

php怎么判断有没有小数点php怎么判断有没有小数点Apr 20, 2022 pm 08:12 PM

php判断有没有小数点的方法:1、使用“strpos(数字字符串,'.')”语法,如果返回小数点在字符串中第一次出现的位置,则有小数点;2、使用“strrpos(数字字符串,'.')”语句,如果返回小数点在字符串中最后一次出现的位置,则有。

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function