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

Basic PHP

Basic PHP
What will be the output of the following PHP code?
$color = "maroon";
$var = $color[2];
echo "$var";

r
$var
Error
a

ANSWER DOWNLOAD EXAMIANS APP

Basic PHP
We can use _________ to comment a single line?
1. /?
2. //
3. #
4. /* */

Both 2 and 4
1, 3 and 4
2, 3 and 4
Only 2

ANSWER DOWNLOAD EXAMIANS APP

Basic PHP
Which of the following is not valid PHP code?

$10_somethings
${“MyVar”}
&$something
$_10
$aVaR

ANSWER DOWNLOAD EXAMIANS APP

Basic PHP
What is the value of $a and $b after the function call?
function doSomething( &$arg ) {
$return = $arg;
$arg += 1;
return $return;
}
$a = 3;
$b = doSomething( $a );

a is 4 and b is 3
Both are 3
Both are 4
a is 3 and b is 4

ANSWER DOWNLOAD EXAMIANS APP

Basic PHP
PHP is an open source software.

False
True

ANSWER DOWNLOAD EXAMIANS APP

Basic PHP
What will be the output of the following PHP code?
$team = "arsenal";
switch ($team) {
case "manu":
echo "I love man u";
case "arsenal":
echo "I love arsenal";
case "manc":
echo "I love manc";
}

Error
I love arsenal
I love arsenalI love manc
I love arsenalI love mancI love manu

ANSWER DOWNLOAD EXAMIANS APP
MORE MCQ ON Basic PHP

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
↑