1. Please explain 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.

2. Tell me whether it is possible to share a single instance of a Memcache between multiple PHP projects?

Yes, it is possible to share a single instance of Memcache between multiple projects. Memcache is a memory store space, and you can run memcache on one or more servers. You can also configure your client to speak to a particular set of instances. So, you can run two different Memcache processes on the same host and yet they are completely independent. Unless, if you have partitioned your data, then it becomes necessary to know from which instance to get the data from or to put into.

3. Explain what does the unset() function means?

The unset() function is dedicated for variable management. It will make a variable undefined.

4. How to update Memcached when you make changes to PHP?

When PHP changes you can update Memcached by

• Clearing the Cache proactively: Clearing the cache when an insert or update is made
• Resetting the Cache: It is similar to the first method but rather than just deleting the keys and waiting for the next request for the data to refresh the cache, reset the values after the insert or update.

5. Do you know what does $GLOBALS means?

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

6. Explain me what is the goto statement useful for?

The goto statement can be placed to enable jumping inside the PHP program. The target is pointed by a label followed by a colon, and the instruction is specified as a goto statement followed by the desired target label.

7. Do you know what is the function mysql_pconnect() usefull for?

mysql_pconnect() ensure a persistent connection to the database, it means that the connection do not close when the the PHP script ends.

8. Explain me what is the meaning of a Persistent Cookie?

A persistent cookie is permanently stored in a cookie file on the browser's computer. By default, cookies are temporary and are erased if we close the browser.

9. Explain how can PHP and Javascript interact?

PHP and Javascript cannot directly interacts since PHP is a server side language and Javascript is a client side language. However we can exchange variables since PHP is able to generate Javascript code to be executed by the browser and it is possible to pass specific variables back to PHP via the URL.

10. Tell me how to find current date and time?

The date() function provides you with a means of retrieving the current date and time, applying the format integer parameters indicated in your script to the timestamp provided or the current local time if no timestamp is given. In simplified terms, passing a time parameter is optional - if you don't, the current timestamp will be used.

Download Interview PDF