What are the questions for the PHP engineer?

Source: Internet
Author: User
Tags mysql insert network function how to use sql nginx load balancing

Reply content:

1 Introduce your own past work, or study, the most can reflect their own value of achievement.
After the introduction, this achievement, encountered how difficult, how to solve.
2 Explain the principles and harms of SQL injection, assuming there is a non-rigorous landing procedure, how to use SQL injection into.
3 Explain the principle and harm of cross-site scripting, assuming there is a non-rigorous message board, please construct a cross-site scripting example.
4 Explain why data indexing can improve efficiency.
Scene SQL SELECT * from user where area= ' guangzhou ' and sex= ' woman ' ORDER by lastlogin desc limit 30;
How do I design an index?
There are now 100,000 IP addresses corresponding to the interval table in the format StartIP, EndIP, area
Requires each user to be able to quickly analyze each other's area, please design the implementation. database, or no database, requires more than thousands of queries per second.
Basically this is enough for me, if the above topics are particularly satisfying, then attach
5 There is now a list of shielding words, about thousands of words; Suppose there is a busy forum community, a huge amount of posts, requiring users to quickly analyze whether or not to include the shielding word in each article, please give the program design.
61 game sites, there are thousands of small games, each game to do points ranking, data structure as follows
Gameid,userid,gamescore
Millions of points per day submitted, the volume of data is huge, currently requires sub-library processing.
requirements, you can query the score leaderboard based on each game ID. You can query based on the user ID, such as your own or friends ' history game score records. How to handle the sub-library.

Finally, what do you have to ask? The above anonymous user collation of a very full, worthy of reference.
The ability of an engineer to be qualified for a position is largely influenced by the degree of professionalism, peripheral knowledge, communication skills, willingness to work actively, and so on, and the emphasis on each team needs to be distinguished, usually in the interview process according to the actual combination of investigation.

Professional degree is embodied in the basic skills of PHP and some advanced knowledge, such as the common performance points, different version features, session implementation mechanism, Include/require differences, further mainstream framework mastery, common performance optimization strategy, Its features as a scripting language, how to avoid PHP's performance disadvantage to create a high concurrency system, how to ensure high concurrency in the availability and data integrity, and so on.

The surrounding knowledge will mainly include MySQL performance optimization, memcache use, nginx/apache coordination, data collection and observation methods for Pv/click and so on. Similarly, the front-end implementations of the curl/socket operation HTTP/TCP/UDP, further RPC calls (Web Service/jsonp/thrift, etc.), further include more cache policies (proximity, consistent hashing, data consistency), Learn about operations such as sharding, more nosql product knowledge, various common protocol details, security (injection and Apostille, cross-site and CC), and more.

The ability to communicate begins with a "brief introduction of Yourself" and "what you have done in your most recent projects", and according to the answers, further refine to see if you can communicate with business units, product managers, and operators in a "need always change", " What does it look like when a business person or product manager does not seem to have a reasonable demand "," as a developer, how to know that one of the projects they are involved in is doing a good job in the eyes of the user? "as a leader of a small team, what do you think is the most important point of the team? The team of engineers are always late to go early/deserted, as the supervisor how to deal with these issues, "is assigned to an important project, how to motivate the team to complete the project as soon as possible," and examine its as an individual engineer, whether a more comprehensive perspective (from the product, design, business and other aspects of the ability to look at the problem) Let you run a forum system/enterprise Weibo account, what would you do "," as an XX product engineer, how to help operators to improve the ROI from a technical point of view, "and so on;" I have no other questions, do you have any questions to ask me? "

The willingness to work is often understood by understanding its views on overtime, the attitude to code quality, how to improve team productivity, the details of the projects it participates in, how to improve the code quality or operational output of the participating projects, the personal interests, the past pride, etc. Xie invited, in the company as an interviewer interviewed only junior high-level PHP programmers, the requirements for them is basically able to work, advanced Phper interview need to face what knowledge points I am not very experienced, here only talk about the interview junior high level Phper.
First to do a set of interview questions, the topic is basically the basic PHP syntax, database design and database optimization, Linux Foundation, will be involved in the end of some deep content.
According to the resume and interview questions, for his familiar projects in-depth. For example, he has done user-related, then I ask the session, the cookie difference; what happened to the client and server side when the actual user logged on, the memory of the session was rewritten, what the database design was, how the password was handled, how to implement a system that timed out, and so on. If you have used the framework, then ask yourself what the MVC pattern is, and what the routing principle is ...
Basically according to the answer, can screen some phper, but the actual effect has some shortcomings. I used to recruit a colleague, interview when the face of the well-written, but into the specific project, the understanding of business logic is crazy, something slow and the code is very bad. Later, some face questions were added to the business logic, and the interviewer was asked to write some code.
I feel that my answer may not be the problem, more like the answer to how to interview Phper. I consulted a very cow around me PHP programmer, he is my interviewer, his answer is as follows (not the exact words):
1.PHP Basic, String and array
2. Network function, initiating curl,socket programming, etc.
3. Understanding of network development, TCP/UDP, the discussion of HTTP protocol
PS: The specific function of the master requirements are not high, anyway, you can check the manual.

---------------
Above 0. Do a brief introduction to yourself, please? And talk about your pride for the last three years?
1. Look at your CV and ask about the user volume, PV, throughput, difficulties and solutions of past projects.
2. Database design experience, why do the sub-table? The Sub-Library?
How much data do you usually start a table? The Sub-Library? What is the purpose of the sub-list? What is a vertical split of a database? Split horizontally? Partition, etc.? An example can be illustrated
3. What are the database optimizations? What should we pay attention to separately?
What caches are encountered in 4.web development? How to optimize separately?
5. Give you 256M of memory, the 10G of the file to sort (the file 1 numbers per line), how to achieve?
How do I find a 10G file to implement?
How often do I count the number of occurrences of each keyword in a 10G file?
6. If you are now the 12306 train ticket designer, how do you design to meet the National people booking?
7. If there are 100 million users, what is your server architecture? How is the storage scheme for user information designed?
8. If you are a technical leader, the progress of the team task will not be completed how can you solve?
If you insert a task with a full schedule, how do you ensure that the overall progress is not postponed?
If some engineers do not complete the scheduled task today, how can you solve it?
9. Talk about how to build a high-performance Web site from your experience? What are the steps required? Steps? What do you need to be aware of and how to optimize each step?
10. Why is the master-slave separation of the database?
11. How to handle multi-server sharing session?
12. A 10G table, you use the PHP program to count the number of occurrences of a field, the idea is?
13. Will tell you a Nginx log example, in your opinion of the best programming language for the HTTP response time more than 1 seconds of the first 10 URLs?
14. Give you a MySQL config file that resolves the file in the programming language you think is the best?
15. Give you two paths A and B, write an algorithm or idea to calculate a and B gaps and show the intersection of A and b?
16. Give you a URL, in nginx configuration rewrite specified to a specific path?
17. What is the interpretation process for a PHP file? What is the general acceleration of PHP? What technologies are used to improve overall PHP performance?
What is the difference between session and cookie life cycle? Storage location differences?
Require, include, require_once, include_once difference? Load difference? If the program loads a PHP file on demand, how do you implement it?
Chrome is called multi-threaded, so the difference between multithreading and multi-process is?
PHP at the end of 2011 hash collision, the principle of hash collision? How do I fix it?
What are the web security factors? How to guard against each other?
23. If two single-linked lists intersect, write an optimal algorithm to calculate the intersection location, say the idea is also possible?
24. What if you are the technical leader? How to improve team efficiency?
What are the Nginx load balancing? If one of the servers hangs up, how does the alarm mechanism be implemented?
26. If not optimized, what is the maximum number of Apache connections? Nginx General Maximum number of connections is? MySQL insert per second? Select? Update? Delete?
What are the MySQL data types? How much storage space do you use separately?
Nginx set Cache js, CSS, pictures and other information, the implementation of the principle of caching?
29. How do I increase the cache hit rate? How do I granular the cache?
What is the memory recovery mechanism for PHP?
31. All my questions have been asked, do you have any questions to ask me? Not too recognized the current ranking of the first answer, some asked although the interview did not know, but it can be Google ah. When the examination of history, asked: When was the hour of the birth of Cao? Can you know a lot about history? not necessarily.

I think that the ability of a programmer is to abstract a specific problem out of the model. The company has encountered problems or business from easy to difficult to draw some, let the interviewer put forward solutions or ideas. Don't feel like interviewing for something too theoretical

But the ability to solve real problems! Interviewing PHP engineers depends on the interviewer's role
1, the interviewer is the business interviewer or HR. The ideas and orientations of the two characters are different.
2, the business interviewer's questions should be for professional skills. Usually by a colleague with strong professional skills in the same position to indulge or lead the business. But pay attention to the interview in order to understand each other's skill structure, not to test him down
The 3,hr aspect is from the job seeking motive, the expectation work environment salary treatment whether and the company matches, pays attention to the employment risk aspect.
  • 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.