


Common interview questions for PHPers with 3-5 years of experience
I saw that there are many, so to summarize, they are more suitable for PHPers with certain experience
1. What php books and blogs do you usually like? CSDN, Huxiu, Lieyun
2. What is js closure?
3. Which one is faster, for or foreach?
4. Who is PHP Bird Brother? Can you talk about the PHP execution principle?
5. What are the PHP accelerators? apc, zend, xcache...can you talk about their acceleration principles?
6. It is nonsense that Node.js can completely replace php+apache.
7. How to determine whether a value exists in an array? in_array(), array_key_exists,...
8. How to determine whether index is used in the select statement? explain
9. Do you use a third-party library for sphinx’s Chinese word segmentation library or build your own library?
10. If an interviewee has little experience and poor foundation, he or she will ask about advanced knowledge at this time. If you want to doubt its stability, you can ask whether working overtime would be objectionable to him.
11. What are the differences between mysql and mysqli?
12. What is the future development direction? Security, or data mining, or big data processing?
13. PHP is oriented towards objects: class modifiers, encapsulation, inheritance, and polymorphism.
14. What is PHP polymorphism?
15. Type Hinting: http://www.php.net/manual/en/language.oop5.typehinting.php
16. PHP’s design patterns : singleton mode , factory mode, producer mode. .....etc. 23 kinds
17. Server status code: 200, 202, 301, 404, 500...
18. What is the difference between $i++ and ++$i?
19. Project development: Shopping cart data persistence in e-commerce projects, security considerations for exam systems,
20. MySQL design basics: three major paradigms, functions->Thinkingmap, the first step in creating tables What are fields?
21. MySQL field char, varchar, int, smallint, tinyint, mediumint, bigint, decimal, double, float bytes and application scenarios.
22. What are the usage scenarios of memcache, mongoDB, and Redis?
23. Why do mongoDB and Redis not compete but complement each other?
24. What are the data types of Redis? int, string, hash, set, list?
25. When installing Linux software, should you use make or yum?
26. Linux network optimization: Check the process ps -aux|grep mysqld. How to check the maximum number of open files?
27. What is the virtual function in C language?
28. What should I do if I want to push one WeChat post to 1 million fans?
29. What algorithms do you know? Bubble Sort? Quick sort? Binary search method?
30. What are the respective advantages of yii thinkphp ci?
31. What are the php design patterns?
32. What are the c sorting algorithms?
33. What is the basic structure of php?
34. Memcache magent distributed design?
35. How to design redis distributed design?
36. What is the mongo cluster architecture?
37. mysql indexprinciple and sqlperformance optimization
38. tcp/ip network protocol, what is the osi7 layer?
39. PHP handles big data business
40. Linux application load performance check?
41. Practical optimization of business functions of nginx?
42. Tell us about your most successful work in the past three years?
43. Looking at your resume, you will be asked about the number of users, pv, throughput, related difficulties and solutions of some past projects.
44. Database design experience, Why perform table partitioning? Database partitioning? 45. How much data volume is generally used to start partitioning? Database partitioning? What is the purpose of database partitioning and table partitioning? What is database vertical splitting? Horizontal splitting? Partitioning, etc.? You can give examples
46. What are the database optimizations? What should you pay attention to?
47. What caches will you encounter in web development? How to optimize them?
48. Give you 256M of memory to sort 10G files (each file row 1 number), how to achieve it?
49. How to search for 10G files?
50. How to count the number of occurrences of each keyword in a 10G file?
51. If you are now the designer of 12306 train ticket booking, how should you design to satisfy the needs of people across the country?
52. If there are 100 million user visits, what is your server architecture? User information storage scheme How to design?
53. If you are a technical team leader and your team’s task progress cannot be completed, how should you solve it?
54. If you insert a task when the schedule is full, how should you ensure that the overall progress is not delayed?
55 . If some engineers have not completed their scheduled tasks today, how should you solve it?
56. From your experience, talk about how to build a high-performance web site? What links are required? What steps? What should be paid attention to in each step and how to optimize it?
57. Why is it necessary to separate the database from master and slave?
58. How to handle multi-server shared sessions?
59. For a 10G table, you use a PHP program to count the number of times a certain field appears. What is the idea?
60. I will tell you An nginx log example. Use the programming language you think is the best to count the top 10 URLs with http response times exceeding 1 second?
61. Give you a mysql configuration file. Use the programming language you think is the best to parse the file?
62. Given two paths a and b, write an algorithm or idea to calculate the distance between a and b and display the intersection of a and b?
63. Give you a url, configure rewrite in nginx to specify a specific path?
64. What is the interpretation process of a php file? What are the general methods to speed up php? What technologies are used to improve the overall performance of php?
65. session What is the difference between cookie life cycle and cookie life cycle? What is the difference between storage location?
66, require, include, require_once, include_once? What is the difference between loading? If the program loads a php file on demand, how do you implement it?
67 , Chrome is called multi-threaded, so the difference between multi-threading and multi-process is?
68. PHP had a hash collision at the end of 2011. What is the principle of hash collision? How to fix it?
69. What are the insecure factors of web? What are the differences? Prevention?
70. If two singly linked lists intersect, write an optimal algorithm to calculate the intersection position, and you can also talk about the idea?
71. What if you are the technical team leader? How to improve team efficiency?
72. What are the nginx load balancing? If one of the servers hangs up, how to implement the alarm mechanism?
73. Without optimization, what is the general maximum number of connections for apache? What is the general maximum number of connections for nginx? mysql insert per second? select? update? delete?
74. mysql What are the data types? How much storage space do they occupy?
75. nginx is set to cache js, css, pictures and other information. What is the implementation principle of caching?
76. How to improve the cache hit rate? How to granularize the cache?
77. What is the memory recycling mechanism of PHP?
78. I have asked all my questions (of course not so many). Do you have any questions for me?
The above introduces the common interview questions for PHPers with 3-5 years of experience, including performance optimization, blogging, require, include, and singleton mode. I hope it will be helpful to friends who are interested in PHP tutorials.

PHP is used to build dynamic websites, and its core functions include: 1. Generate dynamic content and generate web pages in real time by connecting with the database; 2. Process user interaction and form submissions, verify inputs and respond to operations; 3. Manage sessions and user authentication to provide a personalized experience; 4. Optimize performance and follow best practices to improve website efficiency and security.

PHP uses MySQLi and PDO extensions to interact in database operations and server-side logic processing, and processes server-side logic through functions such as session management. 1) Use MySQLi or PDO to connect to the database and execute SQL queries. 2) Handle HTTP requests and user status through session management and other functions. 3) Use transactions to ensure the atomicity of database operations. 4) Prevent SQL injection, use exception handling and closing connections for debugging. 5) Optimize performance through indexing and cache, write highly readable code and perform error handling.

Using preprocessing statements and PDO in PHP can effectively prevent SQL injection attacks. 1) Use PDO to connect to the database and set the error mode. 2) Create preprocessing statements through the prepare method and pass data using placeholders and execute methods. 3) Process query results and ensure the security and performance of the code.

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP makes it easy to create interactive web content. 1) Dynamically generate content by embedding HTML and display it in real time based on user input or database data. 2) Process form submission and generate dynamic output to ensure that htmlspecialchars is used to prevent XSS. 3) Use MySQL to create a user registration system, and use password_hash and preprocessing statements to enhance security. Mastering these techniques will improve the efficiency of web development.

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Dreamweaver CS6
Visual web development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.