svn: /phpdoc/ru/trunk/reference/ctype/functions/ ctype-digit.xml
| From: | Shein Alexey | Date: | Fri, 03 Jun 2011 07:45:56 +0000 |
| Subject: | svn: /phpdoc/ru/trunk/reference/ctype/functions/ ctype-digit.xml | ||
| Groups: | php.doc.ru | ||
| Request: | Send a blank email to doc-ru+get-1864@lists.php.net to get a copy of this message | ||
shein Fri, 03 Jun 2011 07:45:56 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=311754
Log:
Updated translation.
Changed paths:
U phpdoc/ru/trunk/reference/ctype/functions/ctype-digit.xml
Modified: phpdoc/ru/trunk/reference/ctype/functions/ctype-digit.xml
===================================================================
--- phpdoc/ru/trunk/reference/ctype/functions/ctype-digit.xml 2011-06-03 07:39:28 UTC (rev 311753)
+++ phpdoc/ru/trunk/reference/ctype/functions/ctype-digit.xml 2011-06-03 07:45:56 UTC (rev 311754)
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: 1.8 Status: ready $ -->
+<!-- EN-Revision: 300784 Maintainer: shein Status: ready -->
+<!-- Reviewed: no -->
<!-- $Revision$ -->
<refentry xml:id="function.ctype-digit" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>ctype_digit</refname>
- <refpurpose>Проверяет, является ли символ
цифрой</refpurpose>
+ <refpurpose>Проверяет на наличие цифровых символов в
строке</refpurpose>
</refnamediv>
<refsect1 role="description">
@@ -15,7 +16,7 @@
</methodsynopsis>
<para>
Проверяет, являются ли все символы в строке
<parameter>text</parameter>
- цифрами.
+ цифровыми.
</para>
</refsect1>
@@ -43,6 +44,31 @@
</para>
</refsect1>
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>5.1.0</entry>
+ <entry>
+ До версии PHP 5.1.0 эта функция возвращала &true;,
+ если в качестве <parameter>text</parameter>
передавалась пустая строка.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
<refsect1 role="examples">
&reftitle.examples;
<para>
@@ -72,14 +98,51 @@
</screen>
</example>
</para>
+ <para>
+ <example>
+ <title>Пример использования
<function>ctype_digit</function> со сравнением строк и целых
чисел</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+$numeric_string = '42';
+$integer = 42;
+
+ctype_digit($numeric_string); // true
+ctype_digit($integer); // false
+
+is_numeric($numeric_string); // true
+is_numeric($integer); // true
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
</refsect1>
+ <refsect1 role="notes">
+ &reftitle.notes;
+ <note>
+ <para>
+ Для извлечения пользы из работы этой функции ей
необходимо передавать
+ строку (<type>string</type>), поэтому, если ей, к
примеру, будет
+ передан <type>integer</type>, то она возвратит &false;.
Однако,
+ необходимо учитывать, что HTML-формы передают
числовые строки,
+ а не целые числа. Подробнее читайте в разделе
+ "<link linkend="language.types">Типы</link>" данного
руководства.
+ </para>
+ </note>
+ </refsect1>
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>ctype_alnum</function></member>
<member><function>ctype_xdigit</function></member>
+ <member><function>is_numeric</function></member>
+ <member><function>is_int</function></member>
+ <member><function>is_string</function></member>
</simplelist>
</para>
</refsect1>
@@ -96,7 +159,7 @@
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
-sgml-default-dtd-file:"../~/.phpdoc/manual.ced"
+sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil