• 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 Operators and Expressions

PHP Operators and Expressions
What will be the output of the following PHP code ?
$color = "red";
echo "$color";
echo "$COLOR";
echo "$Color";

red
redredred
redred
Error

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
$x = 4;
$y = 3;
function fun($x = 3, $y = 4) {
$z = $x+$y/$y+$x;
echo "$z";
}
echo $x;
echo $y;
echo $z;
fun($x, $y);

43
349
943
439

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
$var1 = 3;
print $var = ++$var;

3
1
0
2

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
class Constants{
define('MIN_VALUE', '0.0');
define('MAX_VALUE', '1.0');
public static function getMinValue() {
return self::MIN_VALUE;
}
public static function getMaxValue() {
return self::MAX_VALUE;
}
}
echo Constants::getMinValue();
echo Constants::getMaxValue();

No output
ERROR
01
0.01.0

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
In order to find if a variable holds an actual number or a string containing characters that can be translated into a number you can use:

is_number()
is_numeric()
is_num()
if_numeric

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
The result of below two statements will be:Round(2.5)Round(-2.5)

2.5, -2
3.5, -3.5
2, -2
3, -3

ANSWER DOWNLOAD EXAMIANS APP
MORE MCQ ON PHP Operators and Expressions

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
↑