PHP Operators and Expressions What will be the output of the following PHP code ?$color1 = "red";$color2 = "1";$color3 = "grey";echo "$color1" + "$color2" . "$color3"; grey 1grey 0 red1grey grey 1grey 0 red1grey ANSWER DOWNLOAD EXAMIANS APP
PHP Operators and Expressions What will be the output of the following PHP code ?$x = 5;$y = 10;function fun() {$GLOBALS['y'] = $GLOBALS['x'] + $GLOBALS['y'];}fun();echo $y; Error 15 5 10 Error 15 5 10 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; no output myObject::CONSTANT error test no output myObject::CONSTANT error test ANSWER DOWNLOAD EXAMIANS APP
PHP Operators and Expressions What will be the output of the following PHP code ?$cars = array("Volvo", "BMW", "Toyota");print $cars[2]; Toyota Volvo BMW Error Toyota Volvo BMW Error 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 testvalue test error, constant value cannot be changed testtest testvalue test error, constant value cannot be changed ANSWER DOWNLOAD EXAMIANS APP
PHP Operators and Expressions What will be the output of the following PHP code ?$i = 2;while (++$i) {while ($i --> 0)print $i;} 10 infinite loop 210 no output 10 infinite loop 210 no output ANSWER DOWNLOAD EXAMIANS APP