PHP Language | 10 Minute‐Test 16


Instruction

  • Total number of questions : 10.
  • Time alloted : 10 minutes.
  • Each question carry 1 mark.
  • No Negative marks
  • DO NOT refresh the page.
  • All the best :-).

1.

Which one of the following keyword is used to inherit our subclass into a superclass?

A.
extends
B.
implements
C.
inherit
D.
include

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

None.

2.

If your object must inherit behavior from a number of sources you must use a/an

A.
Interface
B.
Object
C.
abstract class
D.
static class

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

None.

3.

Which of the following statements causes PHP to disregard repeated error messages that occur within the same file and on the same line?

A.
ignore_repeated_errors
B.
ignore_repeat_error
C.
repeatedly_ignore_error
D.
repeated_error_ignore

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

None.

4.

What does SPL stand for?

A.
Standard PHP Library
B.
Source PHP Library
C.
Standard PHP List
D.
Source PHP List

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

The standard PHP library(SPL) extends PHP by offering ready-made solutions to commonplace tasks such as file access, iteration of various sorts etc.

5.

If the input variable is a string like this “http://www.saåånfoøøundry.com/”, the $url variable after the sanitizing will look like

A.
http://www.saåånfoøøundry.com/
B.
http://www.saaanfoooundry.com/
C.
http://www.saånfoøundry.com/
D.
http://www.sanfoundry.com/

Your Answer: Option (Not Answered)

Correct Answer: Option D

Explanation:

Sanitize is nothing but take away invalid characters so therefore the invalid characters like å and ø will be removed.

6.

POSIX stands for

A.
Portable Operating System Interface for Unix
B.
Portable Operating System Interface for Linux
C.
Portative Operating System Interface for Unix
D.
Portative Operating System Interface for Linux

Your Answer: Option (Not Answered)

Correct Answer: Option A

Explanation:

None

7.

Which one of the following functions can be used to concatenate array elements to form a single delimited string?

A.
explode()
B.
implode()
C.
concat()
D.
concatenate()

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

None

8.

Which one of the following function outputs the contents of a string variable to the specified resource?

A.
filewrite()
B.
fwrite()
C.
filewrites()
D.
fwrites()

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

None

9.

Which function displays the web page’s most recent modification date?

A.
lastmod()
B.
getlastmod()
C.
last_mod()
D.
get_last_mod()

Your Answer: Option (Not Answered)

Correct Answer: Option B

Explanation:

The getlastmod() function returns the value of the page’s Last Modified header or FALSE in the case of an error.

10.

Among the four PHP DateTimeZone classes given below how many are static?
i) listAbbreviations()
ii) getName()
iii) getOffset()
iv) listIdentifiers()

A.
1
B.
2
C.
3
D.
4
Submit your test now to view the Results and Statistics with answer explanation.