Que.1 What is PHP?
Ans.1 PHP stands for PHP: Hypertext Preprocessor.
PHP is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.


Que.2 require_once(), require(), include(),include_once().What is difference between them?
require()

Ans.2 when the file is required by your application, e.g. an important message template or a file containing configuration variables without which the app would break.

require_once()

when the file contains content that would produce an error on subsequent inclusion, e.g. function important() { /* important code */} is definitely needed in your application but since functions cannot be redeclared should not be included again.

include

when the file is not required and application flow should continue when not found, e.g.
great for templates referencing variables from the current scope or something

include_once()

optional dependencies that would produce errors on subsequent loading or maybe remote file inclusion that you do not want to happen twice due to the HTTP overhead


Que.3 Differences between GET and POST methods ?

Ans.3 GET requests a representation of the specified resource. We can send 1024 bytes using GET method
POST submits data to be processed HTML form to the identified resource POST method can transfer large amount of data
POST is the secure method than GET method .


Que.4 Difference between session and cookies?

Ans.4 Cookies are stored in browser as a text file format. It is stored limit amount of data.It is only allowing 4kb[4096bytes]. It is not holding the multiple variable in cookies.
Sessions
are stored in server side. It is stored unlimited amount of data.It is holding the multiple variable in sessions. we cannot accessing the cookies values in easily.So it is more secure


Que.5 What are the different types of errors in PHP ?

Ans.5 Basically there are four types of errors in PHP, which are as follows:

1. Parse Error 
2. Fatal Error
3. Warning Error
4. Notice Error

1. Parse Error  : The parse error occurs if there is a syntax mistake in the script parse error stops the execution of the script
Example:

echo "Adda"
?>

2. Fatal Error : 

Fatal errors are caused when PHP understands what you've written, however what you're asking it to do can't be done. Fatal errors stop the execution of the script. If you are trying to access the undefined functions, then the output is a fatal error.
Example:

function func1()
{
echo "Jawabadda.com";
}
func2();//calling wrong function

?>

3. Warning Error : Warning errors will not stop execution of the script. The main reason for warning errors are to include a missing file or using the incorrect number of parameters in a function.

include ("Welcome.php");//this file not exist
?>

4. Notice Error : Notice that an error is the same as a warning error i.e. in the notice error execution of the script does not stop. Notice that the error occurs when you try to access the undefined variable, then produce a notice error.

$a="jawabadda.com";
echo "Notice Error !!";
echo $b;
?>  


Que.6 What are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row(),mysql_fetch_array(),mysql_fetch_assoc()?

Ans.6 Use of 

mysql_fetch_array() Fetch a result row as an associative array, a numeric array, or both.
mysql_fetch_object () Returns an object with properties that correspond to the fetched row and moves the internal data pointer ahead. Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows
mysql_fetch_row() fetches one row of data from the result associated with the specified result identifier. The row is returned as an array. Each result column is stored in an array offset, starting at offset 0.
mysql_fetch_assoc() Fetch a result row as an associative array.This function will return a row as an associative array where the column names will be the keys storing corresponding value.


Que.7 What’s the difference between unset() and unlink().

Ans.6 unlink() is a function for file system handling, unlink() is used to delete files. Suppose you have uploaded a file and wants to delete this file through the coding then unlink() function is used to delete the file.

unset() is a function for variable management. Unset is used to delete(destroy) a variable in PHP. It will make a variable undefined. In can be used to remove a single variable, multiple variables, or an element from an array.

Quick ask your Question