Questions and Answers for PHP tests in W3Cschool

Source: Internet
Author: User
: This article mainly introduces the PHP test questions and answers in W3Cschool. if you are interested in the PHP Tutorial, please refer to them. PHP quiz

Result: 20/20

Your answer:

1. what does PHP mean?

Your answer: PHP: Hypertext Preprocessor

2. which separator is used to enclose PHP server scripts?

Your answer:

3. how to output "hello world" using PHP "?

Your answer: echo "Hello World ";

4. which symbol does all the variables start with in PHP?

Your answer: $

5. what is the correct method to end the PHP statement?

Your answer :;

6. Which of the following is the most similar to PHP syntax?

Your answer: Perl and C

7. how to obtain data from a form submitted using the "get" method?

Your answer: $ _ GET [];

8. check whether the following statements are correct: when the POST method is used, the variables are displayed in the URL.

Your answer: Error

9. check whether the following statements are correct: in PHP, you can use single quotation marks ('') or double quotation marks (" ") to enclose strings.

Your answer: correct

10. check whether the following statement is correct: the file must contain the file suffix ". inc ".

Your answer: Error

11. how can I reference the file "time. inc?

Your answer:

12. how can I create a function in PHP?

Your answer: function myFunction ()

13. what is the correct way to open the file "time.txt" in read-only mode?

Your answer: fopen ("time.txt", "r ");

14. check whether the following statements are correct: PHP allows us to send emails directly through scripts.

Your answer: correct

15. what is the correct method for connecting to the MySQL database?

Your answer: mysql_connect ("localhost ");

16. how can I add 1 to the $ count variable?

Your answer: $ count ++;

17. what is the correct method to add comments in PHP?

Your answer :/*... */

18. check whether the following statements are correct: PHP can run on Microsoft Windows IIS (Internet Information Server.

Your answer: correct

19. check whether the following statements are correct: in PHP 5, MySQL support is enabled by default.

Your answer: Error

20. Which of the following variable names is invalid?

Your answer: $ my-Var

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

The above describes the PHP test questions and answers in W3Cschool, including some content. I hope my friends who are interested in PHP tutorials can help me.

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.