Q1.Can we write windows like applications in PHP.
Ans : Yes using PHP-GTK on linux and WinBinder on windows.

Q2.What difference does it make when I declare variables with $ and $ in prefix.
Ans: $x = "Lion";
$$x = "Zebra";
echo $Lion;
would display "Zebra"
Use : creating runtime variables

Q3.What is the difference between strpos and stripos function
Ans: strpos is case sensitive search, and stripos is case insensitive search

Q4.What are the ways by which we can find out if a variable has been declared?
Ans: isset or empty language constructs

Q5.What is "global" and how to use it?
Ans: variables declared outside the functions can be used inside the function using global keyword

Q6.What is the difference between echo and print
Ans: echo can take more than one parameter for displaying.
print cannot take more than one
echo 'This', 'That' //is valid
print 'This', 'That' //is invalid
print returns 1 always.
echo cannot be used to return anything
$ret = print "Abcd" //valid
$ret = echo "Abcd" //invalid


Post a Comment

Please put your comments here. your questions, your suggestions, also what went wrong with me.