Two sets of papers for PHP development engineers

Source: Internet
Author: User
Tags learn php php source code
When you learn PHP, the next step is to find a job, we all know that the PHP development engineer to find a job requires a written test to interview, then before the interview, we must be prepared enough. So the following is a small compilation of the two sets of PHP development engineer interview needs of the paper title, I hope to help you more.

The first set of papers
First, the PHP development Section

1. There are several ways to merge two arrays, and try to compare their similarities and differences.

2. Please write a function to check whether the data submitted by the user is an integer (the data type is not distinguished, it can be binary, octal, decimal, hexadecimal digits)

3. PHP's Strtolower () and Strtoupper () functions may cause Chinese characters to be garbled when installed on a non-Chinese system, write two alternative functions for string case conversions that are compatible with Unicode literals

4. PHP is_writeable () function has a bug, can not accurately determine whether a directory/file can be written, please write a function to determine whether the directory/file is absolutely writable

5. PHP chmod () function has a bug, cannot guarantee the success of the setup, write a function to create a directory/file under the specified path and ensure that the permission mask can be set correctly

6. PHP processing upload file information in the array of file types $_files[' type ' is provided by the client browser, it is possible that the hacker forged information, please write a function to ensure that the user uploaded image file type is true and reliable

7. PHP uses the URL encoding of the data to interact with JavaScript data, but for some special characters the codec and JavaScript rules are different, please specify this difference, and for the UTF-8 character set of data, Write the PHP codec function and JavaScript codec function to ensure that PHP encoded data can be correctly decoded by JavaScript, JavaScript encoded data can be correctly decoded by PHP

8. The algorithm of Memcache key multi-node distribution is expounded. What happens to PHP's memcache client when any node fails? How to ensure the atomicity of memcache data read and write operations?

9. How to maximize the security of PHP? How can I avoid SQL injection vulnerabilities and XSS cross-site scripting exploits?

10. Please design a data structure can implement the tree menu of infinite sub-menu function and provide a menu generation algorithm, using UML to describe the design and write out the relevant PHP code

Ii. related parts of the system

1. Please briefly describe how the kernel implementation and management mechanism of Linux, FreeBSD, Soalaris, Mac OS and Windows system are different.

2. Please describe the ways of interprocess communication under the LINUX/BSD system, and specify how to implement it under PHP.

3. Please describe the system's message/event asynchronous notification mechanism under the LINUX/BSD system in several ways, and compare

4. Simple comparison of the similarities and differences between the TCP/UDP protocol, for PHP socket extension and stream extension, try to compare the two based on the TCP/UDP protocol socket programming differences?

5. Why is zombie process (orphan process) present? How do I view zombie processes? How do I resolve a zombie process problem?

6. For system-v Message Queuing, how can the system itself be limited to the number of message queue bars, Total capacity (bytes)? How do I prioritize messages? Compare the similarities and differences between blocking and nonblocking modes, and explain how to avoid blocking Message Queuing in non-blocking mode?

7. Please describe the Apache 2.x version of the MPM (multi-processing Module) mechanism, and specify how to support PHP under different MPM mechanisms.

8. What are some of the ways PHP works under Apache and how do you compare them? How do I get PHP to run in fast CGI under Linux+apache?

9. Write out the Configure parameter that PHP must specify when it can be executed in a scripted manner at the command line, and explain how to run a PHP script at the command line (write two ways) and pass parameters to the PHP script at the same time?

10. Please describe the memory pool of PHP 5.2 and its memory management mechanism, garbage collection mechanism 1, the following topics, in addition to programming tasks need to be written on the papyrus you provide. Paper is precious Earth resources, please save the use. Programming tasks in the corresponding environment, will require the computer to write, there is no conditions, it can only be written on the papyrus.

The second set of papers

Basic Task + Advanced task + Design task = 90 minutes

Programming task = 60 Minutes

Basic tasks:

1. Please list the UNIX signals you can think of and indicate the purpose of the signal.

2, please list, you can think of all the string lookup algorithm, and annotated simple description.

3. There is an IP address (192.168.0.1), please write out its 32-bit unsigned integer form.

4, write, you can think of all the HTTP return status value, and explain the purpose (for example: return 404 means the page cannot be found)

Basic Tasks-selected (additional points will be obtained):

1, draw a few of your most familiar server-side model out (the format is not important, try to clear the picture, explain the idea can be)

Advanced tasks:

1. What is the garbage collection mechanism of PHP?

Description

1) If you are familiar with PHP source code, then please start from the source, answer some questions, you will get extra points

2) If you are not familiar with PHP source code, then do your best, write more things, including the use of their own programming intuition to get information, can be.

3) Yes, then there are points, mistakes do not buckle, do not write no points.

2. Please write out the HTTP headers and meet the following requirements:

1) This is a POST request

2) Target: http://www.example.com:8080/test

3) Post variables:

Username:test

Pwd:test2

Intro:hello world!

4) contains the following cookie information:

Cur_query:you&me

Description

1) If you do not remember the instruction word in an HTTP protocol, then this is replaced with "kanji".

2) If you can remember more HTTP protocol instruction words, then write a few more words, always no harm, right?

3) Most critical, just draw the correct "contour" (remember HttpWatch and other tools to print out the head?). That is the meaning of "contour", there will be scores, but if, even the "outline" are written wrong, then it is regrettable.

Design tasks:

1. There have been a few recent harassment of our voting module, which requires you to design a voting limit.

Requirements are as follows:

1) require each QQ number (assuming this QQ number in UNIT32 can be expressed) 10 minutes this can only vote 5.

2) Our users are very enthusiastic, an average of 20 million people a day to vote through this program.

Description

1) No need to write code, just the picture and text.

2) for the key logic, please use the graph plus code to express, this is also a test of your ability to express your words.

3) Make a list of all the boundary conditions you can think of, and this is the test of your logical thinking in general and agility.

4) Storage section, do what you can. If you need a storage layer of your own design, then the implementation of this storage layer, with the text + picture to describe clearly, if the design is reasonable, you will get gorgeous award points.

Programming tasks:

1, we encountered a trouble, a new missionary annoyed God, God is angry, asked us to memorize the Bible (bbe.txt), until he said which word, we will quickly answer the word in the first few words of the word position. I heard that you are a good programmer, so 髟 help us to accomplish this impossible task.
Requirements are as follows:

1)/myworks/example/bbe.txt,98 version of the English Bible

2) The input section requires the following: PHP./example.php [Words]

3) The output section is as follows: [Word] 2,4 5,6 said: This word in 1 rows 2 columns (the second word), 2 rows 4 columns ...

Description

1) This text 4MB of giant ...

2) Meaning of the word: a string consisting of an English letter (case), a number (0-9)

3) provided to your machine OS for Ubuntu 9.10, memory only 1 g, and, unfortunately, where 700M was used to do something else

4) The computer does not allow the Internet, but I installed the man document and read the CHM and PDF reader, in the desktop CHM folder in the PC, there is a corresponding PHP reference manual

5) algorithm complexity requirements cannot be greater than O (n^2) (N squared)

6) What? PHP is inefficient and easy to use, so you can do it in a different language. But note: Available to you on the machine only Python 2.4/perl 5.8/gcc[g++] 4.1

Summary: No matter what the interview, self-confidence is very important, I hope that the interview when the PHP development engineer The two sets of topics can help you, but also hope that the interview Phper can face their ideal job.

Related Article

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.