Question and Answer

Q: What is PHP?
A: PHP is a server-side scripting language, designed for web development to produce dynamic web pages.

Q: who developed php ? OR who is the father of PHP?
A: Rasmus Lerdorf is father of PHP.

Q: What is full form of php OR What does PHP stand for ?
A: PHP stands for "Hypertext Preprocessor".

Q: what is the use of ucfirst() function in PHP?
A:  ucfirst() makes first letter (character) of a given string capital.
 e.g
 <?PHP
 $str = "qaphp is a good site.";
 echo ucfirst($str);  // output is Qaphp is a good site.
 ?>
Q: what is the use of ucword() function in PHP?
A:  ucword() makes first letter (character) capital  of every word in a  given string.
 e.g
<?PHP
 $str = " qaphp is a good site for php.";
 echo ucword ($str);  // output is Scriptvenue Is A Good Site For Php.
 ?>

Q: How to handle with quotes(‘) in php?
A: To handle quotes in php we use addslashes() and addcslashes() function. addslashes()automatically append slash before scape    character but in addcslashes() we have to specify  escape character, we need to append slash.

Q: How many type of sorting in php Array?
A: 13 type of sorting are there in php. Viz, asort(),arsort(),krsort(),ksort(),rsort(),uasort(), uksort(),usort() etc. are some of them.


Q: What’s the difference between htmlentities() and htmlspecialchars()?
A:  htmlspecialchars only takes care of <, >, single quote ‘, double quote " and ampersand. htmlentities translates all occurrences of character sequences that have different meaning in HTML.


Q: What are the differences between GET and POST methods.
A: These are some difference between GET and POST method. 

1. GET Method have limit only 2Kb data able to send for request but in POST method upto 2MB data can we send.
2. when we use GET method requested data show in url but, not in POST method so POST method is secure then GET Method.


Q: What is the difference between the functions unlink and unset?
A: unlink() is used to delete a file, but unset() is used to delete a variable.