Pregunta 1
Pregunta
PHP has long supported two regular expression implementations known as _______ and _______
i) Perl
ii) PEAR
iii) Pearl
iv) POSIX
Respuesta
-
a) i) and ii)
-
b) ii) and iv)
-
c) i) and iv)
-
d) ii) and iii)
Pregunta 2
Pregunta
Which one of the following regular expression matches any string containing zero or one p?
Pregunta 3
Pregunta
[:alpha:] can also be specified as..
Respuesta
-
a) [A-Za-z0-9].
-
b) [A-za-z].
-
c) [A-z].
-
d) [a-z].
Pregunta 4
Pregunta
How many functions does PHP offer for searching strings using POSIX style regular expression?
Pregunta 5
Pregunta
What will be the output of the following PHP code?
Pregunta 6
Pregunta
POSIX implementation was deprecated in which version of PHP?
Respuesta
-
a) PHP 4
-
b) PHP 5
-
c) PHP 5.2
-
d) PHP 5.3
Pregunta 7
Pregunta
POSIX stands for
Respuesta
-
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
Pregunta 8
Pregunta
What will be the output of the following PHP code?
Respuesta
-
a) this is some text that we might like to parse.
-
b) Array ( [0] => some text that [1] => we might like to parse. )
-
c) Array ( [0] => this is [1] => some text that [2] => we might like to parse. )
-
d) [0] => this is [1] => some text that [2] => we might like to parse.
Pregunta 9
Pregunta
Which of the following would be a potential match for the Perl-based regular expression /fo{2,4}/ ?
i) fol
ii) fool
iii) fooool
iv) fooooool
Respuesta
-
a) Only i)
-
b) ii) and iii)
-
c) i), iii) and iv)
-
d) i) and iv)
Pregunta 10
Pregunta
Which among the following is/are not a metacharacter?
i) \a
ii) \A
iii) \b
iv) \B
Respuesta
-
a) Only i)
-
b) i) and iii)
-
c) ii), iii) and iv)
-
d) ii) and iv)
Pregunta 11
Pregunta
How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions.
Pregunta 12
Pregunta
What will be the output of the following PHP code?
Respuesta
-
a) Array ( [0] => pasta [1] => steak [2] => fish [3] => potatoes )
-
b) Array ( [3] => potatoes )
-
c) Array ( [1] => steak )
-
d) Array ( [0] => potatoes )
Pregunta 13
Pregunta
Say we have two compare two strings which of the following function/functions can you use?
i) strcmp()
ii) strcasecmp()
iii) strspn()
iv) strcspn()
Respuesta
-
a) i) and ii)
-
b) iii) and iv)
-
c) None of the mentioned
-
d) All of the mentioned
Pregunta 14
Pregunta
Which one of the following functions will convert a string to all uppercase?
Respuesta
-
a) strtoupper()
-
b) uppercase()
-
c) str_uppercase()
-
d) struppercase()
Pregunta 15
Pregunta
What will be the output of the following PHP code?
Respuesta
-
a) O’Malley Wins The Heavyweight Championship!
-
b) O’malley Wins The Heavyweight Championship!
-
c) O’Malley wins the heavyweight championship!
-
d) o’malley wins the heavyweight championship!
Pregunta 16
Pregunta
What will be the output of the following PHP code?
Pregunta 17
Pregunta
Which one of the following functions can be used to concatenate array elements to form a single delimited string?
Respuesta
-
a) explode()
-
b) implode()
-
c) concat()
-
d) concatenate()
Pregunta 18
Pregunta
Which one of the following functions finds the last occurrence of a string, returning its numerical position?
Respuesta
-
a) strlastpos()
-
b) strpos()
-
c) strlast()
-
d) strrpos()
Pregunta 19
Pregunta
What will be the output of the following PHP code?
Respuesta
-
a) Contact the author of this article at nachiketh@ex@mple.com
-
b) Cont@ct the @uthor of this @rticle @t n@chiketh@ex@mple.com
-
c) Contact the author of this article at n@chiketh@ex@mple.com
-
d) Error
Pregunta 20
Pregunta
What will be the output of the following PHP code?
Respuesta
-
a) nachiketh@example.com
-
b) nachiketh
-
c) nachiketh@
-
d) example.com