<HTML ><HEAD ><TITLE >Character type functions</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="Function Reference" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="cyrus_unbind" HREF="function.cyrus-unbind.html"><LINK REL="NEXT" TITLE="ctype_alnum" HREF="function.ctype-alnum.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.cyrus-unbind.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.ctype-alnum.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.ctype" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >XVI. Character type functions</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN15473" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ctype.intro" ></A >Introduction</H1 ><P > The functions provided by this extension check whether a character or string falls into a certain character class according to the current locale (see also <A HREF="function.setlocale.html" ><B CLASS="function" >setlocale()</B ></A >). </P ><P > When called with an integer argument these functions behave exactly like their C counterparts from <TT CLASS="filename" >ctype.h</TT >. </P ><P > When called with a string argument they will check every character in the string and will only return <TT CLASS="constant" ><B >TRUE</B ></TT > if every character in the string matches the requested criteria. When called with an empty string the result will always be <TT CLASS="constant" ><B >TRUE</B ></TT >. </P ><P > Passing anything else but a string or integer will return <TT CLASS="constant" ><B >FALSE</B ></TT > immediately. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ctype.requirements" ></A >Requirements</H1 ><P > None besides functions from the standard C library which are always available. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ctype.installation" ></A >Installation</H1 ><P > Beginning with PHP 4.2.0 these functions are enabled by default. For older versions you have to configure and compile PHP with <TT CLASS="option" >--enable-ctype</TT >. You can disable ctype support with <TT CLASS="option" >--disable-ctype</TT >. </P ><P > The windows version of <TT CLASS="literal" >PHP</TT > has built in support for this extension. You do not need to load any additional extension in order to use these functions.</P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B > Builtin support for ctype is available with PHP 4.3.0. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ctype.configuration" ></A >Runtime Configuration</H1 ><P >This extension has no configuration directives defined in <TT CLASS="filename" >php.ini</TT >.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ctype.resources" ></A >Resource Types</H1 ><P >This extension has no resource types defined.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="ctype.constants" ></A >Predefined Constants</H1 ><P >This extension has no constants defined.</P ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT ><A HREF="function.ctype-alnum.html" >ctype_alnum</A > -- Check for alphanumeric character(s)</DT ><DT ><A HREF="function.ctype-alpha.html" >ctype_alpha</A > -- Check for alphabetic character(s)</DT ><DT ><A HREF="function.ctype-cntrl.html" >ctype_cntrl</A > -- Check for control character(s)</DT ><DT ><A HREF="function.ctype-digit.html" >ctype_digit</A > -- Check for numeric character(s)</DT ><DT ><A HREF="function.ctype-graph.html" >ctype_graph</A > -- Check for any printable character(s) except space</DT ><DT ><A HREF="function.ctype-lower.html" >ctype_lower</A > -- Check for lowercase character(s)</DT ><DT ><A HREF="function.ctype-print.html" >ctype_print</A > -- Check for printable character(s)</DT ><DT ><A HREF="function.ctype-punct.html" >ctype_punct</A > -- Check for any printable character which is not whitespace or an alphanumeric character </DT ><DT ><A HREF="function.ctype-space.html" >ctype_space</A > -- Check for whitespace character(s)</DT ><DT ><A HREF="function.ctype-upper.html" >ctype_upper</A > -- Check for uppercase character(s)</DT ><DT ><A HREF="function.ctype-xdigit.html" >ctype_xdigit</A > -- Check for character(s) representing a hexadecimal digit </DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.cyrus-unbind.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.ctype-alnum.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >cyrus_unbind</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >ctype_alnum</TD ></TR ></TABLE ></DIV ></BODY ></HTML >