June 17, 2019

Srikaanth

Pegasystems Most Frequently Asked PHP Interview Questions

Pegasystems Most Frequently Asked PHP Latest Interview Questions Answers

How Can We Know The Number Of Days Between Two Given Dates Using Php?

Simple arithmetic:
$date1 = date('Y-m-d');
$date2 = '2006-07-01';
$days = (strtotime() - strtotime()) / (60 * 60 * 24);
echo "Number of days since '2006-07-01': $days";

How Can We Repair A Mysql Table?

The syntex for repairing a mysql table is:

REPAIR TABLE tablename
REPAIR TABLE tablename QUICK
REPAIR TABLE tablename EXTENDED

This command will repair the table specified.
If QUICK is given, MySQL will do a repair of only the index tree.
If EXTENDED is given, it will create index row by row.

What Is The Difference Between $message And $$message?

$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';
Pegasystems Most Frequently Asked PHP Latest Interview Questions Answers
Pegasystems Most Frequently Asked PHP Latest Interview Questions Answers

What Is A Persistent Cookie?

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.

How Do You Define A Constant?

Via define() directive, like define ("MYCONSTANT", 100);

What Are The Differences Between Require And Include, Include_once?

require_once() and include_once() are both the functions to include and evaluate the specified file only once. If the specified file is included previous to the present call occurrence, it will not be done again.

But require() and include() will do it as many times they are asked to do.

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 of the given string.

How To Get The Uploaded File Information In The Receiving Script?

Once the Web server received the uploaded file, it will call the PHP script specified in the form action attribute to process them. This receiving PHP script can get the uploaded file information through the predefined array called $_FILES. Uploaded file information is organized in $_FILES as a two-dimensional array as:

$_FILES[$fieldName]['name'] - The Original file name on the browser system.
 $_FILES[$fieldName]['type'] - The file type determined by the browser.
 $_FILES[$fieldName]['size'] - The Number of bytes of the file content.
 $_FILES[$fieldName]['tmp_name'] - The temporary filename of the file in which
the uploaded file was stored on the server.
 $_FILES[$fieldName]['error'] - The error code associated with this file upload.
The $fieldName is the name used in the.

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.

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.

What Is Meant By Pear In Php?

PEAR is the next revolution in PHP. This repository is bringing higher level programming to PHP. PEAR is a framework and distribution system for reusable PHP components. It eases installation by bringing an automated wizard, and packing the strength and experience of PHP users into a nicely organised OOP library. PEAR also provides a command-line interface that can be used to automatically install "packages".

Subscribe to get more Posts :