ctype_punct(3) php man page | unix.com

Man Page: ctype_punct

Operating Environment: php

Section: 3

CTYPE_PUNCT(3)								 1							    CTYPE_PUNCT(3)

ctype_punct - Check for any printable character which is not whitespace or an alphanumeric character

SYNOPSIS
bool ctype_punct (string $text)
DESCRIPTION
Checks if all of the characters in the provided string, $text, are punctuation character.
PARAMETERS
o $text - The tested string.
RETURN VALUES
Returns TRUE if every character in $text is printable, but neither letter, digit or blank, FALSE otherwise.
EXAMPLES
Example #1 A ctype_punct(3) example <?php $strings = array('ABasdk!@!$#', '!@ # $', '*&$()'); foreach ($strings as $testcase) { if (ctype_punct($testcase)) { echo "The string $testcase consists of all punctuation. "; } else { echo "The string $testcase does not consist of all punctuation. "; } } ?> The above example will output: The string ABasdk!@!$# does not consist of all punctuation. The string !@ # $ does not consist of all punctuation. The string *&$() consists of all punctuation.
NOTES
Note If an integer between -128 and 255 inclusive is provided, it is interpreted as the ASCII value of a single character (negative val- ues have 256 added in order to allow characters in the Extended ASCII range). Any other integer is interpreted as a string contain- ing the decimal digits of the integer.
SEE ALSO
ctype_cntrl(3), ctype_graph(3). PHP Documentation Group CTYPE_PUNCT(3)
Related Man Pages
ctype_digit(3) - php
ctype_alnum(3) - php
ctype_cntrl(3) - php
ctype_lower(3) - php
ctype_space(3) - php
Similar Topics in the Unix Linux Community
TestLink 1.7.2 (Default branch)
Parsing out the logs and generating report
if txtfile has any letters, echo something!
ksh check for non printable characters in a string
Bash - Inserting non printable character(s) in string variable