June 10, 2019

Srikaanth

Amdocs PHP Latest Interview Questions Answers

Amdocs Most Frequently Asked PHP Latest Interview Questions Answers

How to initiate a session in PHP?

The use of the function session_start() lets us activating a session.

How can you propagate a session id?

You can propagate a session id via cookies or URL parameters.

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.

When do sessions end?

Sessions automatically end when the PHP script finishes executing but can be manually ended using the session_write_close().

What is the difference between session_unregister() and session_unset()?

The session_unregister() function unregister a global variable from the current session and the session_unset() function frees all session variables.

What does $GLOBALS mean?

$GLOBALS is associative array including references to all variables which are currently defined in the global scope of the script.
Amdocs Most Frequently Asked PHP Latest Interview Questions Answers
Amdocs Most Frequently Asked PHP Latest Interview Questions Answers

What does $_SERVER mean?

$_SERVER is an array including information created by the web server such as paths, headers, and script locations.

What does $_FILES means?

$_FILES is an associative array composed of items sent to the current script via the HTTP POST method.

What is the difference between $_FILES['userfile']['name'] and $_FILES['userfile']['tmp_name']?

$_FILES['userfile']['name'] represents the original name of the file on the client machine,

$_FILES['userfile']['tmp_name'] represents the temporary filename of the file stored on the server.

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.

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.

What does $_ENV mean?

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

How can we determine whether a PHP variable is an instantiated object of a certain class?

To be able to verify whether a PHP variable is an instantiated object of a certain class we use instanceof.

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.

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.

What does the expression Exception::__toString means?

Exception::__toString gives the String representation of the exception.

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.

How can we determine whether a variable is set?

The boolean function isset determines if a variable is set and is not NULL.

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.

https://mytecbooks.blogspot.com/2018/10/amdocs-most-frequently-asked-php-latest.html
Subscribe to get more Posts :