Online PHP Function(s){ #Test PHP functions online!; }

  •  
 

String Manipulation

You can find a lot of functions for string manipulation here.

addcslashes Returns a string with backslashes before characters that are listed in charlist parameter.
addslashes Quote string with slashes
bindec Returns the decimal equivalent of the binary number represented by the binary_string argument.
chunk_split chunk_split — Split a string into smaller chunks
decbin Returns a string containing a binary representation of the given number argument.
dechex Returns a string containing a hexadecimal representation of the given number argument.
escapeshellarg Escape a string to be used as a shell argument
escapeshellcmd Escape shell metacharacters
filter_input Gets a specific external variable by name and optionally filters it
fprintf Write a string produced according to format to the stream resource specified by handle.
hebrev Convert logical Hebrew text to visual text
hex2bin Convert hex to binary
highlight_string Outputs or returns a syntax highlighted version of the given PHP code using the colors defined in the built-in syntax highlighter for PHP.
htmlentities htmlentities — Convert all applicable characters to HTML entities
htmlspecialchars Convert special characters to HTML entities
htmlspecialchars_decode Convert special HTML entities back to characters
html_entity_decode html_entity_decode() is the opposite of htmlentities() in that it converts all HTML entities in the string to their applicable characters.
iconv_mime_decode Decodes a MIME header field.
iconv_mime_decode_headers Decodes multiple MIME header fields at once.
iconv_mime_encode Composes and returns a string that represents a valid MIME header field.
iconv_strlen In contrast to strlen(), iconv_strlen() counts the occurrences of characters in the given byte sequence str on the basis of the specified character set, the result of which is not necessarily identical to the length of the string in byte.
iconv_substr Cuts a portion of str specified by the offset and length parameters.
inet_ntop Converts a packed internet address to a human readable representation
inet_pton Converts a human readable IP address to its packed in_addr representation
ip2long The function ip2long() generates an IPv4 Internet network address from its Internet standard format (dotted string) representation.
lcfirst Make a string's first character lowercase
levenshtein Calculate Levenshtein distance between two strings
long2ip Converts an (IPv4) Internet network address into a string in Internet standard dotted format
ltrim Strip whitespace (or other characters) from the beginning of a string
money_format Formats a number as a currency string
nl2br nl2br — Inserts HTML line breaks before all newlines in a string
number_format number_format — Format a number with grouped thousands
ord Return ASCII value of character.
output_add_rewrite_var output_add_rewrite_var — Add URL rewriter values
output_reset_rewrite_vars output_reset_rewrite_vars — Reset URL rewriter values
pack Pack given arguments into binary string according to format.
printf Produces output according to format.
quoted_printable_decode Convert a quoted-printable string to an 8 bit string
quoted_printable_encode Convert a 8 bit string to a quoted-printable string
quotemeta Quote meta characters
rawurldecode Decode URL-encoded strings
rawurlencode URL-encode according to RFC 3986
rtrim Strip whitespace (or other characters) from the end of a string
sprintf Returns a string produced according to the formatting string format.
sscanf sscanf — Parses input from a string according to a format
stripcslashes Un-quote string quoted with addcslashes()
stripslashes Un-quotes a quoted string
strip_tags Strip HTML and PHP tags from a string
strlen Returns the length of the given string
strncasecmp Binary safe case-insensitive string comparison of the first n characters
strrev Reverse a string
strtok Tokenize string
strtolower Make a string lowercase
strtoupper Returns string with all alphabetic characters converted to uppercase.
strtr Translate characters or replace substrings
strval Get string value of a variable
str_getcsv Parse a CSV string into an array
str_pad Pad a string to a certain length with another string
str_repeat Repeat a string
str_replace Replace all occurrences of the search string with the replacement string
str_rot13 Perform the rot13 transform on a string
str_shuffle Randomly shuffles a string
str_split Convert a string to an array
str_word_count Return information about words used in a string
substr Return part of a string
substr_replace Replace text within a portion of a string
trim Strip whitespace (or other characters) from the beginning and end of a string
ucfirst Make a string's first character uppercase
ucwords Uppercase the first character of each word in a string
unpack Unpacks from a binary string into an array according to the given format.
urldecode Decodes URL-encoded string
urlencode URL-encodes string
utf8_decode Converts a string with ISO-8859-1 characters encoded with UTF-8 to single-byte ISO-8859-1
utf8_encode Encodes an ISO-8859-1 string to UTF-8
vfprintf Write a string produced according to format to the stream resource specified by handle.
vprintf Display array values as a formatted string according to format (which is described in the documentation for sprintf()).
vsprintf Operates as sprintf() but accepts an array of arguments, rather than a variable number of arguments.
wordwrap Wraps a string to a given number of characters




 
 
 
      © 2017 OnlinePHPFunctions.com | Disclaimer |       PHP versions: 7.1.0, 7.0.14, 7.0.5, 7.0.4, 7.0.3, 7.0.2, 7.0.1, 5.6.29, 5.6.20, 5.6.19, 5.6.18, 5.6.17, 5.6.2, 5.5.34, 5.5.33, 5.5.32, 5.5.31, 5.5.18, 5.5.5, 5.5.0.a6, 5.5.0.a.5, 5.5.0.a.2, 5.4.34, 5.4.21, 5.4.13, 5.4.12, 5.4.11, 5.4.10, 5.4.9, 5.4.8, 5.4.7, 5.4.6, 5.4.5, 5.4.4, 5.4.3, 5.4.2, 5.4.1, 5.4.0, 5.3.29, 5.3.27, 5.3.23, 5.3.22, 5.3.21, 5.3.20, 5.3.19, 5.3.18, 5.3.17, 5.3.16, 5.3.15, 5.3.14, 5.3.13, 5.3.12, 5.3.11, 5.3.10, 5.3.2, 5.3.1, 5.3.0, 5.2.17, 5.2.16, 5.1.6, 5.1.5, 5.0.5, 5.0.4, 4.4.9