100 Top PHP Interview Questions and Answers

100 Top PHP Interview Questions and Answers
Page Visited: 782
0 0
Read Time:24 Minute, 51 Second

PHP Interview Questions and Answers

Question 1. What’s Php?

Answer :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.

Question 2. What Is A Session?

Answer :A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests. There is only one session object available to your PHP scripts at any time. Data saved to the session by a script can be retrieved by the same script or another script when requested from the same visitor. Sessions are commonly used to store temporary data to allow multiple PHP pages to offer a complete functional transaction for the same visitor.

Question3: Which programming language does PHP resemble?

Answer :PHP syntax resembles Perl and C

Question4: What does PEAR stand for?

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

Question5: What is the actually used PHP version?

Answer :Version 7.1 or 7.2 is the recommended version of PHP.

Question 6. What Is The Difference Between $message And $$message?

Answer :$message is a simple variable whereas $$message is a variable’s variable,which means
value of the variable. Example:
$user = ‘bob’is equivalent to$message = ‘user’;
$$message = ‘bob’;

Question 7. What Is A Persistent Cookie?

Answer :A persistent cookie is a cookie which is stored in a cookie file permanently on the browser’s computer. By default, cookies are created as temporary cookies which stored only in the browser’s memory. When the browser is closed, temporary cookies will be erased. You should decide when to use temporary cookies and when to use persistent cookies based on their differences:· Temporary cookies can not be used for tracking long-term information.
· Persistent cookies can be used for tracking long-term information.
· Temporary cookies are safer because no programs other than the browser can access them.
· Persistent cookies are less secure because users can open cookie files see the cookie values.

Question 8.How to run the interactive PHP shell from the command line interface?

Answer : Just use the PHP CLI program with the option -a as follows:

php -a

Question9. What is the correct and the most two common way to start and finish a PHP block of code?

Answer : The two most common ways to start and finish a PHP script are:

 <?php [   ---  PHP code---- ] ?> and <? [---  PHP code  ---] ?>

Question 10. How can we display the output directly to the browser?

Answer : To be able to display the output directly to the browser, we have to use the special tags <?= and ?>.

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

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

Question 12. What Is The Difference Between Mysql_fetch_object And Mysql_fetch_array?

Answer :MySQL fetch object will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array.

Question 13. How Can I Execute A Php Script Using Command Line?

Answer :Just run the PHP CLI (Command Line Interface) program and provide the PHP script file name as the command line argument. For example, “php myScript.php”, assuming “php” is the command to invoke the CLI program.
Be aware that if your PHP script was written for the Web CGI interface, it may not execute properly in command line environment.

Question 14. I Am Trying To Assign A Variable The Value Of 0123, But It Keeps Coming Up With A Different Number, What’s The Problem?

Answer :PHP Interpreter treats numbers beginning with 0 as octal. Look at the similar PHP interview questions for more numeric problems.

Question 15. What type of operation is needed when passing values through a form or an URL?

Answer : If we would like to pass values through a form or an URL, then we need to encode and to decode them using htmlspecialchars() and urlencode().

Question 16. What Are The Different Tables Present In Mysql? Which Type Of Table Is Generated When We Are Creating A Table In The Following Syntax: Create Table Employee(eno Int(2),ename Varchar(10))?

Answer :Total 5 types of tables we can create
1. MyISAM
2. Heap
3. Merge
4. INNO DB
5. ISAM
MyISAM is the default storage engine as of MySQL 3.23. When you fire the above
create query MySQL will create a MyISAM table.

Question 17. How To Create A Table?

Answer :If you want to create a table, you can run the CREATE TABLE statement as shown in the following sample script:

<?php
include "mysql_connection.php";
$sql = "CREATE TABLE fyi_links ("
. " id INTEGER NOT NULL"
. ", url VARCHAR(80) NOT NULL"
. ", notes VARCHAR(1024)"
. ", counts INTEGER"
. ", time TIMESTAMP DEFAULT sysdate()"
. ")";
if (mysql_query($sql, $con)) {
print("Table fyi_links created.n");
} else {
print("Table creation failed.n");
}
mysql_close($con);
?>

Remember that mysql_query() returns TRUE/FALSE on CREATE statements. If you run this script, you will get something like this:
Table fyi_links created.

Question 18. How Can We Encrypt The Username And Password Using Php?

Answer :You can encrypt a password with the following Mysql>SET
PASSWORD=PASSWORD(“Password”);

Question19. What are the functions to be used to get the image’s properties (size, width, and height)?

Answer :The functions are getimagesize() for size, imagesx() for width and imagesy() for height.

Question20. How failures in execution are handled with include() and require() functions?

Answer :If the function require() cannot access the file then it ends with a fatal error. However, the include() function gives a warning, and the PHP script continues to execute.

Question21. What is the main difference between require() and require_once()?

Answer :require(), and require_once() perform the same task except that the second function checks if the PHP script is already included or not before executing it.

(same for include_once() and include())

Question22.How can I display text with a PHP script?

Answer :Two methods are possible:

<!--?php echo "Method 1"; print "Method 2"; ?-->

Question23. How can we display information of a variable and readable by a human with PHP?

Answer :To be able to display a human-readable result we use print_r().

Question24. How is it possible to set an infinite execution time for PHP script?

Answer :The set_time_limit(0) added at the beginning of a script sets to infinite the time of execution to not have the PHP error ‘maximum execution time exceeded.’ It is also possible to specify this in the php.ini file.

Question 25. How Do I Find Out The Number Of Parameters Passed Into Function9?

Answer :func_num_args() function returns the number of parameters passed in.

Top 35 Amazon Interview Questions

Question 26. What Is The Purpose Of The Following Files Having Extensions: Frm, Myd, And Myi? What These Files Contain?

Answer :In MySQL, the default table type is MyISAM.
Each MyISAM table is stored on disk in three files. The files have names that begin with
the table name and have an extension to indicate the file type.

The ‘.frm’ file stores the table definition.
The data file has a ‘.MYD’ (MYData) extension.
The index file has a ‘.MYI’ (MYIndex) extension.

Question 27. If The Variable $a Is Equal To 5 And Variable $b Is Equal To Character A, What’s The Value Of $$b?

Answer :5, it’s a reference to existing variable.

Question 28. How To Protect Special Characters In Query String?

Answer :If you want to include special characters like spaces in the query string, you need to protect them by applying the urlencode() translation function. The script below shows how to use urlencode():

<?php
print(“<html>”);
print(“<p>Please click the links below”
.” to submit comments about FYICenter.com:</p>”);
$comment = ‘I want to say: “It\’s a good site! :->”‘;
$comment = urlencode($comment);
print(“<p>”
.”<a href=\”processing_forms.php?name=Guest&comment=$comment\”>”
.”It’s an excellent site!</a></p>”);
$comment = ‘This visitor said: “It\’s an average site! :-(“‘;
$comment = urlencode($comment);
print(“<p>”
.'<a href=”processing_forms.php?’.$comment.'”>’
.”It’s an average site.</a></p>”);
print(“</html>”);
?>

Question 29. Are Objects Passed By Value Or By Reference?

Answer :Everything is passed by value.

Question 30. What Are The Differences Between Drop A Table And Truncate A Table?

Answer :DROP TABLE table_name – This will delete the table and its data.TRUNCATE TABLE table_name – This will delete the data of the table, but not the table definition.

Question 31. What Are The Differences Between Get And Post Methods In Form Submitting, Give The Case Where We Can Use Get And We Can Use Post Methods?

Answer :When you want to send short or small data, not containing ASCII characters, then you can use GET” Method. But for long data sending, say more then 100 character you can use POST method.Once most important difference is when you are sending the form with GET method. You can see the output which you are sending in the address bar. Whereas if you send the form with POST” method then user can not see that information.

Question 32. How Do You Call A Constructor For A Parent Class?

Answer :parent::constructor($value).

Question 33. What Are The Different Types Of Errors In Php?

Answer :Here are three basic types of runtime errors in PHP:

Notices: These are trivial, non-critical errors that PHP encounters while executing a script – for example, accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all – although you can change this default behavior.

Warnings: These are more serious errors – for example, attempting to include() a file which does not exist. By default, these errors are displayed to the user, but they do not result in script termination.

Fatal errors: These are critical errors – for example, instantiating an object of a nonexistent class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHP’s default behavior is to display them to the user when they take place.Internally, these variations are represented by twelve different error types.

Question 34. What’s The Special Meaning Of __sleep And __wakeup?

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

Question 35. How Can We Submit A Form Without A Submit Button?

Answer :If you don’t want to use the Submit button to submit a form, you can use normal hyper links to submit a form. But you need to use some JavaScript code in the URL of the link. For example:
<a href=”javascript: document.myform.submit();”>Submit Me</a>.

Question 36. Would You Initialize Your Strings With Single Quotes Or Double Quotes?

Answer :Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution.

Question 37. What Is The Difference Between The Functions Unlink And Unset?

Answer :unlink() is a function for file system handling. It will simply delete the file in context.unset() is a function for variable management. It will make a variable undefined.

Question 38. How Come The Code Works, But Doesn’t For Two-dimensional Array Of Mine?

Answer :Any time you have an array with more than one dimension, complex parsing syntax is required. print “Contents: {$arr[1][2]}” would’ve worked.

Question 39. How Can We Register The Variables Into A Session?

Answer :session_register($session_var);
$_SESSION[‘var’] = ‘value’;

Question 40. What Is The Difference Between Characters \023 And \x23?

Answer :The first one is octal 23, the second is hex 23.

Question41. How do I escape data before storing it in the database?

Answer :The addslashes function enables us to escape data before storage into the database.

Question42. How is it possible to remove escape characters from a string?

Answer :The stripslashes function enables us to remove the escape characters before apostrophes in a string.

Question 43. How Many Ways We Can Retrieve The Date In Result Set Of Mysql Using Php?

Answer :As individual objects so single record or as a set or arrays.

Question 44. How Many Ways Can We Get The Value Of Current Session Id?

Answer :session_id() returns the session id for the current session.

Question 45. Can We Use Include (“abc.php”) Two Times In A Php Page “makeit.php”?

Answer :Yes.

Question 46. What’s The Difference Between Include And Require?

Answer :It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.

Question 47. Explain The Ternary Conditional Operator In Php?

Answer :Expression preceding the ? is evaluated, if it’s true, then the expression preceding the : is executed, otherwise, the expression following : is executed.

Question 48. What’s The Difference Between Htmlentities() And Htmlspecialchars()?

Answer :htmlspecialchars only takes care of <, >, single quote ‘, double quote ” and ampersand.
htmlentities translates all occurrences of character sequences that have different meaning in HTML.

Question 49. How To Store The Uploaded File To The Final Location?

Answer :move_uploaded_file ( string filename, string destination)This function checks to ensure that the file designated by filename is a valid upload file (meaning that it was uploaded via PHP’s HTTP POST upload mechanism). If the file is valid, it will be moved to the filename given by destination.If filename is not a valid upload file, then no action will occur, and move_uploaded_file() will return FALSE.If filename is a valid upload file, but cannot be moved for some reason, no action will occur, and move_uploaded_file() will return FALSE. Additionally, a warning will be issued.

Question 50. What Is The Difference Between Reply-to And Return-path In The Headers Of A Mail Function?

Answer :Reply-to : Reply-to is where to delivery the reply of the mail.Return-path : Return path is when there is a mail delivery failure occurs then where to delivery the failure notification.

Question 51. So If Md5() Generates The Most Secure Hash, Why Would You Ever Use The Less Secure Crc32() And Sha1()?

Answer :Crypto usage in PHP is simple, but that doesn’t mean it’s free. First off, depending on the data that you’re encrypting, you might have reasons to store a 32-bit value in the database instead of the 160-bit value to save on space. Second, the more secure the crypto is, the longer is the computation time to deliver the hash value. A high volume site might be significantly slowed down, if frequent md5() generation is required.

Question 52. How Can We Destroy The Session, How Can We Unset The Variable Of A Session?

Answer :session_unregister() – Unregister a global variable from the current session.session_unset() – Free all session variables.

Question 53. What Type Of Headers Have To Be Added In The Mail Function To Attach A File?

Answer : $boundary = ‘–‘ . md5( uniqid ( rand() ) );
$headers = “From: \”Me\”\n”;
$headers .= “MIME-Version: 1.0\n”;
$headers .= “Content-Type: multipart/mixed; boundary=\”$boundary\””;

Question 54. List Out Different Arguments In Php Header Function?

Answer :void header ( string string [, bool replace [, int http_response_code]]).

Question 55. What Are The Different Functions In Sorting An Array?Answer :Sorting functions in PHP:
asort()
arsort()
ksort()
krsort()
uksort()
sort()
natsort()
rsort()

Question 56. How Can We Know The Count / Number Of Elements Of An Array?

Answer :2 ways:sizeof($array) – This function is an alias of count().
count($urarray) – This function returns the number of elements in an array. Interestingly if you just pass a simple var instead of an array, count() will return 1.

Question 57. How Many Ways I Can Redirect A Php Page?

Answer :Here are the possible ways of php page redirection.1. Using Java script:
‘; echo ‘window.location.href=”‘.$filename.'”;’; echo ”; echo ”; echo ”; echo ”; } }
redirect2. Using php function: header 

Question 58. How Many Ways We Can Pass The Variable Through The Navigation Between The Pages?

Answer :At least 3 ways:
1. Put the variable into session in the first page, and get it back from session in the next page.
2. Put the variable into cookie in the first page, and get it back from the cookie in the next page.
3. Put the variable into a hidden form field, and get it back from the form in the next page.

Question 59. What Is The Maximum Length Of A Table Name, A Database Name, Or A Field Name In Mysql?

Answer :Database name: 64 characters
Table name: 64 characters
Column name: 64 characters

Question 60. How Many Values Can The Set Function Of Mysql Take?

Answer :MySQL SET function can take zero or more values, but at the maximum it can take 64 values.

Telecommunications interview questions

Question 61. What Are The Other Commands To Know The Structure Of A Table Using Mysql Commands Except Explain Command?

Answer :DESCRIBE table_name;

Question 62. How Can We Find The Number Of Rows In A Table Using Mysql?

Answer :Use this for MySQL
SELECT COUNT(*) FROM table_name;

Question 63. What Changes I Have To Do In Php.ini File For File Uploading?

Answer :Make the following line uncomment like:
; Whether to allow HTTP file uploads.
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = C:\apache2triad\temp
; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

Question 64. What’s The Difference Between Md5(), Crc32() And Sha1() Crypto On Php?

Answer :The major difference is the length of the hash generated. CRC32 is, evidently, 32 bits, while sha1() returns a 128 bit value, and md5() returns a 160 bit value. This is important when avoiding collisions.

Question 65. How Can We Find The Number Of Rows In A Result Set Using Php?

Answer :Here is how can you find the number of rows in a result set in PHP:$result = mysql_query($any_valid_sql, $database_link);
$num_rows = mysql_num_rows($result);
echo “$num_rows rows found”;

Question 66. What Is The Default Session Time In Php And How Can I Change It?

Answer :The default session time in php is until closing of browser.

Question 67. How Many Ways We Can We Find The Current Date Using Mysql?

Answer :SELECT CURDATE();
SELECT CURRENT_DATE();
SELECT CURTIME();
SELECT CURRENT_TIME();

Question 68. How Many Ways We Can Give The Output To A Browser?

Answer :HTML output
PHP, ASP, JSP, Servlet Function
Script Language output Function
Different Type of embedded Package to output to a browser.

Question 69. Please Give A Regular Expression (preferably Perl/preg Style), Which Can Be Used To Identify The Url From Within A Html Link Tag?

Answer :Try this: /href=”([^”]*)”/i.

Question 70. Give The Syntax Of Grant Commands?

Answer :The generic syntax for GRANT is as following
GRANT [rights] on [database] TO [username@hostname] IDENTIFIED BY [password]Now rights can be:
a) ALL privilages
b) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc.We can grant rights on all databse by usingh *.* or some specific database by database.* or a specific table by database.table_name.

Question 71. What Are The Different Ways To Login To A Remote Server? Explain The Means, Advantages And Disadvantages?

Answer :There is at least 3 ways to logon to a remote server:
Use ssh or telnet if you concern with security
You can also use rlogin to logon to a remote server.

Question 72. Give The Syntax Of Revoke Commands?

Answer :The generic syntax for revoke is as following
REVOKE [rights] on [database] FROM [username@hostname]Now rights can be:
a) ALL privilages
b) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc.We can grant rights on all databse by usingh *.* or some specific database by database.* or a specific table by database.table_name.

Question 73. When Viewing An Html Page In A Browser, The Browser Often Keeps This Page In Its Cache. What Can Be Possible Advantages/disadvantages Of Page Caching? How Can You Prevent Caching Of A Certain Page (please Give Several Alternate Solutions)?Answer :When you use the metatag in the header section at the beginning of an HTML Web page, the Web page may still be cached in the Temporary Internet Files folder.A page that Internet Explorer is browsing is not cached until half of the 64 KB buffer is filled. Usually, metatags are inserted in the header section of an HTML document, which appears at the beginning of the document. When the HTML code is parsed, it is read from top to bottom. When the metatag is read, Internet Explorer looks for the existence of the page in cache at that exact moment. If it is there, it is removed. To properly prevent the Web page from appearing in the cache, place another header section at the end of the HTML document.

Question 74. When You Want To Show Some Part Of A Text Displayed On An Html Page In Red Font Color? What Different Possibilities Are There To Do This? What Are The Advantages/disadvantages Of These Methods?

Answer :There are 2 ways to show some part of a text in red:1. Using HTML tag <font color=”red”>
2. Using HTML tag </font>

Question 75. What Is The Difference Between Char And Varchar Data Types?

Answer :CHAR is a fixed length data type. CHAR(n) will take n characters of storage even if you enter less than n characters to that column. For example, “Hello!” will be stored as “Hello! ” in CHAR(10) column.VARCHAR is a variable length data type. VARCHAR(n) will take only the required storage for the actual number of characters entered to that column. For example, “Hello!” will be stored as “Hello!” in VARCHAR(10) column.

Question 76. How Can We Encrypt And Decrypt A Data Present In A Mysql Table Using Mysql?

Answer :AES_ENCRYPT() and AES_DECRYPT().

Question 77. How Can We Change The Name Of A Column Of A Table?

Answer :MySQL query to rename table: RENAME TABLE tbl_name TO new_tbl_name
or,
ALTER TABLE tableName CHANGE OldName newName.

Question 78. How Can Increase The Performance Of Mysql Select Query?

Answer :We can use LIMIT to stop MySql for further search in table after we have received our required no. of records, also we can use LEFT JOIN or RIGHT JOIN instead of full join in cases we have related data in two or more tables.

Question 79. Will Comparison Of String “10” And Integer 11 Work In Php?

Answer :Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.

Question 80. What Type Of Inheritance That Php Supports?

Answer :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’.

Question 81. What Is The Functionality Of Md5 Function In Php?

Answer :string md5(string)
It calculates the MD5 hash of a string. The hash is a 32-character hexadecimal number.

Question 82. How Can I Load Data From A Text File Into A Table?Answer :The MySQL provides a LOAD DATA INFILE command. You can load data from a file.
Great tool but you need to make sure that:a) Data must be delimited.
b) Data fields must match table columns correctly.

Question 83. How Can We Know The Number Of Days Between Two Given Dates Using Mysql?

Answer :Use DATEDIFF()
SELECT DATEDIFF(NOW(),’2006-07-01′);

Question 84. How Can We Change The Data Type Of A Column Of A Table?

Answer :This will change the data type of a column:
ALTER TABLE table_name CHANGE colm_name same_colm_name [new data type].

Question 85. How Can We Know That A Session Is Started Or Not?

Answer :A session starts by session_start() function.
This session_start() is always declared in header portion. it always declares first. then we write session_ register().

Question 86. What Are The Advantages And Disadvantages Of Cascade Style Sheets?

Answer :External Style Sheets
Advantages
Can control styles for multiple documents at once Classes can be created for use on multiple HTML element types in many documents Selector and grouping methods can be used to apply styles under complex contextsDisadvantagesAn extra download is required to import style information for each document The rendering of the document may be delayed until the external style sheet is loaded Becomes slightly unwieldy for small quantities of style definitionsEmbedded Style Sheets
Advantages
Classes can be created for use on multiple tag types in the document Selector and grouping methods can be used to apply styles under complex contexts No additional downloads necessary to receive style informationDisadvantageThis method can not control styles for multiple documents at onceInline Styles
Advantages
Useful for small quantities of style definitions Can override other style specification methods at the local level so only exceptions need to be listed in conjunction with other style methodsDisadvantagesDoes not distance style information from content (a main goal of SGML/HTML) Can not control styles for multiple documents at once Author can not create or control classes of elements to control multiple element types within the document Selector grouping methods can not be used to create complex element addressing scenarios

Question 87. If We Login More Than One Browser Windows At The Same Time With Same User And After That We Close One Window, Then Is The Session Is Exist To Other Windows Or Not? And If Yes Then Why? If No Then Why?

Answer :Session depends on browser. If browser is closed then session is lost. The session data will be deleted after session time out. If connection is lost and you recreate connection, then session will continue in the browser.

Question 88. What’s The Difference Between Accessing A Class Method Via -> And Via ::?

Answer ::: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.

Question 89. What Are The Mysql Database Files Stored In System ?Answer :Data is stored in name.myd
Table structure is stored in name.frm
Index is stored in name.myi

Question 90. Explain Normalization Concept?

Answer :The normalization process involves getting our data to conform to three progressive normal forms, and a higher level of normalization cannot be achieved until the previous levels have been achieved (there are actually five normal forms, but the last two are mainly academic and will not be discussed).

First Normal Form
The First Normal Form (or 1NF) involves removal of redundant data from horizontal rows. We want to ensure that there is no duplication of data in a given row, and that every column stores the least amount of information possible (making the field atomic).

Second Normal Form
Where the First Normal Form deals with redundancy of data across a horizontal row, Second Normal Form (or 2NF) deals with redundancy of data in vertical columns. As stated earlier, the normal forms are progressive, so to achieve Second Normal Form, your tables must already be in First Normal Form.

Third Normal Form
I have a confession to make; I do not often use Third Normal Form. In Third Normal Form we are looking for data in our tables that is not fully dependant on the primary key, but dependant on another value in the table.

Question91. Is it possible to submit a form with a dedicated button?

Answer :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()”>

Question92. What is the difference between ereg_replace() and eregi_replace()?

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

Question93. Is it possible to protect special characters in a query string?

Answer :Yes, we use the urlencode() function to be able to protect special characters.

Question94. What are the three classes of errors that can occur in PHP?

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

Question95. What is the difference between characters \034 and \x34?

\034 is octal 34 and \x34 is hex 34.

Question96. How can we pass the variable through the navigation between the pages?

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

Question97. Is it possible to extend the execution time of a PHP script?

Answer :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.

Question98. Is it possible to destroy a cookie?

Answer :Yes, it is possible by setting the cookie with a past expiration time.

Question99. What is the default session time in PHP?

Answer :The default session time in php is until the closing of the browser

Question100. Is it possible to use COM component in PHP?

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

Fiber Optic Splicing & OTDR Technician job Interview Questions

Top 35 Amazon Interview Questions Previous post Top 35 Amazon Interview Questions
SEE Electrical Advanced Next post ETAP SOFTWARE FREE DOWNLOAD

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

One thought on “100 Top PHP Interview Questions and Answers

  1. Molly Flynn says:

    Pretty nice post. I simply stumbled upon your blog andwished to mention that I’ve truly loved surfing aroundyour blog posts. After all I’ll be subscribing to your rss feed and I amhoping you write again soon!

Leave a Reply

Your email address will not be published. Required fields are marked *