PHP Bird: I used to be a "not fit" programmer.

Source: Internet
Author: User
Tags php language php framework php tutorial mail exchange zend

Network Name: Snow migratory birds, we are known as Bird Brother, Xinchen @Laruence, is the most influential PHP technical experts, PHP Development Group Core members, PECL developers, Zend company external consultants. He has worked for Yahoo, Baidu, and now Sina Weibo as the platform and data Department of the general architect and chief PHP consultant. Xinchen is the main developer of PHP NG core Developer, php5.4,5.5. As a PECL developer, YAF, Yar and Yac, taint and many other outstanding open source works, but also Apc,opcache,msgpack and other project maintainers.

From a beginner who searches for PHP tutorials on the web, to the core members of the PHP development team, Xinchen feels the whole process is like "monster escalation." Like Java, also known as the blue-collar language of PHP, he seems to be able to cultivate more programmers of the cradle, and everyone can program the era, will inevitably produce more to promote technological progress of the cattle people. He shares research, technology, and news about the PHP language and the Zend engine in the blizzard corner of the blog. Left hand code, right hand verse.

Q: How did you start to be interested in programming?

The first time I did "programming" seemed to be on the little Overlord learning machine. Later, the university is computer, graduate school in charge of campus construction, active or passive to do a lot of web development work, including at that time a lot of school two department of the website, Campus BBS maintenance. Think of it as if there is not one thing, or an opportunity to say that I like programming. It feels very natural to do this industry, also did not feel like, just do it down.

Q: How do you like PHP? How do you become a core member of the PHP Development Group?

At that time in graduate school to do a website, absolutely not the case to go online search, just search for a PHP tutorial, teach how to do a simple website, so try to do a bit, and found no matter from the installation, deployment (there is no such centralized deployment tools, but there are many tutorials to teach how to deploy LAMP) , writing code, testing is very convenient, syntax is also very similar to the C language, and even many of the API's name is the same as the LIBC API. So began the indissoluble bond with PHP.

should be in 2011, that time for Baidu developed Ap (YAF predecessor project), at that time in Baidu internal use is also good, so I think to contribute to PECL up, modified some later, renamed YAF (yet another framework, This name is also a bit self-deprecating meaning, because PHP framework is very many, e-mail to the PHP mail group, because the English is bad, so the process is more tortuous, fortunately, Pierre Joye helped me a lot, let Yaf into the PECL.

In addition, before committing to Yaf I have been in the source code of PHP, so also submitted a lot of bugs and Fix, such as I remember one day at noon, Rasmus (the father of PHP) on the IRC said found a Bug, I almost 5 minutes after the fix.

And so slowly and some people are familiar with, got the trust of everyone, I started the application, then get the PHP core code to submit permissions, participate in the direct development of PHP and Bug repair, became a member of the development team.

As for the core, it is a gradual accumulation of, in fact, a process of mutual trust. If your work is recognized, then you will respect your opinion. I slowly and Dmitry stogov became ripe, got the Zend core part of the submission authority, submitted a lot of core BUG fixes and new features, and then became the Zend external consultant, slowly became the core Developer.

Sounds like a bit of a weird upgrade feeling.

Q: What is the opportunity for you to develop the YAF? How did Baidu support YAF development at that time?

Before Yaf, there was a classic argument about the use of non-use frames: "Using a framework can degrade performance without using a framework to reduce development efficiency." ”

At that time Baidu internal framework a lot, including open-source yii,zf and so on, also include some of the team wrote. So there is a problem is the class library, some peripheral facilities have no way to exchange.

Another reason is that after many framework authors have released the framework, they will find that different people will make various changes to the framework, resulting in a long time, a framework issued, it becomes a variety of variants, the subsequent unification of the upgrade has become impossible.

So, I decided to use the PHP extension to implement a framework to solve these problems, of course, before writing this extension is not very confident, do not know how to use the expansion can bring much performance improvement. Fortunately, the final result is very good.

Q: Why choose to write Yaf in C language?

PHP is written in C, so his extension is also written in C language, so he chose C language to write Yaf.

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

This is in fact a lot of reasons, such as at that time in Baidu is T7, business participation less, feel like not so many things to do, a little wasted feeling.

In addition, I was in the Baidu Business search department, do not directly contact the volume of the system, so also hope to find a big platform to exercise, and Weibo is just such a platform.

After coming to micro-blog, really touched a lot of the challenges before, but also feel that their knowledge has a bigger stage can play.

Q: What is your specific job in Sina Weibo now?

I am now in the microblogging technology department, with a basic service team, our main work is also phased, the first two years of the main work is to do micro bo LAMP performance optimization, including a variety of basic framework, tool development, environmental optimization, standardization and so on.

In the past two years, the LAMP architecture of Weibo has stabilized, and the overall performance has been improved several times. We also have a set of our own high-performance LAMP overall solution. So the work of LAMP optimization is a bit less. Now the main focus is on the development of infrastructure, such as cache middle layer, transcoding service, communication platform and so on.

Q: Does PHP7 (phpng) use PHP's needs and pain points as important feedback for Sina Weibo platforms?

Of course there is, since I joined the development team, and a lot of other members have had a similar argument: I think performance is very important, and some people will think that the new nature is very important, then we will have a dispute when a novel feature affects performance.

I'm paranoid about performance gains, which is why I later worked with Dmitry stogov more because he was also particularly concerned about performance.

The main reason I care about performance is that I have a real understanding of the value that every 1% of the performance boost can bring to the country's largest LNMP platform such as Weibo. While the overall performance of our microblog has improved significantly compared to two years ago, I realize that without compromising development efficiency, further improvements can only depend on the performance of the language and the environment. So that's part of what Weibo needs for PHP.

PHP7 in WordPress compared to 5.6, there are more than 100% of the authenticity can improve (QPS), I believe that next year, and other PHP7 after the release of our Micro Bo's overall LAMP platform of the business can also get 100% performance improvement.

Q: What is your participation in the PHP7 (phpng) development process? How do you work with other development team members?

Phpng was a secret project, the initial participants only Dmitry and I, I remember it was the spring of this year, when we do the JIT project based on PHP5 because the effect is not ideal so shelved, we are more depressed.

Dmitry said he had an idea to zval the design and compress the size to reduce the memory footprint. Then we had a personal discussion, because in fact we had all kinds of ideas every day, so we just thought: Well, the idea might work. But not very confident.

The main idea at the time was to quickly make a prototype that could be run to test the effect. In this process, we mainly discuss the ideas, and then each implement the parts to be done, and then merge.

The main tool for co-operation is Skype, but because he's in St Petersburg, and we have jet lag, we also use the mail exchange to Review the code via Github.

When the project came to a conclusion, we found, "Hey, that's a good idea, it worked." And then it was made public. After that, it becomes the normal mode of collaboration, with the idea of submitting RPC, submitting patches, voting, everyone reivew, and then merging.

Q: What features has the PHP7 increased or decreased so far? How will you improve performance before publishing?

There are many, in addition to phpng this branch mainly provides performance improvements, we also have AST (abstract syntax tree) support, Uniform Variable syntax,64bits length string supports, some new syntactic sugars, and recent Native TLS and so on.

PHP7 will be officially released in October 2015, before which we have some ideas to try, such as using Zend_array to directly replace Hashtable, for example, by specifying the function to re-section, sorting to reduce itlb miss, such as the JIT part of the optimization method (type push Introduced into PHP, with some types of proprietary opcodehandler to speed up, such as further improve the code data locality to reduce Cache miss and so on.

Of course, we also have a JIT project in parallel, but I'm worried that the project will be ready when the PHP7 is released.

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

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

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

It's not much of a relationship, Hack is not PHP. Instead, I believe they may have this idea, but it depends on the acceptance of the community.

For Hack I am not particularly familiar with the specific evaluation.

Q: Some people think that because PHP is easy to learn, the threshold is low, so that some do not fit the programmer to rush in, what do you think of this view?

I can't agree with this view. When I graduated from college, I also tried to find some development work, interviewed a few units, have been rejected, perhaps in the eyes of those who interviewed me, I am a person who is not suitable for programming.

But because of the low threshold, PHP allows people to quickly see the results of their "programming", will give the novice a positive feedback to stimulate the role, so that interested people become more interested. And the more people who program, the more likely it is that the people who produce Daniel and contribute to the progress of the whole technology.

And, the future programming language must be toward the ease of development, and further reduce the threshold of programming, perhaps one day everyone can program or maybe!

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

I remember saying before: "PHP engineers are all balm", in fact, this sentence is not only applicable to PHP engineers, should be applicable to all engineers.

The knowledge structure should be very broad. Web development involves a lot of technical points, HTML, CSS, JS, SQL these, but also to know some Nginx, Linux, Mysql configuration, maintenance, troubleshooting common methods, these should understand some.

Q: In addition to technical skills, what will you pay attention to during the interview?

I will pay special attention to clear thinking, communication, and conversation. In fact, the future is to work together, there will be obstacles, and growth potential is large.

Q: Once the phpe.net webmaster Chen Bole now sells men's socks. What is your plan for the future? Will it always be a coder?

In fact, I am a very lazy person, never think very far, there is wine today drunk. So for the future in fact I am not very clear, I just think I still like programming, like through their own work to benefit everyone and get the praise of the community, I think this is very good, I will continue to do.

(Source: Turing interview)

PHP Bird: I used to be a "not fit" programmer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.