• 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 ?
define("__LINE__", "PHP is a scripting language");
echo __LINE__;

__LINE__
PHP is a scripting language
2
ERROR

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
define('IF', 42);
echo "IF: ", IF;

IF:42
IF:
ERROR
No output

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
define("NEW_GOOD_NAME_CONSTANT", "I have a value");
define("OLD_BAD_NAME_CONSTANT", NEW_GOOD_NAME_CONSTANT);
echo NEW_GOOD_NAME_CONSTANT;
echo OLD_BAD_NAME_CONSTANT;

I have a value
ERROR
I have a valueNEW_GOO_NAME_CONSTANTS
I have a valueI have a value

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
define("VAR_NAME","test");
${VAR_NAME} = "value";
echo VAR_NAME;
echo ${VAR_NAME};

testtest
test
error, constant value cannot be changed
testvalue

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
class myObject { }
define('myObject::CONSTANT', 'test');
echo myObject::CONSTANT;

test
no output
error
myObject::CONSTANT

ANSWER DOWNLOAD EXAMIANS APP
  • «
  • 1
  • ...
  • 5
  • 6
  • 7
  • 8
  • 9
  • ...
  • 25
  • »

GO TO PAGE

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
↑