Development - Php - Php

What does PHP stand for? i) Personal Home Page ii) Hypertext Preprocessor iii) Pretext Hypertext Processor iv) Preprocessor Home Page

A.  Both i) and iii)

B.  Both ii) and iv)

C.  Only ii)

D.  Both i) and ii)

View Answer  

Correct Answer :

Both i) and ii)



Explanation :

PHP previously stood for Personal Home Page now stands for Hypertext Preprocessor


PHP files have a default file extension of..

A.  .html

B.  .xml

C.  .php

D.  .ph

View Answer  

Correct Answer :

.php



Explanation :
No Explanation available for this question

A PHP script should start with ___ and end with ___:

A.  < php >

B.  < ? php ?>

C.  

D.  

View Answer  

Correct Answer :

<?php ?>



Explanation :

Every section of PHP code starts and ends by turning on and off PHP tags to let the server know that it needs to execute the PHP in between them


Which version of PHP introduced Try/catch Exception?

A.  PHP 4

B.  PHP 5

C.  PHP 5.3

D.  PHP 6

View Answer  

Correct Answer :

PHP 5



Explanation :

Version 5 added support for Exception Handling


We can use ___ to comment a single line? i) /? ii) // iii) # iv) /* */

A.  Only ii)

B.  i), iii) and iv)

C.  ii), iii) and iv)

D.  Both ii) and iv)

View Answer  

Correct Answer :

ii), iii) and iv)



Explanation :

/* */ can also be use to comment just a single line although it is used for paragraphs. // and # are used only for single line comment.


Which of the below statements is equivalent to $add += $add ?

A.  $add = $add

B.  $add = $add +$add

C.  $add = $add + 1

D.  $add = $add + $add + 1

View Answer  

Correct Answer :

$add = $add +$add



Explanation :

a += b is an addition assignment whose outcome is a = a + b. Same can be done with subtraction,multiplication,division etc.


Which function is responsible for sending a custom message to the system log?

A.  systemlog()

B.  syslog()

C.  log_system()

D.  sys_log()

View Answer  

Correct Answer :

syslog()



Explanation :
No Explanation available for this question

Which logging option’s description is, if an error occurs when writing to the syslog, send output to the system console?

A.  LOG_CONS

B.  LOG_NDELAY

C.  LOG_ODELAY

D.  LOG_PERROR

View Answer  

Correct Answer :

LOG_CONS



Explanation :
No Explanation available for this question

Which function initializes the constants necessary for using the openlog(), clodelog(), and syslog() functions?

A.  define_variable()

B.  define_log_variable()

C.  log_variable()

D.  define_syslog_variable()

View Answer  

Correct Answer :

define_syslog_variable()



Explanation :
No Explanation available for this question

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

View Answer  

Correct Answer :

ignore_repeated_errors



Explanation :
No Explanation available for this question

Say you want to report error concerned about fatal run-time, fatal compile-time error and core error which statement would you use?

A.  error_reporting = E_ALL

B.  error_reporting = E_ERROR | E_PARSE | E_CORE_ERROR

C.  error_reporting = E_ERROR | E_COMPILE_WARNING | E_CORE_ERROR

D.  error_reporting = E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR

View Answer  

Correct Answer :

error_reporting = E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR



Explanation :
No Explanation available for this question

Which version introduced the function error_get_last()?

A.  PHP 4

B.  PHP 5

C.  PHP 5.2

D.  PHP 5.3

View Answer  

Correct Answer :

PHP 5.2



Explanation :
No Explanation available for this question

Which character do the error_reporting directive use to represent the logical operator NOT?

A.  /

B.  !

C.  ~

D.  ^

View Answer  

Correct Answer :

~



Explanation :
No Explanation available for this question

Which version of PHP introduced E_STRICT Error level?

A.  PHP 4

B.  PHP 5

C.  PHP 5.2

D.  PHP 5.3

View Answer  

Correct Answer :

PHP 5



Explanation :
No Explanation available for this question

What is the description of Error level E_ERROR?

A.  Fatal run-time error

B.  Near-fatal error

C.  Compile-time error

D.  Fatal Compile-time error

View Answer  

Correct Answer :

Fatal run-time error



Explanation :
No Explanation available for this question

How many error levels are available in PHP?

A.  14

B.  15

C.  16

D.  17

View Answer  

Correct Answer :

16



Explanation :
No Explanation available for this question

Which one of the following filter checks if variable of specified type exists?

A.  filter_has_var

B.  filter_var

C.  filter_id

D.  filter_var_array

View Answer  

Correct Answer :

filter_has_var



Explanation :
No Explanation available for this question

Which one of the following does not describe a validating filter?

A.  Are used to allow or disallow specified characters in a string

B.  Are used to validate user input

C.  Strict format rules

D.  Returns the expected type on success or FALSE on failure

View Answer  

Correct Answer :

Are used to allow or disallow specified characters in a string



Explanation :
No Explanation available for this question

How many types of filtering are present in PHP?

A.  3

B.  2

C.  4

D.  None

View Answer  

Correct Answer :

2



Explanation :
No Explanation available for this question

Which one of the following filter is used to filter several variables with the same or different filters?

A.  filter_var_array()

B.  filter_var()

C.  filter_input

D.  filter_input_array

View Answer  

Correct Answer :

filter_var_array()



Explanation :
No Explanation available for this question

Which of the following is/are an external data? i) Cookies ii) Input data from a form iii) Server Variables iv) Web services data

A.  Only ii)

B.  ii) and iii)

C.  None of the mentioned

D.  All of the mentioned

View Answer  

Correct Answer :

All of the mentioned



Explanation :
No Explanation available for this question

Which of the following is/are an exception? i) OutOfBoundException ii) OutOfRangeException iii) OverflowException iv) UnderflowException

A.  All of the mentioned

B.  i) and iii)

C.  i) and ii)

D.  None of the mentioned

View Answer  

Correct Answer :

All of the mentioned



Explanation :
No Explanation available for this question

You can extend the exception base class, but you cannot override any of the preceding methods because the are declared as..

A.  protected

B.  final

C.  static

D.  private

View Answer  

Correct Answer :

final



Explanation :
No Explanation available for this question

How many predefined exceptions does SPL provide access to?

A.  13

B.  14

C.  15

D.  16

View Answer  

Correct Answer :

13



Explanation :
No Explanation available for this question

Which of the following is/are not an exception? i) BadFunctionCallException ii) BadMethodCallException iii) LogicException iv) DomainException

A.  All of the mentioned

B.  Only iv)

C.  iii) and iv)

D.  None of the mentioned

View Answer  

Correct Answer :

None of the mentioned



Explanation :
No Explanation available for this question

What does SPL stand for?

A.  Standard PHP Library

B.  Source PHP Library

C.  Standard PHP List

D.  Source PHP List

View Answer  

Correct Answer :

Standard PHP Library



Explanation :
No Explanation available for this question

Which one of the following is the right description for the method getMessage() ?

A.  Returns the message if it is passed to the constructor.

B.  Returns the message if it is passed to the class.

C.  Returns the message if it is passed to the file.

D.  Returns the message if it is passed to the object.

View Answer  

Correct Answer :

Returns the message if it is passed to the constructor.



Explanation :
No Explanation available for this question

Parameter flags was added in which version of PHP?

A.  PHP 4.0

B.  PHP 4.1

C.  PHP 4.2

D.  PHP 4.3

View Answer  

Correct Answer :

PHP 4.3



Explanation :
No Explanation available for this question

Which one of the following is not a preg PHP function?

A.  preg_match

B.  preg_match_all

C.  preg_matchall

D.  preg_split

View Answer  

Correct Answer :

preg_matchall



Explanation :
No Explanation available for this question

Which one of the following preg PHP functions is used to take a string, and put it in an array?

A.  preg_destroy()

B.  preg_split()

C.  preg_unchain()

D.  preg_divide()

View Answer  

Correct Answer :

preg_split()



Explanation :
No Explanation available for this question