PHP - Bez triedy
Menný priestor
Obsahuje členov, ktorí nepatria do žiadnej triedy, napr. funkcie.Metódy
Procedurálne
| Názov | Popis | Stav |
|---|---|---|
| acos ($arg) | The | Hotovo |
| acosh ($arg) | The | 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 | Hotovo |
| array_flip ($array) | Flips key-value elements in an array, so keys will become values and values
become keys. Values must be | 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 | 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.
| 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 | 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 | Hotovo |
| asinh ($arg) | The | Hotovo |
| atan ($arg) | The function | Hotovo |
| atan2 ($y, $x) | The | 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 Note:To get the ASCII code of a character use the
| Hotovo |
| chr () | The Note:To get the ASCII code of a character use the
| 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 If the constant is not defined, the function emits a warning. | Hotovo |
| cos ($arg) | The | Hotovo |
| cosh ($arg) | The | 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) |
| 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 Note: We can use the | Hotovo |
| defined ($name) | The | Hotovo |
| deg2rad ($number) | This function converts degrees to radians. | Hotovo |
| dir ($directory, $context) | The Note: The order in which the directory entries are returned (when calli... | Hotovo |
| echo ($arg1, $...) |
| 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 | 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) |
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 | 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 | 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
| Hotovo |
| file_get_contents ($filename, $context, $offset, $maxlen) |
| Hotovo |
| floor ($value) | This | 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 **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 | Hotovo |
| header ($string, $replace, $http_response_code) | The Warning: 1. The function has to be called before any output is printed (even
white-spaces before | Hotovo |
| header () | The Warning: 1. The function has to be called before any output is printed (even
white-spaces before | Hotovo |
| hexdec ($hex_string) | This | Hotovo |
| highlight_string ($str, $return) | The 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: | Hotovo |
| htmlspecialchars_decode ($string, $flags) | The opposite function of | Hotovo |
| hypot ($x, $y) | The | Hotovo |
| implode ($glue, $pieces) |
| Hotovo |
| ini_set ($varname, $newvalue) | The 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
| Hotovo |
| in_array ($needle, $haystack, $strict) | The function is used to check the existence of a value in an array. | Hotovo |
| isset ($var, $...) | The If we pass an inaccessible object property to the function, the
| Hotovo |
| is_array ($var) | Determines whether a given variable is an array. | Hotovo |
| is_bool ($var) | The | Hotovo |
| is_float ($var) | The The function works only for numeric values. If the given value is a string,
the function returns | Hotovo |
| is_int ($var) | The The function works for numeric values only. If the given value is a string,
the function returns | Hotovo |
| is_nan () | Determines whether a given variable is not a number. | Hotovo |
| is_null ($var) | Determines whether a given variable is | 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
Tip: From PHP version... | Hotovo |
| is_string ($var) | The | 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
*Note: By default this function will ... | Hotovo |
| json_decode ($json, $assoc, $depth, $options) | Converts a JSON string into a PHP variable. On error, the
| 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 | Hotovo |
| log ($arg, $base) | The | Hotovo |
| log10 ($arg) | The | Hotovo |
| log1p ($number) | The | Hotovo |
| mail ($to, $subject, $message, $additional_headers, $additional_parameters) | The function is used for sending emails. | Hotovo |
| max ($values, $value1, $value2, $...) | The | 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 | Hotovo |
| mb_strpos ($haystack, $needle, $offset, $encoding) | The There is also a | Hotovo |
| mb_strtolower ($str, $encoding) | The | Hotovo |
| mb_strtoupper ($str, $encoding) | The | Hotovo |
| mb_substr ($str, $start, $length, $encoding) | The | Hotovo |
| min ($values, $value1, $value2, $...) | The | 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 | 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 | Hotovo |
| parse_str ($encoded_string, &$result) | The 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 Returns an associative array with following elements:
| Hotovo |
| password_hash ($password, $algo, $options) | The 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) |
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 Warning: Do not output | Hotovo |
| phpversion ($extension) | The function gets the current PHP version or the version of a given extension. | Hotovo |
| pow ($base, $exp) | The | Hotovo |
| preg_match ($pattern, $subject, &$matches, $flags, $offset) | The Warning: For testing the return value use the
| Hotovo |
| printf ($format, $args, $...) | The 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 This function also prints | Hotovo |
| rad2deg ($number) | The | Hotovo |
| rand ($min, $max) | The The function can be called without parameters, so it returns a value between
0 and | Hotovo |
| random_bytes ($length) |
As a source of entropy is used | Hotovo |
| random_int () |
The interval in which the generated numbers will be can be set using the
| Hotovo |
| round ($val, $precision, $mode) | The | 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
| Hotovo |
| session_encode () | This function encodes the contents of the Note!: Before you call this function, you have to call the
| 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
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 | Hotovo |
| session_start ($options) | This function creates a session environment. Note!
| Hotovo |
| session_status () | The function is used to get the status of the current session. | Hotovo |
| session_unset () | The Note: Use the | 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 | 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 | Hotovo |
| sha1 ($str, $raw_output) | The 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 | Hotovo |
| sinh ($arg) | The | Hotovo |
| sleep ($seconds) | The If it's needed to stop the script for microseconds, the | 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 | Hotovo |
| strcmp ($str1, $str2) | The The first two parameters must be strings, otherwise the function can return misleading re... | Hotovo |
| strip_tags ($str, $allowable_tags) | The function | Hotovo |
| strlen ($string) | The 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 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 | 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 | Hotovo |
| str_pad ($pad_length, $pad_string) |
/---co... | Hotovo |
| str_repeat ($input, $multiplier) | The | 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 | Hotovo |
| tanh ($arg) | The | Hotovo |
| trim ($str, $character_mask) | The | 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 | 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 | Hotovo |
| urldecode ($str) | Decodes a string encoded in the URL-friendly form into the normal string representation. Note: Do not use this function on | 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. | Hotovo |
| usleep ($micro_seconds) | The | 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 | Hotovo |
