- utf8_decode – It converts a string with ISO-8859-1 characters encoded with UTF-8 to single-byte ISO-8859-1
- utf8_encode – It encodes an ISO-8859-1 string to UTF-8
- xml_error_string – It returns an error string from the XML parser
- xml_get_current_byte_index – It returns current byte index for an XML parser
- xml_get_current_column_number – It returns current column number for an XML parser
- xml_get_current_line_number – It returns current line number for an XML parser
- xml_get_error_code – It returns XML parser error code
- xml_parse_into_struct – It parses XML data into an array structure
- xml_parse – It parses an XML document
- xml_parser_create_ns – It create an XML parser with namespace support
- xml_parser_create – It create an XML parser
- xml_parser_free – Free an XML parser
- xml_parser_get_option – It returns options from an XML parser
- xml_parser_set_option – It sets options in an XML parser
- xml_set_character_data_handler – It set up character data handler
- xml_set_default_handler – It set up default handler
- xml_set_element_handler – It set up start and end element handlers
- xml_set_end_namespace_decl_handler – It set up end namespace declaration handler
- xml_set_external_entity_ref_handler – It set up external entity reference handler
- xml_set_notation_decl_handler – It set up notation declaration handler
- xml_set_object – It uses XML Parser within an object
- xml_set_processing_instruction_handler – It set up processing instruction (PI) handler
- xml_set_start_namespace_decl_handler – It set up start namespace declaration handler
- xml_set_unparsed_entity_decl_handler – It set up unparsed entity declaration handler
Tag Archives: Functions
String functions
- addcslashes – It returns a string with backslashes in front of the specified characters
- addslashes – It returns a string with backslashes in front of the specified characters
- bin2hex – It convert binary data into hexadecimal representation
- chop – Its an alias of rtrim()
- chr – It returns a character based on ASCII value
- chunk_split – It splits a string into smaller chunks
- convert_cyr_string – It converts from one Cyrillic character set to another
- convert_uudecode – It decodes a uuencoded string
- convert_uuencode – It Uuencode a string
- count_chars – It return information about characters used in a string
- crc32 – It calculates a 32-bit CRC for a string
- crypt – It returns a string encrypted using DES, Blowfish, or MD5 algorithms.
- echo() – It outputs one or more strings
- explode – It splits a string by string
- fprintf – It writes a formatted string to a specified output stream
- get_html_translation_table – It returns the translation table used by htmlspecialchars() and htmlentities()
- hebrev – It converts logical Hebrew text to visual text
- hebrevc -It convert logical Hebrew text to visual text with newline conversion
- hex2bin – It decodes a hexadecimally encoded binary string
- html_entity_decode – It convert all HTML entities to their applicable characters
- htmlentities – It convert all applicable characters to HTML entities
- htmlspecialchars_decode – It convert special HTML entities back to characters
- htmlspecialchars – It convert special characters to HTML entities
- implode – It joins array elements with a string
- join – Its an alias of implode()
- lcfirst – It make a string’s first character lowercase
- levenshtein – It calculate Levenshtein distance between two strings
- localeconv – It returns numeric formatting information
- ltrim – It strips whitespace from the beginning of a string
- md5_file – It calculates the md5 hash of a given file
- md5 – It calculates the md5 hash of a string
- metaphone – It calculate the metaphone key of a string
- money_format – It formats a number as a currency string
- nl_langinfo – It returns specific local information.
- nl2br – It inserts HTML line breaks before all newlines in a string
- number_format – It format a number with grouped thousands
- ord – It return ASCII value of character
- parse_str – It parses the string into variables
- print – It outputs a string
- printf – It output a formatted string
- quoted_printable_decode – It decodes a quoted-printable string to an 8-bit ASCII string
- quoted_printable_encode – It convert a 8 bit string to a quoted-printable string
- quotemeta – It adds backslashes in front of some predefined characters in a string.
- rtrim – It strips whitespace from the end of a string
- setlocale – It sets locale information
- sha1_file – It calculates the SHA-1 hash of a file
- sha1 – It calculates the SHA-1 hash of a file
- similar_text – It calculates the similarity between two strings
- soundex – It calculates the soundex key of a string
- sprintf – It returns a formatted string
- sscanf – It parses input from a string according to a format
- str_getcsv – It parse a CSV string into an array
- str_ireplace – It replaces some characters in a string (case-insensitive)
- str_pad – It pads a string to a certain length with another string
- str_repeat – It repeats a string
- str_replace – It replace all occurrences of the search string with another string
- str_rot13 – It perform the rot13 transform on a string
- str_shuffle – It randomly shuffles a string
- str_split – It convert a string to an array
- str_word_count – It return the number of words in a string
- strcasecmp – It compares two strings (case-insensitive)
- strchr – Its an alias of strstr() and find the first occurrence of a string
- strcmp – It compares two strings
- strcoll – It compares two strings based on locale setting
- strcspn – It returns the number of characters found in a string before any part of the specified characters are found.
- strip_tags – It strips HTML and PHP tags from a string
- stripcslashes – It removes backslashes added by the addcslashes() function
- stripos – It returns the position of the first occurrence of a string inside another string
- stripslashes – It removes backslashes added by the addslashes() function.
- stristr – It find the first occurrence of a string(case insensitive)
- strlen – It find the string length
- strnatcasecmp – It compares two strings using a “natural” algorithm.
- strnatcmp – It compares two strings using a “natural” algorithm.
- strncasecmp – It compares two strings
- strncmp – It compares first n characters (case-sensitive) of a strings
- strpbrk – It searches a string for any of the specified characters.
- strpos – It finds the position of the first occurrence of a substring in a string
- strrchr – It finds the last occurrence of a character in a string
- strrev – It reverse a string
- strripos – It find the position of the last occurrence of a substring in a string(case-insensitive)
- strrpos – It finds the position of the last occurrence of a substring in a string
- strspn – It returns the number of characters found in the string that contains only characters from the charlist.
- strstr – It finds the first occurrence of a string
- strtok – It splits a string into smaller strings
- strtolower – It makes a string lowercase
- strtoupper – It makes a string uppercase
- strtr – It translate characters or replace substrings
- substr_compare – It compares two strings from a specified start position
- substr_count – It counts the number of substring occurrences
- substr_replace – It replace text within a portion of a string
- substr – It returns part of a string
- trim – It strips whitespace from the beginning and end of a string
- ucfirst – It make a string’s first character uppercase
- ucwords – It converts the first character of each word in a string to uppercase
- vfprintf – It writes a formatted string to a specified output stream
- vprintf – It output a formatted string
- vsprintf – It return a formatted string
- wordwrap – It wraps a string into new lines when it reaches a specific length.
SimpleXML functions
- __construct() – It creates a new SimpleXMLElement object.
- addAttribute() – It adds an attribute to the SimpleXML element
- addChild() – It adds a child element the SimpleXML element
- asXML() – It returns XML string from a SimpleXML element
- attributes() – It returns a SimpleXML element’s attributes
- children() – It returns the children of a specified node
- getDocNamespaces() – It returns the children of a specified node
- getName() – It returns the name of a SimpleXML element
- getNamespace() – It returns the namespaces from XML data
- registerXPathNamespace() – It creates a namespace context for the next XPath query
- simplexml_import_dom() – It returns SimpleXMLElement object from a DOM node
- simplexml_load_file() – It returns SimpleXMLElement object from an XML document
- simplexml_load_string() – It returns SimpleXMLElement object from an XML string
- xpath() – It runs an XPath query on XML data
Misc functions
- connection_aborted() – It checks whether the client has disconnected.
- connection_status() – It returns the current connection status
- connection_timeout() – It checks if the script timed out
- constant() – It returns the value of a constant
- define() – It defines a constant
- defined() – It checks whether a given named constant exists
- die() – Its an alias of the exit() and prints a message and exits the current script
- eval() – It evaluates a string as PHP code.
- exit() – It output a message and terminate the current script
- get_browser() – It returns the capabilities of the user’s browser
- __halt_compiler() – It halts the compiler execution
- highlight_file() – It outputs a file with the PHP syntax highlighted
- highlight_string() – It outputs a string with the PHP syntax highlighted
- ignore_user_abort() – It sets whether a remote client can abort the running of a script
- pack() – It packs data into a binary string
- php_check_syntax() – It heck the PHP syntax of the specified file
- php_strip_whitespace() – It returns the source code of a file with PHP comments and whitespace removed
- show_source() – Its an alias of highlight_file() and outputs a file with the PHP syntax highlighted
- sleep() – It delays execution
- sys_getloadavg() – It returns system load average
- time_nanosleep() – It delay for a number of seconds and nanoseconds
- time_sleep_until() – It makes the script sleep until the specified time
- uniqid() – It generates a unique ID
- unpack() – It unpacks data from binary string
- usleep() – It delays execution in microseconds
Mail functions
- ezmlm_hash() – It calculates the hash value needed by EZMLM
- mail() – It can be used to send email
Zip functions
- zip_close – It closes a zip archive opened by the zip_open() function
- zip_entry_close – It closes an entry in the ZIP file
- zip_entry_compressedsize – It returns the compressed size of a directory entry
- zip_entry_compressionmethod – It returns the compression method of a directory entry
- zip_entry_filesize – It returns the actual file size of an entry in the ZIP file
- zip_entry_name – It returns the name of an entry in the ZIP file
- zip_entry_open – It opens an entry in the ZIP file for reading
- zip_entry_read – It reads from an open entry in the ZIP file
- zip_open – It opens a ZIP file
- zip_read – It reads the next entry in a ZIP file
LibXML functions
- libxml_clear_errors – It clears the libxml error buffer
- libxml_disable_entity_loader – It disable the ability to load external entities
- libxml_get_errors – It returns array of errors
- libxml_get_last_error – It returns last error from libxml
- libxml_set_external_entity_loader – It changes the default external entity loader
- libxml_set_streams_context – It set the streams context for the next libxml document load or write
- libxml_use_internal_errors – It disable libxml errors and allow user to fetch error information as needed
HTTP functions
- header() – It sends a raw HTTP header to a client.
- headers_list() – It returns a list of response headers sent
- headers_sent() – It checks whether headers have been sent .
- setcookie() – It sends an HTTP cookie to a client
- setrawcookie() – It sends an HTTP cookie without URL encoding the cookie value
FTP functions
- ftp_alloc – It allocates space for a file to be uploaded
- ftp_cdup – It changes to the parent directory
- ftp_chdir – It changes the current directory on a FTP server
- ftp_chmod – It sets permissions on a file via FTP
- ftp_close – It closes an FTP connection
- ftp_connect – It opens an FTP connection
- ftp_delete – It deletes a file on the FTP server
- ftp_exec – It requests execution of a command on the FTP server
- ftp_fget – It downloads a file from the FTP server and saves to an open file
- ftp_fput – It uploads from an open file to the FTP server
- ftp_get_option -It retrieves various runtime behaviours of the current FTP stream
- ftp_get – It downloads a file from the FTP server
- ftp_login – It can be used to log in to an FTP connection
- ftp_mdtm – It returns the last modified time of the given file
- ftp_mkdir – It creates a directory on the FTP server
- ftp_nb_continue – Continues retrieving/sending a file
- ftp_nb_fget – It retrieves a file from the FTP server and writes it to an open file
- ftp_nb_fput – It stores a file from an open file to the FTP server
- ftp_nb_get – It retrieves a file from the FTP server and writes it to a local file
- ftp_nb_put – It stores a file on the FTP server
- ftp_nlist – It returns a list of files in the given directory
- ftp_pasv – It turns passive mode on or off
- ftp_put – It uploads a file to the FTP server
- ftp_pwd – It returns the current directory name
- ftp_quit – Its an alias ftp_close() and closes ftp conection
- ftp_raw – It sends an arbitrary command to an FTP server
- ftp_rawlist – It returns a detailed list of files in the given directory
- ftp_rename – It renames a file or a directory on the FTP server
- ftp_rmdir – It removes a directory on the FTP server
- ftp_set_option – It sets miscellaneous runtime FTP options
- ftp_site – It sends a SITE command to the server
- ftp_size – It returns the size of the given file
- ftp_ssl_connect – It opens an Secure SSL-FTP connection
- ftp_systype – It returns the system type identifier of the remote FTP server
Filesystem functions
- basename – It returns trailing name component of path
- chgrp – It can be used to change file group
- chmod – It can be used to change file permission
- chown – It can be used to change file ownership
- clearstatcache – It can be used to clears file status cache
- copy – It can be used to copy file
- delete – Check unlink() or unset()
- dirname – It returns parent directory’s path
- disk_free_space – It returns available space on filesystem or disk partition
- disk_total_space – It returns the total size of a filesystem or disk partitio
- diskfreespace – Its an alias of disk_free_space()
- fclose – It closes an open file pointer
- feof – It checks for end-of-file on a file pointer
- fflush – It flushes the output to a file
- fgetc – It returns character from file pointer
- fgetcsv – It returns line from file pointer and parse for CSV fields
- fgets – It returns line from file pointer
- fgetss – It returns line from file pointer and strip HTML tags
- file_exists – It checks whether a file or directory exists
- file_get_contents – It reads entire file
- file_put_contents – It writes a string to a file
- file – It reads entire file into an array
- fileatime – It returns last access time of file
- filectime – It returns inode change time of file
- filegroup – It returns file group
- fileinode – It returns file inode
- filemtime – It returns file modification time
- fileowner – It returns file owner
- fileperms – It returns file permissions
- filesize – It returns file size
- filetype – It returns file type
- flock – It can be used to lock the file
- fnmatch – Match filename against a pattern
- fopen – It opens file or URL
- fpassthru – It outputs all remaining data on a file pointer
- fputcsv – It format line as CSV and write to file pointer
- fputs – Its an alias of fwrite() and writes to a file
- fread – It can be used to read the content from a file
- fscanf – It parses input from a file according to a format
- fseek – It seeks on a file pointer
- fstat – It returns information about a file using an open file pointer
- ftell – It returns the current position of the file pointer
- ftruncate – It truncates a file to a given length
- fwrite – It writes the string to a file
- glob – It finds pathnames matching a pattern
- is_dir – It checks whether the filename is a directory
- is_executable – It checks whether the filename is executable
- is_file – It checks whether the filename is a regular file
- is_link – It checks whether the filename is a symbolic link
- is_readable – It checks whether the file exists and is readable
- is_uploaded_file – It checks whether the file was uploaded via HTTP POST
- is_writable – It checks whether the filename is writable
- is_writeable – Its an Alias of is_writable() and checks whether the filename is writable
- lchgrp – It changes group ownership of symlink
- lchown – It changes user ownership of symlink
- link – It creates a hard link
- linkinfo – It returns information about a link
- lstat – It returns information about a file or symbolic link
- mkdir – It can be used to create directory
- move_uploaded_file – It moves an uploaded file to a new location
- parse_ini_file – It parses a configuration file
- parse_ini_string – It parse a configuration string
- pathinfo – It returns information about a file path
- pclose – It closes process file pointer
- popen – It opens process file pointer
- readfile – It outputs a file
- readlink – It returns the target of a symbolic link
- realpath_cache_get – It returns realpath cache entries
- realpath_cache_size – It returns realpath cache size
- realpath – It returns canonicalized absolute pathname
- rename – It renames a file or directory
- rewind – It rewinds the position of a file pointer
- rmdir – It can be used to remove a directory
- set_file_buffer – Its an alias of stream_set_write_buffer()
- stat – It returns information about a file
- symlink – It creates a symbolic link
- tempnam – It create file with unique file name
- tmpfile – It creates a temporary file
- touch – It sets access and modification time of file
- umask – It changes file permissions of file
- unlink – It deletes the file