What's the difference between include and require?

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.

What is difference between require_once(), require(), include()?

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Log In or Sign Up in a few seconds to view this answer.

Differences between GET and POST methods?

We can send 1024 bytes using GET method but POST method can transfer large amount of data and POST is the secure method than GET method.

What is the main difference between PHP 4 and PHP 5?

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

What is the meaning of a final class and a final method?

final was introduced in PHP5. Final class means that this class cannot be extended and a final method cannot be overridden.

What type of operation is needed when passing values through a form or a URL?

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

How can we access the data sent through the URL with the GET method?

In order to access the data sent via the GET method, we you use $_GET array like this:www.url.com?var=value$variable = $_GET[“var”]; this will now contain ‘value’

Which function gives us the number of affected entries by a query?

mysql_affected_rows() return the number of entries affected by an SQL query.

How can we access the data sent through the URL with the GET method?

In order to access the data sent via the GET method, we you use $_GET array like this:www.url.com?var=value$variable = $_GET[“var”]; this will now contain ‘value’

How can we access the data sent through the URL with the POST method?

To access the data sent this way, you use the $_POST array. Imagine you have a form field called var on the form, when the user clicks submit to the post form, you can then access the value like this: 

$_POST["var"];

How can we check the value of a given variable is a number?

It is possible to use the dedicated function, is_numeric() to check whether it is a number or not.

How can we check the value of a given variable is alphanumeric?

It is possible to use the dedicated function, ctype_alnum to check whether it is an alphanumeric value or not.

How do I check if a given variable is empty?

empty() function is used to check whether a variable has a value or not i.e. it is empty or not

What does the unlink() function mean?

The unlink() function is dedicated for file system handling. It simply deletes the specified file.

What does the unset() function mean?

The unset() function is dedicated for variable management. It will make a variable undefined.

Is it possible to remove the HTML tags from data?

The strip_tags() function enables us to clean a string from the HTML tags.

What does accessing a class via :: (double colon) means?

:: is used to access static methods that do not require object initialization.

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.

What does $GLOBALS mean?

$GLOBALS is associative array including references to all variables which are currently defined in the global scope of the script.

What does $_SERVER mean?

$_SERVER is an array including information created by the web server such as paths, headers, and script locations. The entries in this array are created by the web server. There is no guarantee that every web server will provide any of these; servers may omit some, or provide others not listed here.

What does $_FILES mean?

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

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.