adplus-dvertising
frame-decoration

Question

What will be the output of the following php code?
 <?php
    $num  = "1";
    $num1 = "2";
    print $num+$num1;
    ?>

a.

3

b.

1+2

c.

Error

d.

12

Posted under PHP

Answer: (a).3

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following php code?

Similar Questions

Discover Related MCQs

Q. Which of the following php statement/statements will store 111 in variable num?

i) int $num = 111;
ii) int mum = 111;
iii) $num = 111;
iv) 111 = $num;

Q. We can use ___ to comment a single line?
i) /?
ii) //
iii) #
iv) /* */

Q. Which version of PHP introduced Try/catch Exception?

Q. Which of the following must be installed on your computer so as to run PHP script?

i) Adobe Dreamweaver
ii) PHP
iii) Apache
iv) IIS

Q. Which of the following is/are a PHP code editor?

i) Notepad
ii) Notepad++
iii) Adobe Dreamweaver
iv) PDT

Q. A PHP script should start with ___ and end with ___

Q. PHP files have a default file extension of_______

Q. What does PHP stand for?
i) Personal Home Page
ii) Hypertext Preprocessor
iii) Pretext Hypertext Processor
iv) Preprocessor Home Page

Q. In compile time installation PHP offers some

Q. Which is most important thing in configuration of PHP?

Q. To define a function with default arguments, simply you need to turn formal parameter names into

Q. Which one from followings is used for configuring PHP?

Q. In PHP default behavior for user defined functions is

Q. If we want to use XML functions we must set off

Q. What is included in phpinfo ( ) function with release of PHP5.2.1 version?

Q. How many ways that PHP offers to modify arguments of a function?

Q. There are how many ways to configure PHP

Q. PHP function arguments are modified in function definition and

Q. All these func_num_args ( ), func_get_arg ( ), func_get_args ( ), functions are introduced in

Q. An error reporting function, E_ALL &~E_NOTICE stands for