Home Backend Development PHP Tutorial 2019 Latest PHP Mock Interview Questions and Answers

2019 Latest PHP Mock Interview Questions and Answers

Feb 15, 2019 pm 04:13 PM
Answer

Every time we reach the final critical stage, we will continue to conduct mock interviews. PHP Chinese Network allows some students to successfully complete their studies and find their ideal jobs. Here, PHP Chinese Network shares some PHP interview questions mentioned in PHP mock interviews for your reference, study and communication. [Recommended tutorial: php programming introductory tutorial]

Related recommendations: "2019 PHP interview questions summary (collection)"

PHP simulation The interview questions are summarized as follows:

1. How to prevent repeated submission of form forms?

2. Can the session still be used if cookies are disabled?

3. What version control tools do you know or have used? Just explain it briefly.

CVS,SVN, vss, git

4. How to realize the advantages of singleton mode?

5. What is the difference between single quotes and double quotes?

(1) Double quotes can parse variables, but single quotes cannot parse variables

(2) Double quotes and single quotes can be nested in each other

(3) Variables in double quotes can be separated by special characters, but the special characters will be output as they are. Using {} will not output

(4) Double quotes contain single quotes, and single quotes contain variables, and the variables will be is parsed, single quotes will be output as they are

(5) Double quotes can parse escape characters, single quotes will not parse escape characters, single quotes will only parse the escape of \ itself and '

(6) Single quotes are nested within single quotes, and double quotes are nested within double quotes. The single quotes and double quotes need to be escaped using \ to comply with

(7) Single quote efficiency higher than double quotation marks

6. For websites with large traffic, what method do you use to solve the traffic problem?

7. What is the main difference between the field types varchar and char in the MySQL database? Which field has higher search efficiency? Why?

8. Explain the differences between echo(), var_dump(), and print_r().

9. Please explain the difference between passing by value and passing by reference in PHP. When to pass by value and when to pass by reference?

10. Explain the difference between Include, include_once, require, and require_once?

11. Methods to optimize MYSQL database. (4 points, the more you write, the more you get)

Answer: (1) Select the most applicable field attributes, reduce the length of the defined fields as much as possible, and try to set the fields to NOT NULL, such as 'province, gender' , it is best to set it to ENUM.

(2) Use join (JOIN) instead of subquery:

(3) Use union (UNION) instead of manually created temporary table

(4) Transaction Processing:

(5) Lock the table, optimize transaction processing:

(6) Use foreign keys, optimize the lock table

(7) Create index:

(8) Optimize query statements

12. How to optimize query statements and improve query efficiency?

13. What is the difference between Session and cookie?

14. What is the difference between Get and post?

15. What is a mysql transaction? What are the characteristics of transactions?

16. Commonly used super global variables

$_GET ----->get transmission method

$POST -- --->Post transmission method

$REQUEST ----->Can receive values ​​in both get and post methods

17.HTTP status code

200 - Request successful

301 - The resource (webpage, etc.) is permanently escaped to another URL

404 - The requested resource (webpage, etc.) does not exist

505 - Internal Server Error

1** - Information, the server received a request that requires the requester to continue performing the operation

2** - Success, the operation was successfully received and Handling

3** - Redirect, further action is required to complete the request

4** - Client error, the request contains a syntax error or the request cannot be completed

5 ** Server error. An error occurred while the server was processing the request.

18. How to get the client’s IP (requires an int) and the code of the server’s IP

Client: $_SERVER["REMOTE_ADDR"]; or getenv ('REMOTE_ADDR')

Server: gethostbyname ('www.baidu.com')

19. Write Names of more than three MySQL database storage engines

MyISAM, InnoDB, BDB (BerkeleyDB), Merge, Memory (Heap), Example, Federated,

Archive, CSV, Blackhole , MaxDB and more than a dozen engines

20. Have you ever used Memcache cache? If so, can you briefly describe its working principle

Memcahce is All data is stored in memory in the form of a hash table. Each piece of data is composed of key and value. Each key is unique. When accessing a certain value, first find the value and then return the result.

Memcahce uses the LRU algorithm to gradually clear out expired data

21. Explain what the Ajax implementation principle is and what role json plays in Ajax

The working principle of Ajax is that the specified location of one page can load all the output content of another page. In this way, a static page can also obtain the returned data information from the database. Therefore, Ajax technology enables a static web page to communicate with the server without refreshing the entire page, reducing user waiting time, thereby reducing network traffic and enhancing the friendliness of the customer experience.

When using Ajax, it involves data transmission, that is, returning data from the server to the client. The server and client use different script languages ​​to process data, which requires a common data format. XML and json are the two most commonly used, and json is simpler than XML

22.php lists 3-6 string processing functions

strlen() The function returns the length of the string

strpos() The function is used to retrieve the specified characters or text within the string

strtolower — Convert the string to lowercase

strtoupper – Convert the string to lowercase Convert the string to uppercase

strtr — Compare and replace the string

substr — Intercept the string

explode — Convert a string into an array using a delimiter Form

implode — Convert an array into a string using a specific delimiter

To sum up, these are the PHP simulation interview questions shared by the php Chinese website for your reference and learning. Practice, use it flexibly, and successfully pass the real interview. Finally, I wish you all can find a satisfactory job in the future.

The above is the detailed content of 2019 Latest PHP Mock Interview Questions and Answers. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Eggman's Party uncovers the answers to the troublemaker's questions Eggman's Party uncovers the answers to the troublemaker's questions Feb 22, 2024 pm 01:10 PM

Eggboy Party has recently been very popular in finding troublemakers to answer questions. What are the answers to the 20 questions? Many players are afraid of making mistakes, so they search. In fact, these questions are very basic, and the answers have been summarized. Let’s take a look. Read this summary of answers to all 20 questions about spotting the troublemakers at Eggman's Party, it will definitely help you. Eggman Party Strategy Guide Eggman Party Unlocks Troublemaker Answers 1. As a scheming eggman, which of the following is your skill effect? ​​Answer: It can make the knocked down Eggman invisible 2. After a game fails, the following Which behavior is wrong? Answer: Blaming Eggman for the failure. 3. Which of the following statements about emergency discussions is correct? Answer: When there is important information, you can initiate an emergency discussion to tell everyone 4. Which of the following is in the game?

Samsung Galaxy Z Flip6 review: Simple design and practical experience, is the answer to the discounted version? ! Samsung Galaxy Z Flip6 review: Simple design and practical experience, is the answer to the discounted version? ! Jul 30, 2024 pm 12:54 PM

In the field of folding screens, small folding screens are also loved by many young users due to their lightweight, portable, exquisite and compact fashion attributes. In the previous review of the Samsung Galaxy Z Fold6 large folding screen, I gave it a "more square and more AI" evaluation. The small folding screen released at the same time, Samsung Galaxy Z Flip 6, has also attracted much attention. So what will it be like? Today, let’s unlock this new fashion product together. "Light" design: The fashionable appearance on the fingertips is the same as Galaxy Z Fold 6. The Galaxy Z Flip 6 body adopts a square design. In the unfolded state, the fuselage is slender than the average candy bar machine. The front and rear are connected by a straight-sided middle frame, and the four R corners retain a rounded shape.

Ant New Village Today's Answer 2.22 Ant New Village Today's Answer 2.22 Feb 22, 2024 pm 01:10 PM

Which of the following occupations specializes in repairing damaged cosmetic products? Ant New Village’s today’s question. Today’s answer in Ant New Village is a makeup repairer. Some expensive cosmetics are more cost-effective to repair and reuse. For more details, follow the editor to read this article on Ant New Village in 2024. Today’s answer is the latest 2.22, I hope it can help you. Ant New Village Today's Answers Latest Ant New Village Today's Answers 2.22 Question: Which of the following professions specializes in repairing damaged makeup products? Answer: Makeup Restorer Analysis: Makeup restorers are craftsmen who specialize in repairing damaged makeup products. They grind, heat, sterilize, and mold Various processes such as molding and packaging are used to re-repair damaged cosmetic products.

Ant Manor Today's Answer 2.24 Ant Manor Today's Answer 2.24 Feb 23, 2024 pm 01:13 PM

What is today’s answer to Ant Manor 2.24? Today’s questions are: In order to prevent the glutinous rice balls from sticking to the bottom of the pot, what should you do? What kind of holiday delicacy is "stars shining in dark clouds, pearls floating in turbid water"? There are many friends who still don’t know the answer to the question, so the editor below will bring you today’s answers to the latest Ant Manor Chicken 2.24 in 2024. Interested friends, please come and find out together. Summary of Ant Manor's Today's Answers Ant Manor's Today's Answers 2.24 Question 1: In order to prevent the glutinous rice balls from sticking to the bottom of the pot, what should be done? Correct answer: Tangyuan under boiling water Ant Manor 2.24 Question 1 answer details Question 2: What kind of holiday delicacy is "stars shining in dark clouds, beads floating in turbid water"? Correct answer: Tangyuan Ant Manor 2.24 question 2 answer details How to participate in the daily question of Ant Manor

Ant New Village Today's Answer 3.7 Ant New Village Today's Answer 3.7 Mar 07, 2024 am 11:37 AM

Which of the following occupations is a good helper for scientific baby care? Ant New Village’s today’s question. Ant New Village’s today’s answer is nanny. Nanny is really professional in taking care of babies. Follow the editor to read this Ant New Village’s today’s answer 3.7 for the specific content. The latest 2024, I hope it can help you. Ant New Village Today's Answers Latest Ant New Village Today's Answers 3.7 Question: Which of the following professions is a good helper in scientific child care Answer: Nanny Analysis: A nanny is a good helper in scientific child care, which refers to the use of modern educational concepts and scientific methods Professionals who provide daily care, nursing and education for babies aged 0-3 years old.

Ant Manor Today's Answer 3.11 Ant Manor Today's Answer 3.11 Mar 10, 2024 am 11:34 AM

What is today’s answer to Ant Manor 3.11? Today's questions are: Who is the protagonist of the idiom "stand out"? Which of the following vegetables has another name "chrysanthemum vegetable"? There are many friends who still don’t know the answer to the question, so the editor below will bring you today’s answers to the latest Ant Manor Chicken 3.11 in 2024. Interested friends, please come and find out together. Summary of today's answers to Ant Manor Today's answers to Ant Manor 3.11 Question 1: Who is the protagonist of the idiom "stand out"? Correct answer: Maosui Ant Manor 3.11 Question 1 answer details Question 2: Which of the following vegetables has another name "chrysanthemum vegetable"? Correct answer: Artemisia Ant Manor 3.11 question 2 answer details Ant Manor daily question How to participate: 1. First open Alipay

Ant Manor Today's Answer 1.28 Ant Manor Today's Answer 1.28 Feb 24, 2024 pm 01:30 PM

What is today’s answer to Ant Manor 1.28? Today’s questions are: Why do the surrounding walls of electric lamps become easily “blackened” after being used for a long time? Why is the southwestern folk dish "Zhe'ergen" also called "Houttuynia cordata"? There are many friends who still don’t know the answer to the question, so the editor below will bring you today’s answers to the latest Ant Manor Chicken 1.28 in 2023. Interested friends, come and find out together. Summary of Ant Manor's Today's Answers Ant Manor's Today's Answers 1.28 Question 1: Why are the surrounding walls easily "blacked out" after the electric lamp has been used for a long time? Correct answer: Particle deposition leads to Ant Manor 1.28 Question 1 answer details Question 2: Why is the southwestern folk dish "Zheergen" also called "Houttuynia cordata"? Correct answer: Fishy-smelling Ant Manor 1.2

Ant Manor Today's Answer 1.9 Ant Manor Today's Answer 1.9 Feb 23, 2024 pm 11:50 PM

What is today’s answer to Ant Manor 1.9? Today’s questions are: Is the traditional snack “almond tofu” a soy product? What does the word "瓓" in the idiom "a high-rise building with a commanding position" refer to? There are many friends who still don’t know the answer to the question, so the editor below will bring you today’s answers to the latest Ant Manor Chicken 1.9 in 2023. Interested friends, come and find out together. Summary of Ant Manor's Today's Answers Ant Manor's Today's Answers 1.9 Question 1: Is the traditional snack "almond tofu" a soy product? Correct answer: No Ant Manor 1.9 Question 1 answer details Question 2: What does the "瓓" in the idiom "lofty building in a high place" refer to? Correct answer: A bottle filled with water Ant Manor 1.9 question 2 answer details Ant Manor daily question How to participate: 1. First open the payment

See all articles