ZEND_GET_MODULE(ctype)
#endif
-#ifndef PHP_EXPERIMENTAL
-#define PHP_EXPERIMENTAL(x, y)
-#endif
-
/* {{{ PHP_MINFO_FUNCTION
*/
PHP_MINFO_FUNCTION(ctype)
Checks for alphanumeric character(s) */
PHP_FUNCTION(ctype_alnum)
{
- PHP_EXPERIMENTAL("4.0.4dev", NULL)
- zval **c;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &c) == FAILURE){
- WRONG_PARAM_COUNT;
- }
+ zval *c;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &c) == FAILURE)
+ return;
- if(ctype(isalnum, c)) {
+ if(ctype(isalnum, &c)) {
RETURN_TRUE;
}
Checks for alphabetic character(s) */
PHP_FUNCTION(ctype_alpha)
{
- PHP_EXPERIMENTAL("4.0.4dev", NULL)
- zval **c;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &c) == FAILURE){
- WRONG_PARAM_COUNT;
- }
+ zval *c;
- if(ctype(isalpha, c)) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &c) == FAILURE)
+ return;
+
+ if(ctype(isalpha, &c)) {
RETURN_TRUE;
}
Checks for control character(s) */
PHP_FUNCTION(ctype_cntrl)
{
- PHP_EXPERIMENTAL("4.0.4dev", NULL)
- zval **c;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &c) == FAILURE){
- WRONG_PARAM_COUNT;
- }
+ zval *c;
- if(ctype(iscntrl, c)) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &c) == FAILURE)
+ return;
+
+ if(ctype(iscntrl, &c)) {
RETURN_TRUE;
}
Checks for numeric character(s) */
PHP_FUNCTION(ctype_digit)
{
- PHP_EXPERIMENTAL("4.0.4dev", NULL)
- zval **c;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &c) == FAILURE){
- WRONG_PARAM_COUNT;
- }
+ zval *c;
- if(ctype(isdigit, c)) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &c) == FAILURE)
+ return;
+
+ if(ctype(isdigit, &c)) {
RETURN_TRUE;
}
Checks for lowercase character(s) */
PHP_FUNCTION(ctype_lower)
{
- PHP_EXPERIMENTAL("4.0.4dev", NULL)
- zval **c;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &c) == FAILURE){
- WRONG_PARAM_COUNT;
- }
+ zval *c;
- if(ctype(islower, c)) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &c) == FAILURE)
+ return;
+
+ if(ctype(islower, &c)) {
RETURN_TRUE;
}
Checks for any printable character(s) except space */
PHP_FUNCTION(ctype_graph)
{
- PHP_EXPERIMENTAL("4.0.4dev", NULL)
- zval **c;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &c) == FAILURE){
- WRONG_PARAM_COUNT;
- }
+ zval *c;
- if(ctype(isgraph, c)) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &c) == FAILURE)
+ return;
+
+ if(ctype(isgraph, &c)) {
RETURN_TRUE;
}
Checks for printable character(s) */
PHP_FUNCTION(ctype_print)
{
- PHP_EXPERIMENTAL("4.0.4dev", NULL)
- zval **c;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &c) == FAILURE){
- WRONG_PARAM_COUNT;
- }
+ zval *c;
- if(ctype(isprint, c)) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &c) == FAILURE)
+ return;
+
+ if(ctype(isprint, &c)) {
RETURN_TRUE;
}
Checks for any printable character which is not whitespace or an alphanumeric character */
PHP_FUNCTION(ctype_punct)
{
- PHP_EXPERIMENTAL("4.0.4dev", NULL)
- zval **c;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &c) == FAILURE){
- WRONG_PARAM_COUNT;
- }
+ zval *c;
- if(ctype(ispunct, c)) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &c) == FAILURE)
+ return;
+
+ if(ctype(ispunct, &c)) {
RETURN_TRUE;
}
Checks for whitespace character(s)*/
PHP_FUNCTION(ctype_space)
{
- PHP_EXPERIMENTAL("4.0.4dev", NULL)
- zval **c;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &c) == FAILURE){
- WRONG_PARAM_COUNT;
- }
+ zval *c;
- if(ctype(isspace, c)) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &c) == FAILURE)
+ return;
+
+ if(ctype(isspace, &c)) {
RETURN_TRUE;
}
Checks for uppercase character(s) */
PHP_FUNCTION(ctype_upper)
{
- PHP_EXPERIMENTAL("4.0.4dev", NULL)
- zval **c;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &c) == FAILURE){
- WRONG_PARAM_COUNT;
- }
+ zval *c;
- if(ctype(isupper, c)) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &c) == FAILURE)
+ return;
+
+ if(ctype(isupper, &c)) {
RETURN_TRUE;
}
Checks for character(s) representing a hexadecimal digit */
PHP_FUNCTION(ctype_xdigit)
{
- PHP_EXPERIMENTAL("4.0.4dev", NULL)
- zval **c;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &c) == FAILURE){
- WRONG_PARAM_COUNT;
- }
+ zval *c;
- if(ctype(isxdigit, c)) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &c) == FAILURE)
+ return;
+
+ if(ctype(isxdigit, &c)) {
RETURN_TRUE;
}