Table of Contents
Summary of PHP interview questions, summary of PHP test questions
Home Backend Development PHP Tutorial Summary of PHP interview questions, summary of PHP test questions_PHP tutorial

Summary of PHP interview questions, summary of PHP test questions_PHP tutorial

Jul 12, 2016 am 09:03 AM
Interview questions

Summary of PHP interview questions, summary of PHP test questions

1. Use PHP to print out the time of the previous day in the format of 2014-01-13 12:10:21 (2 points)

2. The difference between echo(), print() and print_r() (3 points)

 3. Templates that enable HTML and PHP to be used separately (1 point)

4. What tools are used for version control? (1 point)

5. How to implement string flipping? (3 points)

 ——————————————————————

 6. Methods to optimize MYSQL database. (4 points, write more and get more)

7. The meaning of PHP (get 1 point)

8. What is the function that MYSQL uses to obtain the current time?, and the function that formats dates is (2 points)

9. A method to intercept Chinese text strings without garbled characters. (3 points)

 ——————————————————————

10. Have you ever used version control software? If so, what is the name of the version control software you used? (1 point)

11. Have you ever used a template engine? If so, what is the name of the template engine you used? (1 point)

12. Please briefly describe your most proud development work (4 points)

13. For websites with large traffic, what methods do you use to solve the traffic problem? (4 points)

 ————————————————————————

14. Use PHP to write the code to display the client IP and server IP (1 point)

15. What is the difference between the include and require statements? To avoid including the same file multiple times, you can replace them with (?) statements? (2 points)

16. How to modify the survival time of SESSION (1 minute).

17. There is a web page address, such as Keleyi’s homepage: http://keleyi.net/default.htm, how to get its content? ($1 point)

18. In HTTP 1.0, the meaning of status code 401 is (?); if the prompt "File not found" is returned, the header function can be used, and its statement is (?); (2 points)

19. In PHP, heredoc is a special string, and its end mark must be? (1 point)

20. Talk about the advantages and disadvantages of asp, php and jsp (1 point)

21. Talk about your understanding of mvc (1 point)

 ——————————————————————-

22. Write the SQL of the names of the ten people with the most posts, using the following table: members (id, username, posts, pass, email) (2 points)

 23. 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? (2 points)

 24. What is the function of error_reporting in PHP? (1 point)

 25. Please write a function to verify whether the format of the email is correct (2 points)

 26. Briefly describe how to get the current execution script path, including the obtained parameters. (2 points)

27. How to modify the survival time of SESSION. (1 point)

 ——————————————————————–

28. What is the function to pop up a dialog box in a JS form? What is the function to get input focus? (2 points)

29. What is the redirection function of JS? How to introduce an external JS file? (2 points)

30. What is the difference between foo() and @foo()? (1 point)

31. How to declare a class named "myclass" without methods and attributes? (1 point)

32. How to instantiate an object named "myclass"? (1 point)

33. How do you access and set the properties of a class? (2 points)

 34. What is the difference between mysql_fetch_row() and mysql_fetch_array? (1 point)

 ——————————————————————–

35. What is the GD library used for? (1 point)

36. Point out some ways to enter a piece of HTML code in PHP. (1 point)

37. Which of the following functions can open a file for reading and writing? (1 point)
(a) fget() (b) file_open() (c) fopen() (d) open_file()

38. Which of the following options does not add john to the users array? (1 point)
(a) $users[] = 'john';
(b) array_add($users,'john' );
(c) array_push($users,'john');
(d) $users ||= 'john';

 39. Will the following program be input? (1 point)
 $num = 10;
 function multiply(){
 $num = $num * 10;
 }
multiply();
echo $num;
?>

40. Use PHP to write a simple query to find out all the content named "Zhang San" and print it out (2 points)
Table name UserName Tel Content Date
Zhang San 13333663366 College graduate 2006-10 -11
                        around through 136123.                     ious 136123.                                 Around 136123.    ( "local","root","pass");
 @mysql_select_db("DB",$mysql_db);

41. How to use the following class and explain what it means? (3)
class test{

function Get_test($num){

$num=md5(md5($num). "En");
return $num;
 }
 }

 ——————————————————————————-

42. Write the format of the SQL statement: insert, update, delete (4 points)

Table name UserName Tel Content Date

Zhang San 13333663366 College graduate 2006-10-11

Zhang San 13612312331 Undergraduate Graduation 2006-10-15
                                                       wealth wealth in in ininging in in on in 2006-10-15   In the table
(b) Please use sql statement to update Zhang San’s time to the current system time
(c) Please write to delete all records named Zhang Si

43. Please write the meaning of data type (int char varchar datetime text); what is the difference between varchar and char (2 points)

44. MySQ auto-increment type (usually table ID field) must be set to (?) field (1 point)

45. Write the output result of the following program (1 point)

$b=201;

$c=40;

$a=$b>$c?4:5;

echo $a;
?>

46. Is there a function that detects whether a variable is set? What is the function that detects whether it is empty? (2 points)

 ————————————————————————————

47. What is the function to obtain the total number of query result sets? (1 point)

48. $arr = array('james', 'tom', 'symfony'); Please print out the value of the first element (1 point)

49. Please separate the array values ​​in question 41 with ',' signs and merge them into string output (1 point)

50. $a = 'abcdef'; Please take out the value of $a and print out the first letter (1 point)

51. Can PHP be connected to databases such as sql server/oracle? (1 point)

52. Please write the PHP5 permission control modifier (3 points)

53. Please write down the constructor and destructor of php5 (2 points)

 ——————————————————————————

54. Please use PHPMYADMIN to complete the following

(1) Create a news release system. The table name message has the following fields (3 points)

id article id

title article title

content article content

category_id article category id
hits Click count

(2) The same news release system as above: The comment table records the user's reply content. The fields are as follows (4 points)
comment_id reply id
id article id, associated with the id in the message table

comment_content reply content

Now you need to get a list of article titles in the following format by querying the database, and sort them by the number of replies, with the highest reply at the top
Article id Article title clicks Number of replies
Use a SQL statement to complete the above query , if the article has no replies, the number of replies will be displayed as 0

(3) In the above content management system, the table category stores classification information. The fields are as follows (3 points)
category_id int(4) not null auto_increment;
category_name varchar(40) not null;

User When entering an article, select the article category by selecting the drop-down menu

Write how to implement this drop-down menu

Fill in the blanks

 1. In PHP, the name of the current script (excluding path and query string) is recorded in predefined variables; and the URL linking to the current page is recorded in predefined variables.

2. The execution program segment will be output.

3. In HTTP 1.0, the meaning of status code 401 is; if a "File not found" prompt is returned, the header function can be used, and its statement is.

 4. The function of array function arsort is; the function of statement error_reporting(2047) is.

 5.The database connection string format in PEAR is.

6. Write a regular expression to filter all JS/VBS scripts on the web page (that is, remove the scrīpt tag and its content):.

7. Install PHP as an Apache module. In the file http.conf, you must first use statements to dynamically load the PHP module, and then use statements to make Apache process all files with the extension php as PHP scripts.

8. The statements include and require can include another file into the current file. The difference between them is that in order to avoid including the same file multiple times, you can use statements to replace them.

9. The attributes of the class can be serialized and saved to the session, so that the entire class can be restored later. The function to be used is.

10. The parameter of a function cannot be a reference to a variable, unless it is set to on in php.ini.

 11.The meaning of LEFT JOIN in SQL is. If tbl_user records the student's name (name) and student number (ID), tbl_score records the student's (some students were expelled after the exam and there is no record of them) student number (ID) and test scores (score) as well as test subjects (subject), if you want to print out the name of each student and the corresponding total score of each subject, you can use SQL statements.

12. In PHP, heredoc is a special string, and its end mark must be.

Programming questions

 
 1. Write a function to extract the file extension from a standard URL as efficiently as possible
 For example: http://keleyi.com/a/bjac/4w0otu4n.htm needs to extract htm or .htm

2. In HTML language, the meta tag in the header of the page can be used to output the encoding format of the file. The following is a standard meta statement
Please use PHP language to write a function to convert a standard HTML page into Similar to the charset part of the meta tag, the value is changed to big5
Please note:
1. Need to process the complete html page, that is, not just this meta statement
2. Ignore case
3. ' and " They are interchangeable here
4. The quotation marks on both sides of 'Content-Type' can be ignored, but the quotation marks on both sides of 'text/html; charset=gbk' are not acceptable
5. Pay attention to handling extra spaces

3. Write a function to calculate the relative paths of two files
For example, $a = '/a/b/c/d/e.php';
$b = '/a/b/ 12/34/c.php';
Calculate the relative path of $b relative to $a should be ../../c/d and add ()

Write a function that can traverse all files and subfolders in a folder.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1083194.htmlTechArticle Summary of PHP interview questions, summary of PHP test questions 1. Use PHP to print out the time of the previous day. The format is 2014-01-13 12:10:21 (2 points) 2. The difference between echo(), print(), and print_r() (3 points) 3. Able to separate HTML and PHP...
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)

Five common Go language interview questions and answers Five common Go language interview questions and answers Jun 01, 2023 pm 08:10 PM

As a programming language that has become very popular in recent years, Go language has become a hot spot for interviews in many companies and enterprises. For beginners of the Go language, how to answer relevant questions during the interview process is a question worth exploring. Here are five common Go language interview questions and answers for beginners’ reference. Please introduce how the garbage collection mechanism of Go language works? The garbage collection mechanism of the Go language is based on the mark-sweep algorithm and the three-color marking algorithm. When the memory space in the Go program is not enough, the Go garbage collector

Summary of front-end React interview questions in 2023 (Collection) Summary of front-end React interview questions in 2023 (Collection) Aug 04, 2020 pm 05:33 PM

As a well-known programming learning website, php Chinese website has compiled some React interview questions for you to help front-end developers prepare and clear React interview obstacles.

A complete collection of selected Web front-end interview questions and answers in 2023 (Collection) A complete collection of selected Web front-end interview questions and answers in 2023 (Collection) Apr 08, 2021 am 10:11 AM

This article summarizes some selected Web front-end interview questions worth collecting (with answers). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

50 Angular interview questions you must master (Collection) 50 Angular interview questions you must master (Collection) Jul 23, 2021 am 10:12 AM

This article will share with you 50 Angular interview questions that you must master. It will analyze these 50 interview questions from three parts: beginner, intermediate and advanced, and help you understand them thoroughly!

Interviewer: How much do you know about high concurrency? Me: emmm... Interviewer: How much do you know about high concurrency? Me: emmm... Jul 26, 2023 pm 04:07 PM

High concurrency is an experience that almost every programmer wants to have. The reason is simple: as traffic increases, various technical problems will be encountered, such as interface response timeout, increased CPU load, frequent GC, deadlock, large data storage, etc. These problems can promote our Continuous improvement in technical depth.

Sharing of Vue high-frequency interview questions in 2023 (with answer analysis) Sharing of Vue high-frequency interview questions in 2023 (with answer analysis) Aug 01, 2022 pm 08:08 PM

This article summarizes for you some selected vue high-frequency interview questions in 2023 (with answers) worth collecting. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

Take a look at these front-end interview questions to help you master high-frequency knowledge points (4) Take a look at these front-end interview questions to help you master high-frequency knowledge points (4) Feb 20, 2023 pm 07:19 PM

10 questions every day. After 100 days, you will have mastered all the high-frequency knowledge points of front-end interviews. Come on! ! ! , while reading the article, I hope you don’t look at the answer directly, but first think about whether you know it, and if so, what is your answer? Think about it and then compare it with the answer. Would it be better? Of course, if you have a better answer than mine, please leave a message in the comment area and discuss the beauty of technology together.

Take a look at these front-end interview questions to help you master high-frequency knowledge points (5) Take a look at these front-end interview questions to help you master high-frequency knowledge points (5) Feb 23, 2023 pm 07:23 PM

10 questions every day. After 100 days, you will have mastered all the high-frequency knowledge points of front-end interviews. Come on! ! ! , while reading the article, I hope you don’t look at the answer directly, but first think about whether you know it, and if so, what is your answer? Think about it and then compare it with the answer. Would it be better? Of course, if you have a better answer than mine, please leave a message in the comment area and discuss the beauty of technology together.

See all articles