Debug School

rakesh kumar
rakesh kumar

Posted on

Php Programing Solution

1.solution
Image description
2.because print statement does not take multiple argument.
Image description
3.echo statement does not return any value. It will generate an error if you try to display its return value
Image description
4.print returns a value, which is always 1.
Image description
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
Enter fullscreen mode Exit fullscreen mode

8.

Local variable declared inside the function is: 45 
?>  

Enter fullscreen mode Exit fullscreen mode

9.

Web development language: PHP
Notice: Undefined variable: lang in D:\xampp\htdocs\program\p3.php on line 28

Enter fullscreen mode Exit fullscreen mode

10.

Variable inside the function: Sanaya Sharma
Variable outside the function: Sanaya Sharma
Enter fullscreen mode Exit fullscreen mode

11.

Notice: Undefined variable: name in D:\xampp\htdocs\program\p3.php on line 6
Variable inside the function:
Enter fullscreen mode Exit fullscreen mode

12.

Sum of global variables is: 18

Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

14.

Static: 4
Non-static: 7
Static: 5
Non-static: 7

Enter fullscreen mode Exit fullscreen mode

15.

Image description

16.
Image description

17.
18.
19.
20.
21.

Top comments (0)