Skip to content

Added documentation for missing ctype extension #3601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions reference/constraints/Type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,23 @@ as determined by PHP's ``is_`` functions.
* `scalar <http://php.net/is_scalar>`_
* `string <http://php.net/is_string>`_

Also, you can use ``ctype_`` functions from corresponding `built-in PHP extension <http://php.net/book.ctype.php>`_.
Consider `a list of ctype functions <http://php.net/ref.ctype.php>`_:

* `alnum <http://php.net/function.ctype-alnum.php>`_
* `alpha <http://php.net/function.ctype-alpha.php>`_
* `cntrl <http://php.net/function.ctype-cntrl.php>`_
* `digit <http://php.net/function.ctype-digit.php>`_
* `graph <http://php.net/function.ctype-graph.php>`_
* `lower <http://php.net/function.ctype-lower.php>`_
* `print <http://php.net/function.ctype-print.php>`_
* `punct <http://php.net/function.ctype-punct.php>`_
* `space <http://php.net/function.ctype-space.php>`_
* `upper <http://php.net/function.ctype-upper.php>`_
* `xdigit <http://php.net/function.ctype-xdigit.php>`_
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of the links, you should use the :phpfunction: role:

* :phpfunction:`ctype_alnum`
* :phpfunction:`ctype_alpha`
* ...

Or if you don't want to use the function name:

* :phpfunction:`alnum <ctype_alnum>`
* :phpfunction:`alpha <ctype_alpha>`
* ...


Make sure that proper `locale <http://php.net/function.setlocale.php>`_ is set before using one of those.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure that the proper...

... before using one of these.


message
~~~~~~~

Expand Down