Frage 1
Frage
PHP has long supported two regular expression implementations known as _______ and _______
i) Perl
ii) PEAR
iii) Pearl
iv) POSIX
Antworten
-
a) i) and ii)
-
b) ii) and iv)
-
c) i) and iv)
-
d) ii) and iii)
Frage 2
Frage
Which one of the following regular expression matches any string containing zero or one p?
Frage 3
Frage
[:alpha:] can also be specified as..
Antworten
-
a) [A-Za-z0-9].
-
b) [A-za-z].
-
c) [A-z].
-
d) [a-z].
Frage 4
Frage
How many functions does PHP offer for searching strings using POSIX style regular expression?
Frage 5
Frage
What will be the output of the following PHP code?
Frage 6
Frage
POSIX implementation was deprecated in which version of PHP?
Antworten
-
a) PHP 4
-
b) PHP 5
-
c) PHP 5.2
-
d) PHP 5.3
Frage 7
Antworten
-
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
Frage 8
Frage
What will be the output of the following PHP code?
Antworten
-
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.
Frage 9
Frage
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
Antworten
-
a) Only i)
-
b) ii) and iii)
-
c) i), iii) and iv)
-
d) i) and iv)
Frage 10
Frage
Which among the following is/are not a metacharacter?
i) \a
ii) \A
iii) \b
iv) \B
Antworten
-
a) Only i)
-
b) i) and iii)
-
c) ii), iii) and iv)
-
d) ii) and iv)
Frage 11
Frage
How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions.
Frage 12
Frage
What will be the output of the following PHP code?
Antworten
-
a) Array ( [0] => pasta [1] => steak [2] => fish [3] => potatoes )
-
b) Array ( [3] => potatoes )
-
c) Array ( [1] => steak )
-
d) Array ( [0] => potatoes )
Frage 13
Frage
Say we have two compare two strings which of the following function/functions can you use?
i) strcmp()
ii) strcasecmp()
iii) strspn()
iv) strcspn()
Antworten
-
a) i) and ii)
-
b) iii) and iv)
-
c) None of the mentioned
-
d) All of the mentioned
Frage 14
Frage
Which one of the following functions will convert a string to all uppercase?
Antworten
-
a) strtoupper()
-
b) uppercase()
-
c) str_uppercase()
-
d) struppercase()
Frage 15
Frage
What will be the output of the following PHP code?
Antworten
-
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!
Frage 16
Frage
What will be the output of the following PHP code?
Frage 17
Frage
Which one of the following functions can be used to concatenate array elements to form a single delimited string?
Antworten
-
a) explode()
-
b) implode()
-
c) concat()
-
d) concatenate()
Frage 18
Frage
Which one of the following functions finds the last occurrence of a string, returning its numerical position?
Antworten
-
a) strlastpos()
-
b) strpos()
-
c) strlast()
-
d) strrpos()
Frage 19
Frage
What will be the output of the following PHP code?
Antworten
-
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
Frage 20
Frage
What will be the output of the following PHP code?
Antworten
-
a) nachiketh@example.com
-
b) nachiketh
-
c) nachiketh@
-
d) example.com