Monday 24 December 2018

Interview Questions for Fresher Set-8

71) what the difference between the 'BITWISE AND' operator and the 'LOGICAL AND' operator?
$a and $b: TRUE if both $a and $b are TRUE.

$a & $b: Bits that are set in both $a and $b are set.

72) What does the scope of variables mean?
The scope of a variable is the context within which it is defined. For the most part, all PHP variables only have a single scope. This single scope spans included and required files as well.

73) What does $_COOKIE mean?
$_COOKIE is an associative array of variables sent to the current PHP script using the HTTP Cookies.

74) What does $_ENV mean?
$_ENV is an associative array of variables sent to the current PHP script via the environment method.

75) 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.

76) 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.

77) 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.

78) What does $_FILES means?
$_FILES is an associative array composed of items sent to the current script via the HTTP POST method.

79) What does $_SERVER mean?
$_SERVER is an array including information created by the web server such as paths, headers, and script locations.

80) What does $GLOBALS mean?
$GLOBALS is associative array including references to all variables which are currently defined in the global scope of the script.

No comments:

Post a Comment