What questions can the PHP interview ask to accurately reflect the level of development of the candidate?

Source: Internet
Author: User
Tags sql injection prevention
Don't make a generalities.

Reply content:

Update: Finally added the basic problem Analysis Description

After more than two years, update the new face question.

Basic Questions

Scene:


You have entered a new company.

On the first day of work, the receptionist arranged a seat for you and then pulled over a new computer that was not unpacked.

After you have connected your computer, press the power ....


Well, this is really a new computer, inside actually built a DOS system!!


You got a colleague. Operating system CD/u disk (this doesn't matter). After half an hour, the operating system is installed.


    1. The first thing to do is to set up the lamp environment so that it works well. Brief note on building the LAMP Environment in the process .


    2. Lmap When the environment is set up, you get the first development task. Develop a general approval system within the company. There is a DNS server inside the company, the top of which is already equipped with the domain name of this system, Call approving.great-company.com, and point to your native IP. You tried to visit http:// approving.great-company.com , The Apache Classic Itworks page appears, and the domain name is in effect. You plan to create a new directory on the desktop called approving and complete the development of this system in this directory. How to configure Apache Make Access http:// approving.great-company.com can open approving/index.php


    3. After the Apache configuration, you started the development work. At this point, the colleague gave you a code, another person wrote half of the general approval system . It's much better, you don't have to write code from scratch. You looked at his code and found the logic: After the user logs on to the system using email and password, the program puts the user's ID into the SESSION. by $_session[' uid ', you can get the login user ID and then go to the database to get the user's personal information (such as what name, which department) I got it. Then, you found this generic approval system code for key function points

Experience of the talk, prohibit reprint!
The above answer may be just for the novice programmer, I will talk about all levels of it!

First of all, I think it is very important to do a written test or a machine test, not necessarily all against, you can see a lot of conversations do not look at the problem!

Since PHP programmers have to ask around all aspects of PHP
    • Php
      Basis:
      Single quotation mark and double quotation mark difference?
      What is the difference between the action of Get and post form form forms?
      How the session Works
      How do I remove the last value of an array?
      Git branch Merge
      Flip the string "Example"
      Print the timestamp of the 2014-09-23 23:08:01
      Debug method
      Composer usage

      Advanced:
      Understanding the extent of the framework (routing, design rules, data layer wrapping, view layer, extensible, etc.)
      Object-oriented understanding (static methods, variable availability ranges, abstract classes, interfaces, inheritance, cloning, magic methods, etc.)
      Name space
      Test Cases
      Exception handling
      Cache data (Memcache, Redis, template cache, APC, and other cache types)
      Regular test

      Senior:
      PHP SPL
      Design Patterns (select two, such as factory, single-case speaking)
      Sorting algorithm (pick two, such as bubble sort, insert sort to talk about application points)
      Encryption algorithm (pick two, such as Sha, CRC32 to talk about application points and differences)
      Test-driven development
      Thinking about Agile development
      Optimal development model
      How to troubleshoot problems

    • Safety
      Talking about XSS, csrf principle and prevention
      SQL Injection Prevention
      What issues should be noted in uploading
      Variable coverage issues
      How to deal with the dangerous function
      Service baselines
      Security Domain

    • Database
      Transaction processing
      Various types of lock handling
      Sub-Library, master-slave and offline
      Left JOIN, right connection, cross connect
      SQL optimization
      Infrequently used SQL functions
      Once encountered the pit


    • Linux
      Pick two commands, such as Find, awk usage
      File sorting methods (such as fetching the last modified file of a folder and displaying the size in m)
      Python, Shell and other script levels

      Write a relatively hasty, there are missing to add!

      The above mainly focus on the technical aspects, in fact, a lot of technology for some people to learn fast, so people are smart or learning ability is the most important.
"What have you done on your own, take the evidence" PHP Hashtable
Data caching
Database Optimization Booklist.
Talk on the Web security what are you know.
Does the DRY in your codes since? If Yes,very Good,tell me.
Tell me how does you debug your code. The more the better. 1, first understand what you want to do, and then consider what kind of person to look for.
2, to find the right, not necessarily the best technology, this is too important to dig out the level of the applicant's development and the level of the interviewer is also a great relationship, the higher your level, you can start from a simple question, the difficulty gradually increased, until the other side overwhelmed, of course, here to grasp the good degree, Because if you're really going to hire this person, what's the best language in the world that leaves you with an intimidating feeling?
Answer PHP, the vision is too narrow
Do not answer PHP also leave, do a line of love directly to a computer can be networked to write code it, can search out also counted. The topic can be quite simple, such as encapsulating the simplest ORM on the basis of PDO, which can be a class or function. Basically qualified can be completed in 10-20 minutes, give half an hour good. It's amazing that people who are out of frame 70% can't even write about it. Can be completed quickly and well, can be in this foundation, and then give half an hour, the request is written to read and write separation (the main library read and write, from the library read-only, read requests evenly separated).
Code implementation, with the way to avoid the binding, this is the most basic not to say it? The question is mainly about what you want to recruit. Is "PHP" programmer, or PHP "programmer". See which one you're focusing on.
  • 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.