Question:What is object cloning?
To remedy the problems with copying, PHP offers an explicit means for cloning an object is known as object cloning.
Question:What is object cloning?
To remedy the problems with copying, PHP offers an explicit means for cloning an object is known as object cloning.
Question:
What type of inheritance that PHP supports?
PHP generally supports single type of inheritance.Allthough All inheritance are supported but multiple not supported and replace by inheritance used in PHP5.
Question:Are Parent constructors called implicitly inside a class constructor?
No, a parent constructor have to be called explicitly as follows: parent::constructor($value)
Question:What does $_SERVER means?
$_SERVER is an array including information created by the web server such as paths, headers, and script locations.
Question:Define exceptions?
When a specified error (exceptional) condition occurs in the script is called an exception.
There are Four important keywords of exceptions:
Try
Catch
Throw
Finaly
Question:What are default session time and path?
- Default session time in PHP is 1440 seconds or 24 minutes. - Default session save path id temporary folder /tmp
Question:How many ways you can write into a file?
We can write into a file using the following mode:
r+,
W,
w+,
A,
a+,
X,
x+
Question:
What is the functionality of the function strstr and stristr?
strstr: It returns the remainder of a string beginning with the first occurrence of a predefined string.
stristr: same as strstr except the search of for the pattern is case insensitive.
Question:
What is the difference between ereg_replace() and eregi_replace()?
ereg_replace(): it is used to find and replace a pattern with a replacement string.
eregi_replace(): same as ereg_replace() except the search of for the pattern is case insensitive.
Question:What are the different functions in sorting an array?Discuss them?
sort(): sort array in ascending order.
rsort():sort array in descending order.
asort() : Sort array in ascending order with key/value.
arsort(): reverse of assort.
ksort(): sorts an array by its keys.
krsort():reverse of ksort