PHP Novice Developer Interview

Source: Internet
Author: User
Tags echo date php print

1. What is the difference between get and post submission methods in a form?
Get is a send request HTTP protocol to receive via URL parameter delivery, while post is Entity data, which can be submitted with a large amount of information through the form. And the Post submission method is more secure than the get submission method.

2. Write a function that asks for a maximum value of 3 with the least amount of code?

function ($a, $b, $c) {

Return $a > $b? ($a > $c? $a: $c): ($b > $c? $b: $c);

}

3, in PHP print out the day before the time, the printing format is May 10, 2007 22:21:21?
Echo date (' y-m-d h:i:s ', Strtotime ('-1 day '));

4, JavaScript can define a two-dimensional array, if not you how to solve?
JavaScript does not support two-dimensional array definitions and can be resolved with arr[0] = new Array ()

5. What is the function of Arsort array functions? What is the function of statement error_reporting (2047)?

Reverse-Sort an array and maintain an index relationship. All errors and warnings.

6. Ask for the difference of two dates, such as the 2007-2-5 ~ 2007-3-6 date differential?

$begin =strtotime (' 2007-2-5′);

$end =strtotime (' 2007-3-6′);

Echo ($end-$begin)/(24*3600);

PHP Novice Developer Interview

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.