Php programmer interview questions and answers (Basic Theory)-php Tutorial

Source: Internet
Author: User
Php programmer interview questions and answers (Basic theory)
This article introduces an interview question for php programmers, with detailed answers. it is a basic theoretical content. if you have any friends, please refer to it.

1. what does PHP mean? A: PHP is a server-based scripting language used to create ** websites. you can use PHP and HTML to generate website homepages.

2. what are the advantages and disadvantages of asp, php, and jsp? A: ASP full name Active Server Pages is a WEB Server development environment that can be used to generate and run dynamic, interactive, and high-performance WEB service applications. ASP uses the scripting language VB Script (Java script) as its own development language. PHP is a cross-platform server-side embedded scripting language. it borrowed a lot of C, Java, and Perl syntaxes and coupled with PHP's own features, enabling web developers to quickly write dynamic pages. it supports the vast majority of databases currently. Another point is that PHP is completely free and free to spend, and you can download it freely from the official site of PHP (http://www.php.net. In addition, you can obtain the source code without restrictions, and even add the features you need. JSP is a new generation of site development language released by Sun. it completely solves a common problem of ASP and PHP-script-level execution (it is said that PHP4 is also supported by Zend, compile and run the program ). with its extraordinary accomplishments in Java, Sun has made a new achievement in Java applications and Java applets, namely Jsp-Java Server Page. Jsp supports powerful site programs with the support of Serverlet and JavaBean. All three provide the ability to mix some program code in HTML code and explain and execute the program code by the language engine. However, JSP code is compiled into a Servlet and interpreted and executed by the Java virtual machine. This compilation operation only occurs during the first request to the JSP page. In ASP, PHP, and JSP environments, HTML code describes the display style of information, while program code describes the processing logic. Common HTML pages only depend on Web servers, while ASP, PHP, and JSP pages require additional language engines to analyze and execute program code. The execution result of the program code is re-embedded into the HTML code and sent to the browser together. ASP, PHP, and JSP are all Web server-oriented technologies. client browsers do not require any additional software support.

3. What about mvc? A: An application completed by a Model, View, and Controller sends the functions to be implemented by the Model to the Controller, and the Controller receives the organizational functions and passes them to the View;

4. write the SQL statement for the top 10 people with the most posts. use the following table: members (id, username, posts, pass, email). answer:

SELECT * FROM 'members 'order by posts DESC limit 0, 10;

5. what is the GD library used?

A: The gd Library provides a series of functions to process images. you can use the GD library to process images or generate images. The GD library on a website is usually used to generate thumbnails, add watermarks to images, or generate reports for website data.

6. write out the meaning of the data type (int char varchar datetime text). What is the difference between varchar and char? A: The int type is a numeric string with a fixed char length. the actual varchar length string, datetime date type, and text string. the char field is invariably set to the length of the table to be created, varchar is a variable-length character.

The above is all the content of the php interview questions provided in this article. The questions and answers are mostly basic theories and I hope to help you.

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.