• HOME
  • QUIZ
  • CONTACT US
EXAMIANS
  • COMPUTER
  • CURRENT AFFAIRS
  • ENGINEERING
    • Chemical Engineering
    • Civil Engineering
    • Computer Engineering
    • Electrical Engineering
    • Mechanical Engineering
  • ENGLISH GRAMMAR
  • GK
  • GUJARATI MCQ

PHP REGULAR EXPRESSIONS QUIZ

Which of the following would be a potential match for the Perl-based regular expression /fo{2,4}/ ?<br/>1. fol<br/>2. fool<br/>3. fooool<br/>4. fooooool

TRUE ANSWER : ?
YOUR ANSWER : ?

Which one of the following functions will convert a string to all uppercase?

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>$url = "contact@examians.com";<br/>echo ltrim(strstr($url, "@"),"@");

TRUE ANSWER : ?
YOUR ANSWER : ?

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

TRUE ANSWER : ?
YOUR ANSWER : ?

Which one of the following functions finds the last occurrence of a string, returning its numerical position?

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output if we replace the line $num = preg_grep(“/[0-5]/”, $number); with $num = preg_grep(“/[0-5]/”, $number, PREG_GREP_INVERT);?

TRUE ANSWER : ?
YOUR ANSWER : ?

PHP has long supported two regular expression implementations known as _______ and _______.<br/>1. Perl<br/>2. PEAR<br/>3. Pearl<br/>4. POSIX

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>echo str_pad("Salad", 5)." is good.";

TRUE ANSWER : ?
YOUR ANSWER : ?

Which among the following is/are not a metacharacter?<br/>1. /a<br/>2. /A<br/>3. /b<br/>4. /B

TRUE ANSWER : ?
YOUR ANSWER : ?

What will be the output of the following PHP code?<br/>$str = "Hello! My name is Cameron Fox. Coffee?";<br/>$find = array('/is/','/coffee/');<br/>$replace = array('/was/','/tea/');<br/>echo preg_replace ($find, $replace, $str);

TRUE ANSWER : ?
YOUR ANSWER : ?
MORE MCQ

QUIZ STATS

  • 0
  • 0

DOWNLOAD APP

  • APPLE
    from app store
  • ANDROID
    from play store

SEARCH

LOGIN HERE


  • GOOGLE

FIND US

  • 1.70K
    FOLLOW US
  • EXAMIANSSTUDY FOR YOUR DREAMS.
  • SUPPORT :SUPPORT EMAIL ACCOUNT : examians@yahoo.com

OTHER WEBSITES

  • GUJARATI MCQ
  • ACCOUNTIANS

QUICK LINKS

  • HOME
  • QUIZ
  • PRIVACY POLICY
  • DISCLAIMER
  • TERMS & CONDITIONS
  • CONTACT US
↑