1.solution
2.because print statement does not take multiple argument.
3.echo statement does not return any value. It will generate an error if you try to display its return value
4.print returns a value, which is always 1.
5.Hello world using echo
Hello world using ECHO
Hello world using EcHo
6.
Notice: Undefined variable: ColoR in D:\xampp\htdocs\program\p2.php on line 8
My car is
My dog is black
Notice: Undefined variable: COLOR in D:\xampp\htdocs\program\p2.php on line 10
My Phone is
7.
Parse error: syntax error, unexpected '4' (T_LNUMBER), expecting variable (T_VARIABLE)
or '$' in C:\wamp\www\variableinvalid.php on line 2
8.
Local variable declared inside the function is: 45
?>
9.
Web development language: PHP
Notice: Undefined variable: lang in D:\xampp\htdocs\program\p3.php on line 28
10.
Variable inside the function: Sanaya Sharma
Variable outside the function: Sanaya Sharma
11.
Notice: Undefined variable: name in D:\xampp\htdocs\program\p3.php on line 6
Variable inside the function:
12.
Sum of global variables is: 18
13.
If two variables, local and global, have the same name, then the local variable has higher priority than the global variable inside the function.
Value of x: 7
14.
Static: 4
Non-static: 7
Static: 5
Non-static: 7
15.
17.
18.
19.
20.
21.
Top comments (0)