NOVINKA: Najžiadanejšie rekvalifikačné kurzy teraz s 50% zľavou + kurz AI ZADARMO. Nečakaj, táto ponuka dlho nevydrží! Zisti viac:

PHP - Bez triedy

Menný priestor

Koreň

Obsahuje členov, ktorí nepatria do žiadnej triedy, napr. funkcie.

Metódy

Procedurálne

Názov Popis Stav
acos ($arg)

The acos() function returns a value of the goniometric function arc cosine. The arc cosine is the complementary function of cosine (often referred as cos−1). It's used to get back the angle.

Hotovo
acosh ($arg)

The acosh() function returns a value of the goniometric function hyperbolic arc cosine. The hyperbolic arc cosine is the the complementary function of hyperbolic cosine (often referred as cosh−1...

Hotovo
array ($...)

Creates a new array. This is not really a function but a language construct.

Note: Sice PHP 5.4 we can use the short array syntax:

$array = [];

PHP supports associative...

Hotovo
array_change_key_case ($array, $case)

The function is used to change the array key names to uppercase or lowercase. Numeric indexes remain unchanged.

Note: The function works only with the first dimension of the array.

**Bewa...

Hotovo
array_combine ($keys)

Creates a single array from two arrays, first containing keys, second containing values.

Hotovo
array_count_values ()

Returns an associative array containing counts of individual items in a given array.

Hotovo
array_diff_key ($array1, $array2, $...)

The function compares the keys of the arrays and returns the difference.

Note: The function doesn't work recursively for multidimensional arrays.

Hotovo
array_fill ($start_index, $num, $value)

The function creates a new array filled with the entered values.

Hotovo
array_filter ($array, $flag)

Tests each item in the input array against a given callback. If the callback returns true, the item will be present in array returned by this function, false otherwise. Array keys are preserved...

Hotovo
array_flip ($array)

Flips key-value elements in an array, so keys will become values and values become keys. Values must be integer or string. If the value is e.g. an object, PHP throws a warning and the key is no...

Hotovo
array_intersect ($array1, $array2, $...)

The function returns an array which is an intersection of the values of entered arrays.

In the first array, only the keys whose values are also present in the second array are kept. The second a...

Hotovo
array_intersect_key ($array1, $array2, $...)

This function returns an associative array that only has keys that are present in all provided arrays. Values from the first array are used as values in the final array. The function can be useful ...

Hotovo
array_keys ($array, $search_value, $strict)

Returns an array of keys from the entered array.

Hotovo
array_key_exists ($key, $array)

The function checks whether an array contains a specified key.

For the backward compatibility's sake, the array_key_exists() function will also return true if the key is defined as a proper...

Hotovo
array_map ($callback, $array1, $...)

Applies a callback (function) to all elements in an array.

Hotovo
array_merge ($array1, $...)

The function merges several arrays into one array. The result array is created by appending the array to the end of the previous one. If the key exists in the array, it will be replaced. If we only...

Hotovo
array_pop (&$array)

Removes the last element from an array. The function allows you to use the array as a queue, so it should only be used if we work with the array as a queue.

Numerical indexes will be renumbered ...

Hotovo
array_product ($array)

This function returns the product of the values in an array.

Hotovo
array_push (&$array, $value1, $...)

Inserts an element into an array after the last element. The function allows you to use the array as a stack, so it should only be used if we work with the array as a stack.

Otherwise, we insert...

Hotovo
array_rand ($array, $num)

Selects a given number of random items in a given array and returns the keys of these items.

Note: This function uses a pseudo-random number generator and therefore is not suited for cryptog...

Hotovo
array_reduce ($array, $callback)

Iteratively reduces an array to a single value using a given callback function.

Hotovo
array_replace ($array1, $array2, $...)

The function replaces the values from the first array with the values from the following arrays.

  • If a key from the first array (array 1) exists also in the following array (array 2), the value...
Hotovo
array_reverse ($array, $preserve_keys)

Reverses values in the array so that the first value is the last and vice versa.

Hotovo
array_search ($needle, $haystack, $strict)

Searches the array for a given element. We talk about the problem as about searching for a needle in a haystack.

Hotovo
array_shift (&$array)

Removes the first element from an array and moves others forward. The function allows using the array as a queue, so it should only be used in the code if we work with the array as a queue. Otherwi...

Hotovo
array_slice ($array, $offset)

This function creates a slice of a given length from a given array containing elements starting at a given position (offset).

Hotovo
array_splice (&$input, $offset, $length, $replacement)

The function removes specified elements from an array and replaces them with new ones if they're provided.

Hotovo
array_sum ($array)

Returns the sum of all values in an array. Keys do not matter. The function is useful e.g. for calculating an arithmetic mean. It tries to convert string values in the array to numbers using standa...

Hotovo
array_uintersect ($array1, $array2, $..., $value_compare_func)

The function compares the values of at least two arrays according to a user-defined comparison function and returns their intersection.

Hotovo
array_unique ($array, $sort_flags)

Removes duplicate elements in an array. In the result array, each value occurs at most once. Keys are not affected. Elements are internally compared as strings using the === operator.

Hotovo
array_unshift (&$array, $value1, $...)

Prepends one or more elements to the front of an array. The function allows you to use the array as a queue, so it should only be used if we work with the array as a queue.

Numerical indexes wil...

Hotovo
array_values ($array)

The function returns an array of all values from the given array.

Hotovo
asin ($arg)

The asin() function returns a value of the goniometric function arc sine. The arc sine is the complementary function of sine (often referred as sin−1). It's used to get back the angle, which mea...

Hotovo
asinh ($arg)

The asinh() function returns a value of the goniometric function hyperbolic arc sine. The hyperbolic arc sine is the complementary function of the hyperbolic sine (often referred as sinh−1). It'...

Hotovo
atan ($arg)

The function atan() returns a value of the goniometric function arc tangent. The arc tangent is the inverted value of the tangent (often referred as tan−1). It allows us to get back the angle, w...

Hotovo
atan2 ($y, $x)

The atan2() function returns a value of the goniometric function arc tangent of two numbers x and y. It's similar as if we'd calculate the arc tangent of y / x except that the signs of both...

Hotovo
atanh ($arg)

This function is equivalent to the hyperbolic arcus tangent (often referred to as tanh−1).

Hotovo
base64_decode ($data, $strict)

Decodes the data from base64 to original representation of these data.

Hotovo
base64_encode ($data)

Converts data to the base64 representation.

Hotovo
base_convert ($number, $frombase, $tobase)

The base_convert function converts a given number between various numeral systems.

Hotovo
bcsqrt ()

Gets a more accurate square root of a given number using the BC Math extension.

Hotovo
bin2hex ($str)

This function converts a binary number (either represented as a string or as an integer) to a hexadecimal number. It is the only function that contains the number 2 in its name.

This function c...

Hotovo
bindec ($binary_string)

This function converts a binary number to a decimal number.

The base_convert function which is universal can be used instead.

Hotovo
boolval ()

Determines the boolean value of a given value.

Hotovo
callback ()

The function compares the values of at least two arrays according to a user-defined comparison function and returns their intersection.

Hotovo
ceil ($value)

This function rounds up a given decimal number to the next higher integer.

Note: Rounds up numbers always away from zero (positive numbers are always rounded up, negative numbers are rounde...

Hotovo
chdir ($directory)

This function allows to change the current directory.

*Note: When the safe mode is enabled, PHP checks whether the directory in which the script is operating has the same UID (owner) as the scri...

Hotovo
chmod ($filename, $mode)

This function allows to change the access permissions (mode) to the file or directory.

*Note: The current user is the user under which PHP runs. It's probably not the same user you use for regul...

Hotovo
chr ($ascii)

The chr() function is used to get a character by its ASCII code.

Note:To get the ASCII code of a character use the ord() function.

Hotovo
chr ()

The chr() function is used to get a character by its ASCII code.

Note:To get the ASCII code of a character use the ord() function.

Hotovo
class_alias ($original, $alias, $autoload)

Creates an alias, or a nickname, for a given class. A new alias is a reference to the original class.

Hotovo
class_exists ($class_name, $autoload)

This function checks whether or not a given class has been already defined.

Note: Without setting the second parameter, the class autoloader will start, and if the given class is available, a...

Hotovo
constant ($name)

The constant() function returns the value of a constant by its name. It also works with class constants.

If the constant is not defined, the function emits a warning.

Hotovo
cos ($arg)

The cos() function returns a cosine of the given angle in radians.

Hotovo
cosh ($arg)

The cosh() function returns a value of the goniometric hyperbolic cosine function defined as (exp(úhel) + exp(-úhel)) / 2. The function works the same as the cosine function, but it returns val...

Hotovo
count ($array_or_countable, $mode)

Counts elements in an array or in an object.

To count objects, the Countable interface needs to be implemented.

Hotovo
crypt ($str, $salt)

crypt() is used to create a hash of a string using one of the supported one-way algorithms. The hashing algorithm is determined by a prefix of salt. If no salt is specified, the standard Unix DES...

Hotovo
decbin ($number)

This function converts a decimal number to a binary number. The base_convert function can be easily used instead; it is universal.

Hotovo
dechex ($number)

This function converts a decimal number to a hexadecimal number. The base_convert function which is universal can be used instead.

Hotovo
decoct ($number)

This function converts a decimal number to an octal number. The base_convert function can be easily used instead; it is universal.

Hotovo
define ($name, $value, $case_insensitive)

The define() function is used to define a named constant during runtime.

Note: We can use the defined() function to determine whether a constant is defined.

Hotovo
defined ($name)

The defined() function checks whether a given constant exists and is defined. It also works with class constants.

Hotovo
deg2rad ($number)

This function converts degrees to radians.

Hotovo
dir ($directory, $context)

The dir() function is used to get an instance of the Directory class which we can be used for reading a directory.

Note: The order in which the directory entries are returned (when calli...

Hotovo
echo ($arg1, $...)

echo() prints one or more strings and does not add a new line after printing. It is not a function, but it is a language construct (echo can be called without parentheses). We can pass more tha...

Hotovo
empty ($var)

The function determines whether a variable is considered to be "empty". Variables are empty if they don't exist or the're false (using the standard comparison so also including values like 0, "" ...

Hotovo
eval ($code)

Evaulates given PHP code. It's a language construct, not a function.

If an error occurred during the evaluation, the whole script exits.

Tip: The output of the evaulated code can be redir...

Hotovo
exit ($status, $status)

exit terminates the running script and shows a message if a parameter is passed. It is a language construct and it does not need any parameters.

Shutdown functions, as well as object destructo...

Hotovo
exp ($arg)

This function returns the base of natural logarithm - Euler's number raised to the power of a given argument (e^x).

It is equivalent to pow(M_E, x).

Hotovo
explode ($delimiter, $string, $limit)

The function with an expressive name splits a string into a few substrings by a delimiter and returns them in an array. Simply, it converts the string to the array of substrings. It's a very useful...

Hotovo
expm1 ($arg)

This function subtracts 1 from the natural logarithm base (e^x).

It can be replaced with commands such as pow(M_E, $x) - 1 or exp($x) - 1, but this function is more accurate for values ...

Hotovo
extract (&$array, $flags, $prefix)

It extracts variables from an array into the current scope. It uses array keys as variable names, the function checks if variable names are valid and also if the variable doesn't already exist.

...

Hotovo
file_exists ()

Determines the existence of a given file or directory.

Note: Results returned by this function are cached, see the clearstatcache() function for more information.

Hotovo
file_get_contents ($filename, $context, $offset, $maxlen)

file_get_contents() reads a file and returns its contents as string. The filename can be either a local path (absolute or relative), or a URL (if the fopen-wrappers module is allowed).

Hotovo
floor ($value)

This floor() function rounds a given number towards zero - positive numbers will be rounded down, negative numbers will be rounded up.

Hotovo
fmod ($x, $y)

This function is similar to the % (modulo) operator, but this function returns the floating point remainder.

Hotovo
function_exists ($function_name)

Checks whether a specified function exists, including user-defined functions.

Note: Some functions can exist based on a result returned by this function, but could not be unusable due to com...

Hotovo
get_declared_classes ()

Inserts into an array the names of all the classes that are declared at that time and ready for use, and then returns the array. Last declared classes are at the end of this array.

Hotovo
get_declared_interfaces ()

Inserts into an array the names of all the interfaces that are declared at that time and then returns the array. Last declared interfaces are at the end of this array.

Hotovo
get_defined_functions ($exclude_disabled)

Fills the array with the names of all declared functions and returns the array.

Hotovo
get_parent_class ($object)

Returns the name of the parent class of an object or class.

Hotovo
glob ($pattern, $flags)

The glob() function searches all files and directories matching a pattern by rules of the glob() function of the libc library. The rules are similar to rules in common shells.

**Please note:...

Hotovo
handler ()

The function is used to define a user exception handler, meaning we can catch exceptions on the highest level when they'd cause the termination of the script otherwise. This function captures all t...

Hotovo
hash ($algo, $data, $raw_output)

The hash() function is used to hash a string. The hashing process creates a fingerprint (e.g. of a password) from which we cannot get the original value. For security reasons, the server should n...

Hotovo
header ($string, $replace, $http_response_code)

The header() function is used for sending the HTTP header.

Warning:

1. The function has to be called before any output is printed (even white-spaces before <?php may cause a problem). ...

Hotovo
header ()

The header() function is used for sending the HTTP header.

Warning:

1. The function has to be called before any output is printed (even white-spaces before <?php may cause a problem). ...

Hotovo
hexdec ($hex_string)

This hecdec() function converts a hexadecimal number to a decimal number. The base_convert function which is universal can be used instead.

Hotovo
highlight_string ($str, $return)

The highlight_string() function is used for highlighting the PHP language syntax in a string. The colors can be customized using the ini_set() function.

Note: Since the output buffer is ...

Hotovo
htmlspecialchars ($string, $flags, $encoding, $double_encode)

The key function which converts special characters into HTML entities. Special characters include: &, ', ", <, >. This function is very important and it should be used when printing most ...

Hotovo
htmlspecialchars_decode ($string, $flags)

The opposite function of htmlspecialchars(). It converts entities back to special characters.

Hotovo
hypot ($x, $y)

The hypot() function returns the hypotenuse from a right-angled triangle. This function can be easily replaced by the Pythagorean theorem => sqrt(x*x + y*y).

Hotovo
implode ($glue, $pieces)

implode() is the opposite of the explode() function . It allows wrapping an array into a string.

Hotovo
ini_set ($varname, $newvalue)

The ini_set() function is used for changing configuration options temporarily. (The original configuration options will be restored after the script terminates).

Note:

1. Not all configu...

Hotovo
intval ($var, $base)

Determines the integer value of a given parameter with a conversion to a specified base (radix).

Note: Calling this function with an object given as the $var parameter will result into emi...

Hotovo
in_array ($needle, $haystack, $strict)

The function is used to check the existence of a value in an array.

Hotovo
isset ($var, $...)

The isset() function is used to determine whether a variable or an array's key exists and is not null.

If we pass an inaccessible object property to the function, the __isset() magic metho...

Hotovo
is_array ($var)

Determines whether a given variable is an array.

Hotovo
is_bool ($var)

The is_bool() function checks whether a given value is of the boolean type.

Hotovo
is_float ($var)

The is_float() function checks whether a given value of the float type.

The function works only for numeric values. If the given value is a string, the function returns false.

Hotovo
is_int ($var)

The is_int() function checks whether a given value is of the integer type.

The function works for numeric values only. If the given value is a string, the function returns false.

Hotovo
is_nan ()

Determines whether a given variable is not a number.

Hotovo
is_null ($var)

Determines whether a given variable is null.

Hotovo
is_numeric ($var)

Determines whether a given variable is a number. The number can also be represented by a string containing numeric value, but not in the hexadecimal or binary notations. The scientific notation (th...

Hotovo
is_readable ($filename)

Determines whether a specified file exists and is readable.

Note: Results of this function are cached. Refer to the clearstatcache() function for more details.

Tip: From PHP version...

Hotovo
is_string ($var)

The is_string() function checks whether a given value is of the string type.

Hotovo
is_subclass_of ($object, $class_name, $allow_string)

Checks the entire inheritance tree of the specified class or its instance, whether it is inheriting or implementing a given class or interface class_name.

*Note: By default this function will ...

Hotovo
json_decode ($json, $assoc, $depth, $options)

Converts a JSON string into a PHP variable. On error, the json_last_error() function can be used to determine the exact error.

Hotovo
json_encode ($value, $depth)

Converts a PHP variable into its JSON representation. When converting an array which indexech are not a continuous numeric sequence starting with 0, all the indexes will be encoded as strings.

Hotovo
ksort (&$array, $sort_flags)

Sorts an array by keys.

Hotovo
levenshtein ($str1, $str2, $cost_ins, $cost_rep, $cost_del)

The levenshtein() function calculates the Levenshtein distance between two strings. The distance is defined as the minimal number of characters which are needed to be changed, added or removed to...

Hotovo
log ($arg, $base)

The log() function returns the logarithm value. The basis for the logarithm is Euler's number (so the logarithm is natural, not decadic).

Hotovo
log10 ($arg)

The log10() function returns a value of the base-10 logarithm (the decadic logarithm). It can be replaced with the log(x, 10) function.

Hotovo
log1p ($number)

The log1p() function returns the logarithm of a value 1 + x, i.e. log(1 + x). For x close to 0, this function is more accurate than calling the log(1 + x) function.

Hotovo
mail ($to, $subject, $message, $additional_headers, $additional_parameters)

The function is used for sending emails.

Hotovo
max ($values, $value1, $value2, $...)

The max() function returns the highest value (maximum). The function does not have a fixed number of parameters.

Hotovo
mb_internal_encoding ($encoding)

To work with strings, it is important for PHP to know our encoding. We will usually (actually everytime) use UTF8. The advantage of Unicode (i.e. UTF encoding) is that we do not have to worry if th...

Hotovo
mb_strlen ($str, $encoding)

The mb_strlen() function (as multi-byte string length) gets the length of a string (i.e. the number of characters). It replaces the old strlen() function that returned the number of characters ...

Hotovo
mb_strpos ($haystack, $needle, $offset, $encoding)

The mb_strpos() function finds the position of the first occurrence of a substring in a string.

There is also a mb_strrpos() function (extra r as reverse) what works exactly the same way a...

Hotovo
mb_strtolower ($str, $encoding)

The mb_strtolower() function converts all characters in a string to lowercase (even those with diacritics). So it is the opposite of the mb_strtoupper() function.

Hotovo
mb_strtoupper ($str, $encoding)

The mb_strtoupper() function converts all characters in a string to uppercase (even those with diacritics).

Hotovo
mb_substr ($str, $start, $length, $encoding)

The mb_substr() function returns a substring from the starting position with the specific number of characters.

Hotovo
min ($values, $value1, $value2, $...)

The min() function returns the lowest value (minimum). The function does not have a fixed number of parameters.

Hotovo
mt_rand ($min, $max)

Generates pseudo-random numbers using Mersenne Twister method.

Warning: This function does NOT generate cryptographically secure random n...

Hotovo
nl2br ($string, $is_xhtml)

The nl2br() function replaces end of lines (\n) with the <br /> tag. This can be useful for printing texts that may be provided by users within textarea.

Hotovo
number_format ($number, $decimals, $dec_point, $thousands_sep)

The function formats a number according to given parameters. The function supports 1, 2, or 4 parameters entered (not 3).

Hotovo
ob_get_contents ()

The function gets the contents of the output buffer but doesn't clear the buffer.

Hotovo
octdec ($octal_string)

The octdec() function returns a decimal equivalent of an octal value. This function can be easily replaced by the base_convert() function which is universal.

Hotovo
parse_str ($encoded_string, &$result)

The parse_str() function extracts variables from a string if variables are in the form of the QUERY string (how we usually get them from the URL address).

If the array is not set, variables ...

Hotovo
parse_url ($url, $component)

The function is used for dividing a URL adress into parts which are returned as an associative array.

Note: The function should not be used for validating a URL. It just divides a URL into i...

Hotovo
password_get_info ($hash)

Reads the information about the used algorithm from a given hash created using password_hash() or crypt().

Returns an associative array with following elements:

  • algo - The constant of t...
Hotovo
password_hash ($password, $algo, $options)

The password_hash() is used to create secure password hashes.

The returned value contains a password hash accompanied by an information about the used hashing algorithm, so after switching to ...

Hotovo
password_needs_rehash ($hash, $algo, $options)

password_needs_rehash() is used to verify, whether a provided algorithm and options were used to create a hash.

It is typically used when switching to a more secure algorithm, or in a combinat...

Hotovo
password_verify ($password, $hash)

Matches the given hash with the given password.

Hotovo
phpinfo ($what)

The phpinfo() function is used for displaying a detail information about the PHP's configuration.

Warning: Do not output phpinfo() in public sections of your website, because it contains...

Hotovo
phpversion ($extension)

The function gets the current PHP version or the version of a given extension.

Hotovo
pow ($base, $exp)

The pow() function returns base raised to the power. We can easily replace it by simple multiplication what is more effective for lower exponents.

Hotovo
preg_match ($pattern, $subject, &$matches, $flags, $offset)

The preg_match() function is used for finding a match of a string with a regular expression pattern.

Warning: For testing the return value use the === operator to avoid problems with mis...

Hotovo
printf ($format, $args, $...)

The printf() function formats an input and immediately prints it.

When formatting the input we should not forget that special characters are not counted only as a single character! This also a...

Hotovo
print_r ($expression, $return)

The print_r() function prints information about a variable in a way it is readable by humans.

This function also prints protected and private variables. However, static class members will ...

Hotovo
rad2deg ($number)

The rad2deg() function converts a number from radian to degrees.

Hotovo
rand ($min, $max)

The rand() function returns a pseudo-random number.

The function can be called without parameters, so it returns a value between 0 and getrandmax(). However, you can not enter only one param...

Hotovo
random_bytes ($length)

random_bytes() is used to generate a pseudo-random string of bytes, that can be surely used for cryptographic operations.

As a source of entropy is used getrandom(2)...

Hotovo
random_int ()

random_int() generates a pseudo-random integer using a cryptographically secure method.

The interval in which the generated numbers will be can be set using the $max and $min parameters, a...

Hotovo
round ($val, $precision, $mode)

The round() function returns a rounded number.

Hotovo
serialize ($value)

The function generates a textual representation of a value which is suitable to be stored. It handles all data types except the resource type. It's possible to recreate the original value from the ...

Hotovo
session_decode ($data)

This function decodes given session data and saves them in the $_SESSION superglobal variable.

Hotovo
session_encode ()

This function encodes the contents of the $_SESSION superglobal variable and returns it as string.

Note!: Before you call this function, you have to call the session_start() function.

Hotovo
session_id ($id)

The function is used for getting or editing the id of the current session.

Note: If you are editing the value, do it before calling session_start().

Warning: If you set the session ...

Hotovo
session_name ($name)

The function is used for getting or editing the current session name.

Hotovo
session_save_path ($path)

The function is used for getting or editing the location for storing session files.

Note: If you are editing the location, you have to do it before calling session_start().

Hotovo
session_start ($options)

This function creates a session environment.

Note!

  • If you are using a cookie-based session, you must call session_start() before you start working with it.
  • This function sends multip...
Hotovo
session_status ()

The function is used to get the status of the current session.

Hotovo
session_unset ()

The session_unset() function is used to delete all session variables.

Note: Use the unset() function to remove individual session variables as e.g. unset($_SESSION("user"));

Hotovo
setcookie ($name, $value, $expire, $path, $domain, $secure, $httponly)

The function defines and sets a cookie.

Note: The function has to be called before any output (both caused by the echo() function or just by sending a HTML fragment before the PHP direct...

Hotovo
set_exception_handler ($exception_handler)

The function is used to define a user exception handler, meaning we can catch exceptions on the highest level when they'd cause the termination of the script otherwise. This function captures all t...

Hotovo
set_time_limit ($seconds)

The set_time_limit() function sets how long the script can run. It is related only to the current script - the function doesn't change the global setting. The default value for the execution time...

Hotovo
sha1 ($str, $raw_output)

The sha1() function is used for calculating the sha1 hash of a string.

Warning: It's not recommended to use this function to hash passwords since it's easy to crack. For this purpose use t...

Hotovo
shuffle (&$array)

The function shuffles an array (randomizes the order of its elements).

Beware: This function assigns new keys to the elements in the array. It'll remove any existing keys!

Note: The f...

Hotovo
similar_text ($first, $second, &$percent)

The function calculates the similarity between two strings using the algorithm from World's Best Algorithms by Oliver. The implementation uses a recursion instead of the stack. The algorithm's time...

Hotovo
sin ($arg)

The sin() function returns a sine of the given angle in radians.

Hotovo
sinh ($arg)

The sinh() function returns a value of the goniometric hyperbolic sine function defined as (exp(úhel) - exp(-úhel)) / 2. The function works the same as the sine function, but it returns values ...

Hotovo
sleep ($seconds)

The sleep() function stops the script for a given number of seconds.

If it's needed to stop the script for microseconds, the usleep() function can be used.

Hotovo
sort (&$array, $sort_flags)

Sorts values in an array from the lowest to the highest.

The function re-indexes the array. More precisely, it removes the keys and creates new ones.

Internally, the sort is implemented by th...

Hotovo
sqrt ($arg)

The function sqrt() returns the square root.

Hotovo
strcmp ($str1, $str2)

The strcmp() function compares two strings binary. The function is case sensitive and binary safe.

The first two parameters must be strings, otherwise the function can return misleading re...

Hotovo
strip_tags ($str, $allowable_tags)

The function strip_tags() removes HTML tags, PHP tags and HTML comments from a string. The function works as that it removes all characters between < and > without taking care of lowercase or...

Hotovo
strlen ($string)

The strlen() function is used to measure the length of a string.

Note:The function returns the number of bytes instead of the number of characters. (For pure ASCII texts without accept cha...

Hotovo
strncmp ($str1, $str2, $len)

The strncmp() function compares two strings up to the given length. The function is `case sensitive and binary safe.

The first two parameters must be strings, otherwise the function can return...

Hotovo
strstr ($haystack, $needle, $before_needle)

The function searches for the first occurrence of a string in another string. The function is case-sensitive and also binary-safe. For a case-insensitive search, use the stristr() functio...

Hotovo
strtolower ($string)

Returns a string where all the alphabetic characters are converted to lowercase.

**Note: ** The function is binary-safe. That means we can pass it binary data as well as text and it'll handle it...

Hotovo
strtotime ($time, $now)

The function converts a given date and time as an English text to the Unix timestamp (the number of seconds since 1/1/1970).

Beware: This function is not suitable to be used in mathematical ...

Hotovo
strtr ($str, $from, $to, $replace_pairs)

The strtr() function is similar to the str_replace() function. However, there is a small difference. This function does not replace strings that already have been replaced (check examples below...

Hotovo
str_pad ($pad_length, $pad_string)

str_pad() is used to pad a string to the requested length using characters from the $pad_string parameter. If $pad_string contains more than 1 characters, characters are alternated.

/---co...

Hotovo
str_repeat ($input, $multiplier)

The str_repeat() function returns a given string repeated multiple times.

Hotovo
str_replace ($search, $replace, $subject, &$count)

Replaces all occurrences of a substring in a string by the given substring.

The search is performed from left to right and we must expect that already replaced characters can be sometimes re...

Hotovo
substr ($string, $start, $length)

The function returns a part of the string (a substring) according to the given parameters.

Hotovo
tan ($arg)

The tan() function returns a tangent of the given angle in radians.

Hotovo
tanh ($arg)

The tanh() function returns a value of the goniometric hyperbolic tangent function defined as sinh(angle) / cosh(angle). The function works the same as the tangent function, but it returns valu...

Hotovo
trim ($str, $character_mask)

The trim() function removes all so-called white spaces at the beginning and the end of a string. White spaces include spaces, tabs, ends of lines and other characters. These characters are: " "...

Hotovo
ucfirst ($str)

The function makes the first character of a string uppercased (if that character is alphabetic).

Beware: The function does not support multibyte characters!

Hotovo
ucwords ($str, $delimiters)

The ucwords() function returns a string with the first character of each word of a given string uppercased in case that first character was alphabetic. This operation is sometimes called "capital...

Hotovo
uksort (&$array, $key_compare_func)

The function is used to sort an array by keys using a comparison function defined by the user.

Hotovo
unlink ($filename)

The unlink() function removes a file. A E_WARNING level warning is emitted in case of failure.

Hotovo
urldecode ($str)

Decodes a string encoded in the URL-friendly form into the normal string representation.

Note: Do not use this function on $_GET or $_REQUEST, they're already decoded.

Hotovo
urlencode ($str)

Encodes a string so it can be used as a part of URL.

Beware: If you place a variable named as HTML entity in the URL, e.g. &amp, the browser will convert this part of the string to this en...

Hotovo
usleep ($micro_seconds)

The usleep() function stops the script for a given number of microseconds.

Hotovo
usort (&$array, $value_compare_func)

The function is used to sort an array by values using a comparison function defined by the user.

Note: Any existing keys will be removed and new keys will be assigned.

Hotovo
utf8_decode ($data)

Converts data from UTF-8 to the ISO-8859-1 representation. Non valid UTF-8 bytes or UTF-8 characters which are not defined in ISO-8859-1 (above U+00FF) are replaced with question marks (?).

Hotovo
utf8_encode ($data)

Converts a string from ISO-8859-1 to the UTF-8 representation.

Hotovo
var_dump ($expression, $...)

The var_dump() function dumps information about a variable. The function displays structured information and also explores the inner array and objects recursively.

Hotovo
Aktivity