Caution
JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.
Dictionary
- Home
- PHP Dictionary
PHP Dictionary Index
| [Setup] PHP Development Environment | Step-by-step guide to setting up an environment for running PHP. |
| strlen() / mb_strlen() | Gets the length of a string. |
| strpos() / strrpos() / mb_strpos() | Searches a string and gets the position of a substring. |
| substr() / mb_substr() | Extracts a portion of a string. |
| str_replace() / str_ireplace() | Replaces a substring within a string. |
| strtolower() / strtoupper() / mb_strtolower() | Converts a string between uppercase and lowercase. |
| trim() / ltrim() / rtrim() | Removes whitespace; deletes whitespace from the start, end, or both sides of a string. |
| explode() / implode() | Converts between strings and arrays bidirectionally. |
| sprintf() / number_format() | Formats strings and numbers. |
| str_pad() / str_repeat() | Pads or repeats a string. |
| strcmp() / strcasecmp() | Compares two strings. |
| htmlspecialchars() / htmlentities() | Escapes HTML characters for XSS prevention. |
| nl2br() / wordwrap() | Handles line breaks and formats text. |
| urlencode() / urldecode() / base64_encode() | Encodes URLs or converts to Base64. |
| array_push() / array_pop() / array_shift() / array_unshift() | Adds or removes elements at the end or beginning of an array. |
| array_splice() / array_slice() | Manipulates or extracts elements at any position in an array. |
| array_merge() / array_combine() | Combines or merges arrays. |
| array_keys() / array_values() / array_column() | Gets the keys or values of an array. |
| array_unique() / array_reverse() / array_pad() | Removes duplicates, reverses, or extends an array. |
| in_array() / array_search() / array_key_exists() | Searches for a value or key within an array. |
| array_intersect() / array_diff() | Gets common elements or differences between arrays. |
| sort() / rsort() / asort() / arsort() | Sorts or reverses an array; a comparison function controls the order of numbers or strings. |
| usort() / uasort() / uksort() | Sorting arrays with a user-defined comparison function. |
| array_map() / array_filter() | Transforming and extracting array values. |
| array_reduce() / array_walk() | Aggregating arrays and processing each element. |
| count() / array_sum() / range() | Counting array elements, summing, and generating ranges. |
| intval() / floatval() / number_format() | Converting values to numbers and formatting them. |
| round() / ceil() / floor() | Rounding numeric values. |
| max() / min() / rand() / random_int() | Getting maximum, minimum values, and generating random numbers. |
| date() / time() / mktime() | Creates a date-time object; gets the current time, a specific date, or a timestamp. |
| strtotime() | Parsing date/time strings. |
| DateTime Class | Object-oriented date and time manipulation. |
| file_get_contents() / file_put_contents() | Reading and writing entire files. |
| fopen() / fread() / fwrite() / fclose() | Stream-based file operations. |
| move_uploaded_file() / is_uploaded_file() | Handling file uploads. |
| file_exists() / is_file() / is_dir() | Checking if a file or directory exists. |
| mkdir() / rmdir() / unlink() / copy() / rename() | Creating, deleting, and manipulating files and directories. |
| basename() / dirname() / pathinfo() / glob() | Getting path information and searching for files. |
| preg_match() / preg_match_all() | Pattern matching with regular expressions. |
| preg_replace() / preg_split() | Replacing and splitting strings with regular expressions. |
| json_encode() / json_decode() | Converting data to and from JSON. |
| isset() / empty() / is_null() | Checking variable existence and empty values. |
| is_array() / is_string() / is_numeric() / gettype() | Determining variable types. |
| (int) / (string) / (array) Cast | Type conversion (casting). |
| session_start() / $_SESSION / session_destroy() | Managing sessions. |
| setcookie() / $_COOKIE | Sending and retrieving cookies. |
| $_GET / $_POST / $_REQUEST | Retrieving request data. |
| $_SERVER | Retrieving server and request information. |
| header() / http_response_code() | Sending HTTP headers and status codes. |
| new PDO() | Connecting to databases. |
| PDO::prepare() / execute() | Prepared statements for executing SQL. |
| PDOStatement::fetch() / fetchAll() | Retrieving query results. |
| PDO::beginTransaction() / commit() / rollBack() | Controlling transactions. |
| try / catch / finally / throw | Basic syntax for exception handling. |
| error_reporting() / set_error_handler() | Error reporting and custom error handlers. |
| echo / print / printf() | Basic output. |
| var_dump() / print_r() / var_export() | Debug output of variables. |
| ob_start() / ob_get_clean() | Output buffering. |
| password_hash() / password_verify() | Hashing and verifying passwords. |
| hash() / md5() / sha1() | Generating hash values. |
| filter_var() / filter_input() | Validating and sanitizing input values. |
| class / new / $this | Defining classes and creating instances. |
| public / private / protected / static | Access modifiers and static methods. |
| extends / implements / abstract / interface | Inheritance, interfaces, and abstract classes. |
| trait / Magic Methods | Traits and special methods. |
| exit() / die() / sleep() | Terminating or pausing a script. |
| define() / defined() / const | Defining and checking constants. |
| random_bytes() / random_int() / uniqid() | Generating random numbers and unique IDs. |
| serialize() / unserialize() | Serializing data. |