How to get path of php.ini with a PHP script?
We use phpinfo(); to get path of php.ini with a PHP
What do you understand about PHP accelerator ?
Basically PHP accelerator is used to boost up the performance of PHP programing language.We use PHP accelerator to reduce the server load and also use to enhance the performance of PHP code near about 2-10 times.In one word we can say that PHP accelertator is code optimization technique. Reply
What is the difference b/w unlink and unset ?
The basic difference b/w unlink and unset is that, We use unlink function for file system handling.It will simply delete the file.Where unset is used to destroy the variable.Reply
Which pre-defined classes in php ?
Pre-defined classes that are in PHP are given below:
Standard Defined Classes
The class from which dir() is instantiated.
Predefined classes as of PHP
Write some array sort functions available in php ?
I have given you eleven functions that are available in PHP for sorting an array:
What is the DDL,DCL and DML?
DDL stands for Data Definition Language,DCL stands for Data Control Language and DML stands for Data Manipulation Language.
We use DDL to Create,Alter or Drop the Data objects.
We use DCL to do control over on Database transaction.In Oracle Grant and Revoke to control the transaction.
We use DML to manipulate(Insert,Update,Delete) with the existing data in the database objects. Reply
What is Filter?How we use them?
In PHP, We use Filters to validate and filter data coming from insecure sources,like : user entered data.The main issue of introducing is that to make data filtering easier and quicker.
Some filter function are given below:
1.filter_has_var � Checks if variable of specified type exists
2.filter_id � Returns the filter ID belonging to a named filter
3.filter_input_array � Gets external variables and optionally filters them
4.filter_input � Gets a specific external variable by name and optionally filters it
5.filter_list � Returns a list of all supported filters
6.filter_var_array � Gets multiple variables and optionally filters them
7.filter_var � Filters a variable with a specified filter
What do you understand about Exception Handling in PHP?
In PHP 5 we introduce a Exception handle to handle run time exception.It is used to change the normal flow of the code execution if a specified error condition occurs.
An exception can be thrown, and caught("catched") within PHP. Write code in try block,Each try must have at least one catch block. Multiple catch blocks can be used to catch different classes of exceptions.
I have shown some error handler methods given below:
1.Basic use of Exceptions
2.Creating a custom exception handler
4.Re-throwing an exception
5.Setting a top level exception handler
How we Sessions in PHP?
We use session variable to store information or change setting about client session.A session variable is assign to the each client.
Session has a particular working cycle like that 1.It create a unique id for each client
2.Store session variable according to client uniquw id.
3.Unique id stored in cookie. Reply
What operation we can perform with Cookie?Explain it?
We can create the cookie,retrieve heir value and destroy them.
1.Creating a cookie: Using setcookie() function we can create a cookie.
setcookie("client", "Abhi", time()+3600);
2.Retrieve cookie value: Using $_COOKIE we can retrieve the cookie value.
// Print a cookie value
// Using them we show the all cookie values
3.Destroy the cookie: Keep one thing in mind when you destroying cookie that its expiry date should has been gone.
// set the expiration date to one hour ago
setcookie("client", "", time()-3600);