Tag Archives: php interview questions for experience
121. What is the functionality of the functions STRSTR() and STRISTR()? string strstr ( string haystack, string needle ) returns part of haystack string from the first occurrence of needle to the end of haystack. This function is case-sensitive. stristr() is idential to strstr() except that it is case insensitive. 122. When are you supposed
more..
111. What is meant by urlencode and urldecode? urlencode() returns the URL encoded version of the given string. URL coding converts special characters into % signs followed by two hex digits. For example: urlencode(“10.00%”) will return “10%2E00%25″. URL encoded strings are safe to be used as part of URLs. urldecode() returns the URL decoded version
more..
101. What’s PHP ? The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications. 102. What Is a Session? A session is a logical object created by the PHP engine to allow you to preserve
more..
81 How we load all classes that placed in different directory in one PHP File , means how to do auto load classes by using spl_autoload_register(‘autoloader::funtion’); Like below class autoloader { public static function moduleautoloader($class) { $path = $_SERVER[‘DOCUMENT_ROOT’] . “/modules/{$class}.php”; if (is_readable($path)) require $path; } public static function daoautoloader($class) { $path = $_SERVER[‘DOCUMENT_ROOT’] .
more..
61 What are the other commands to know the structure of table using MySQL commands except explain command? describe Table-Name; 62 How many tables will create when we create table, what are they? The ‘.frm’ file stores the table definition. The data file has a ‘.MYD’ (MYData) extension. The index file has a ‘.MYI’ (MYIndex)
more..
41 How can we optimize or increase the speed of a MySQL select query? • first of all instead of using select * from table1, use select column1, column2, column3.. from table1 • Look for the opportunity to introduce index in the table you are querying. • use limit keyword if you are looking for
more..
21. How can we encrypt the username and password using PHP? The functions in this section perform encryption and decryption, and compression and uncompression: encryption decryption AES_ENCRYT() AES_DECRYPT() ENCODE() DECODE() DES_ENCRYPT() DES_DECRYPT() ENCRYPT() Not available MD5() Not available OLD_PASSWORD() Not available PASSWORD() Not available SHA() or SHA1() Not available Not available UNCOMPRESSED_LENGTH() 22 What are
more..