1. Tell us how is it possible to parse a configuration file?

The function parse_ini_file() enables us to load in the ini file specified in filename, and returns the settings in it in an associative array.

2. Tell us is it possible to submit a form with a dedicated button?

It is possible to use the document.form.submit() function to submit the form.
For example: <input type=button value=”SUBMIT” onClick=”document.form.submit()”>

3. Tell me what are the three classes of errors that can occur in PHP?

The three basic classes of errors are notices (non-critical), warnings (serious errors) and fatal errors (critical errors).

4. Explain me image work which library?

we will need to compile PHP with the GD library of image functions for this to work. GD and PHP may also require other libraries, depending on which image formats you want to work with.

5. Tell me the difference between the functions unlink and unset?

unlink() deletes the given file from the file system.
unset() makes a variable undefined.

6. Tell me is it possible to use COM component in PHP?

Yes, it's possible to integrate (Distributed) Component Object Model components ((D)COM) in PHP scripts which is provided as a framework.

7. Tell me what are the two main string operators?

The first is the concatenation operator (‘.'), which returns the concatenation of its right and left arguments. The second is (‘.='), which appends the argument on the right to the argument on the left.

8. Tell us what are the differences between Get and post methods?

There are some defference between GET and POST method
1. GET Method have some limit like only 2Kb data able to send for request
But in POST method unlimited data can we send
2. when we use GET method requested data show in url but
Not in POST method so POST method is good for send sensetive request

9. How to pass the variable through the navigation between the pages?

It is possible to pass the variables between the PHP pages using sessions, cookies or hidden form fields.

10. What is mysql_error()?

The mysql_error() message will tell us what was wrong with our query, similar to the message we would receive at the MySQL console.

11. Do you know what type of inheritance that PHP supports?

In PHP an extended class is always dependent on a single base class,that is, multiple inheritance is not supported. Classes are extended using the keyword 'extends'.

12. Tell us what does the scope of variables means?

The scope of a variable is the context within which it is defined. For the most part all PHP variables only have a single scope. This single scope spans included and required files as well.

13. Please explain what is the difference between the functions strstr() and stristr()?

The string function strstr(string allString, string occ) returns part of allString from the first occurrence of occ to the end of allString. This function is case-sensitive. stristr() is identical to strstr() except that it is case insensitive.

14. Tell me how many ways we can pass the variable through the navigation between the pages?

Register the variable into the session
Pass the variable as a cookie
Pass the variable as part of the URL

15. Tell me the predefined classes in PHP?

☛ Directory
☛ stdClass
☛ __PHP_Incomplete_Class
☛ exception
☛ php_user_filter

16. Tell me how can we register the variables into a session?

<?php
session_register($ur_session_var);
?>

17. What does PEAR stands for?

PEAR means “PHP Extension and Application Repository”. it extends PHP and provides a higher level of programming for web developers.

18. Tell me what is the functionality of the function strstr and stristr?

strstr() returns part of a given string from the first occurrence of a given substring to the end of the string.
For example:strstr("user@example.com","@") will return "@example.com".
stristr() is idential to strstr() except that it is case insensitive.

19. How to execute a PHP script from the command line?

Just use the PHP command line interface (CLI) and specify the file name of the script to be executed as follows:

php script.php

20. Tell me what does $GLOBALS means?

$GLOBALS is associative array including references to all variables which are currently defined in the global scope of the script.

21. Tell us is it possible to extend the execution time of a php script?

The use of the set_time_limit(int seconds) enables us to extend the execution time of a php script. The default limit is 30 seconds.

22. Tell me what are the differences between require and include?

Both include and require used to include a file but when included file not found
Include send Warning where as Require send Fatal Error

23. Tell me what Is a Session?

A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests. Sessions are commonly used to store temporary data to allow multiple PHP pages to offer a complete functional transaction for the same visitor.

24. Tell us how can we change the maximum size of the files to be uploaded?

We can change the maximum size of files to be uploaded by changing upload_max_filesize in php.ini.

25. Tell me what's the special meaning of __sleep and __wakeup?

__sleep returns the array of all the variables than need to be saved, while __wakeup retrieves them.

26. Tell us how can we get the error when there is a problem to upload a file?

$_FILES[‘userfile'][‘error'] contains the error code associated with the uploaded file.

27. Do you know what does $_ENV means?

$_ENV is an associative array of variables sent to the current PHP script via the environment method.

29. What is the main difference between PHP 4 and PHP 5?

PHP 5 presents many additional OOP (Object Oriented Programming) features.

31. How to pass a variable by value in PHP?

Just like in C++, put an ampersand in front of it, like $a = &$b;

32. Please explain what is the difference between PHP and JavaScript?

javascript is a client side scripting language, so javascript can make popups and other things happens on someone's PC. While PHP is server side scripting language so it does every stuff with the server.

33. Tell us how can we find the number of rows in a result set using PHP?

☛ $result = mysql_query($sql, $db_link);
☛ $num_rows = mysql_num_rows($result);
☛ echo "$num_rows rows found";

34. Explain what is the difference between ereg_replace() and eregi_replace()?

The function eregi_replace() is identical to the function ereg_replace() except that it ignores case distinction when matching alphabetic characters.

35. Explain what is the difference between Exception::getMessage and Exception::getLine?

Exception::getMessage lets us getting the Exception message and Exception::getLine lets us getting the line in which the exception occurred.