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