tronic          Sun Feb  3 20:22:10 2002 EDT

  Modified files:              
    /phpdoc/ru/appendices       migration.xml 
  Log:
  Translation done.
  
Index: phpdoc/ru/appendices/migration.xml
diff -u /dev/null phpdoc/ru/appendices/migration.xml:1.4
--- /dev/null   Sun Feb  3 20:22:10 2002
+++ phpdoc/ru/appendices/migration.xml  Sun Feb  3 20:22:10 2002
@@ -0,0 +1,402 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<!-- $Revision: 1.4 $ -->
+<appendix id="migration">
+ <title>������� �� PHP/FI 2 � PHP 3</title>
+
+ <section id="migration.about">
+  <title>� ���������������� � 3.0</title>
+
+  <simpara>
+   PHP 3.0 ��������� � '����'. �� �������� � ���� ����������� ����������,
+   ������� �������� ����� ���������� � ��������� �����������, ���
+   � 2.0. 3.0 ����� �������� ������� ����� ������� � ����������
+   ������ ������. ������, �������� ��������� �� ��������������
+   ��������� �� ����� ������� �� ����� ��������� � ��������
+   ������������� ��� � ����������, ��� � � ����������������.
+  </simpara>
+
+  <simpara>
+   ����� ����, ������������ PHP � ������ 3.0 ����������� ������� 
+   ����������� ������� ��� ���������, ��� � ��������� �����,
+   ��� ����� ����� �������� ��������� ���������������. � �����
+   ������, �� ��������, ��� ��� ��������� �������� ������ � �������.
+  </simpara>
+
+  <simpara>
+   ��� ����� �������� �������� ������� ���������������, � ��������
+   �� ������ ����������� ��� �������� �� PHP/FI 2.0 � PHP 3.0 �
+   ������ ��� ������ ��. ����� ����������� ����� �� �����������,
+   �� ����������� ����������� �������.
+  </simpara>
+
+  <simpara>
+   ���������� ��������� ��������������, ������� �������� �������������
+   ������������� ���� ������ ������� ��� PHP/FI 2.0. ��� ��������� �
+   ����������� <filename class="directory">convertor</filename> ������������
+   PHP 3.0. ��� ��������� ������ ��������� �������������� ��������������,
+   ������� � ����� ������ ��� ����� ����������� ��������� ��� �����.
+  </simpara>
+ </section>
+
+ <section id="migration.startendtags">
+  <title>�����������/����������� ����</title>
+
+  <para>
+   ������������ ����������� � ����������� ����, ��������, ������, ��� ��
+   ��������. ������� ����� <literal>&lt;? &gt;</literal> ���� ��������
+   ����� ������:
+   <example>
+    <title>�������: ������� �����������/����������� ����</title>
+    <programlisting role="php">
+<![CDATA[
+<? echo "��� ��� PHP/FI 2.0.\n"; ?>
+]]>
+    </programlisting>
+   </example>
+   � ������ 2.0 PHP/FI ����� ������������ ����� �������:
+   <example>
+    <title>�������: ������ ������� �����������/����������� �����</title>
+    <programlisting role="php">
+<![CDATA[
+<? echo "��� ��� PHP 3.0!\n"; ?>
+]]|
+    </programlisting>
+   </example>
+
+   �������� ��������, ��� ������ ����������� ��� ������� ��
+   ��������������� ����� � ������� '������' ������ ������ �������
+   '������'. ������, ���� �� ���������� ������������ XML,
+   � ��� ����� ���������� �������� � �������������� �������
+   ��������, ��������� PHP ������ ���������� ��������� ��������
+   XML ��� ��� PHP. ���������� �����, ��� ������ ��� ����
+   �������:
+
+   <example>
+    <title>�������: ������ ������� �����������/����������� �����</title>
+    <programlisting role="php">
+<![CDATA[
+<?php echo "��� ��� PHP 3.0!\n"; ?>
+]]>
+    </programlisting>
+   </example>
+
+   ��������� ������������ ������������ � ���������� ��� �������������
+   ����������, ������� ������ �� ������������ ����������� ����������.
+   ����� ����������, ��������, �������� Microsoft FrontPage; �, �����
+   ���������� �� ������� ��������� ����, ��� ������ ��������� �������:
+
+   <example>
+    <title>�������: ������ ������� �����������/����������� �����</title>
+    <programlisting role="php">
+<![CDATA[
+<script language="php">
+
+  echo "��� ��� PHP 3.0!\n";
+
+</script>
+]]>
+    </programlisting>
+   </example>
+  </para>
+ </section>
+
+ <section id="migration.if-endif">
+  <title>��������� if..endif</title>
+
+  <para>
+   �������������� ������ �������� �������� � ������� ����������
+   if/elseif/else, ��������� if(); elseif(); else; endif; �� ����
+   �� ���� ����������� ��� ���������� ��������������� �����������
+   ������ 3.0. ������� ��������� ��� �������:
+   <example>
+    <title>�������: ������� ��������� if..endif</title>
+    <programlisting role="php">
+<![CDATA[
+if ($foo);
+    echo "����\n";
+elseif ($bar);
+    echo "�����\n";
+else;
+    echo "���\n";
+endif;
+]]>
+    </programlisting>
+   </example>
+   <example>
+    <title>�������: ����� ��������� if..endif</title>
+    <programlisting role="php">
+<![CDATA[
+if ($foo):
+    echo "����\n";
+elseif ($bar):
+    echo "�����\n";
+else:
+    echo "���\n";
+endif;
+]]>
+    </programlisting>
+   </example>
+
+   �������� ��������, ��� ����� � �������� ���� �������� ��
+   ��������� �� ���� ���������� ����� ������������ ��������� (endif).
+  </para>
+ </section>
+
+ <section id="migration-while">
+  <title>��������� while</title>
+  <para>
+   ��� � � ������ � if..endif, ��������� while..endwhile ���������
+   as well:
+   <example>
+    <title>�������: ������� ��������� while..endwhile</title>
+    <programlisting role="php">
+<![CDATA[
+while ($more_to_come);
+    ...
+endwhile;
+]]>
+    </programlisting>
+   </example>
+   <example>
+    <title>�������: ����� ��������� while..endwhile</title>
+    <programlisting role="php">
+<![CDATA[
+while ($more_to_come):
+    ...
+endwhile;
+]]>
+    </programlisting>
+   </example>
+  </para>
+  <warning>
+   <simpara>
+    ���� �� ������ ������������ � PHP 3.0 ������� ���������
+    while..endwhile syntax, ����������� ����� ����������� ����.
+   </simpara>
+  </warning>
+ </section>
+
+ <section id="migration.expr">
+  <title>���� ���������</title>
+  <simpara>
+   � ������ PHP/FI 2.0 ��� ����������� ���� ���������� ��������������
+   ����� ����� ���������. PHP 3.0 ��� ����������� ����� ����������
+   ��������� �� �������� ��� ����� ���������, ��� ����� ��������
+   ���������� �������� ������ 2.0 � ��������������� �����������.
+  </simpara>
+  <para>
+   ���������� ��������� ������:
+   <informalexample>
+    <programlisting role="php">
+<![CDATA[
+$a[0]=5;
+$a[1]=7;
+
+$key = key($a);
+while ("" != $key) {
+    echo "$keyn";
+    next($a);
+}
+]]>
+    </programlisting>
+   </informalexample>
+
+   � PHP/FI 2.0 ���� ������ ������� �� ��� ������� $a.  � PHP 3.0
+   ������ ������ �� �� �������. �������� ����� �������� ��,
+   ��� � PHP 2.0, ��-�� ����, ��� ����� ����� ��������� ��������
+   �������, ����������� ��������� ���������, � ���������� ����
+   <literal>""</literal> �� ���� ����� <literal>"0"</literal>,
+   � ������� ����� �����������. � PHP 3.0, ����� ������
+   ������������ � ������������� ���������, ���������� �������������
+   ��������� (������ ������������� � ������������� ���������);
+   � ���������� ���� ���������� ��������� <literal>atoi("")</literal>,
+   �������� ���� ��������� <literal>0</literal>, � <literal>variablelist</literal>,
+   ��� ����� ��������� <literal>0</literal>, �, ��������� <literal>0==0</literal>,
+   ������� ����� �� ����������� � ���� ����������.
+  </para>
+  <para>
+   ���������� ������� ������� ���� ��������. �������� �������� while ��:
+   <informalexample>
+    <programlisting role="php">
+<![CDATA[
+while ((string)$key != "") {
+]]>
+    </programlisting>
+   </informalexample>
+  </para>
+ </section>
+
+ <section id="migration.errors">
+  <title>��������� � ���������� �� �������</title>
+  <simpara>
+   ��������� �� ������� � PHP 3.0 ������ �������� ����� ������ ����������,
+   ������ � 2.0, ��, ������ � ���, �� �� ������� ������ �������
+   �������� ����, ������� �������� ������������� ������; ������ �����
+   �� ������ ���������������� �� ����� ����� � ������ ������, ����������
+   ������� ����� �������� ��������� ������.
+  </simpara>
+ </section>
+
+ <section id="migration.booleval">
+  <title>�������� ���������� ���������� �������</title>
+  <simpara>
+   � PHP 3.0 ����� ����� �������� ���������� ���������� �������.
+   ��� ��������, ��� � ���������, �������� <literal>(1 || test_me())</literal>,
+   ������� <function>test_me</function> �� ����� ���������, ���������
+   ����� �� ������ �������� ��������� ���������� ��������� �����
+   <literal>1</literal>.
+  </simpara>
+
+  <simpara>
+   ��� �������������� ���������������, ��, ��� �� �����, ��� �����
+   ����������� �������� ����������� �������� ��������.
+  </simpara>
+ </section>
+
+ <section id="migration.truefalse">
+  <title>��������, ������������ �������� &true;/&false;</title>
+  <simpara>
+   ���������� ����������� ���������� ������� ���� �������� �����
+   �������, ��� ��� �������� ���������� ��� ���������� &true;
+   � &false; ��� ��������� ����������, ��� ������������� 0 � -1 �
+   PHP/FI 2.0. ����� ��������� ������� ��������� ��������� � �������
+   ������� �������� ���, �������� <literal>$fp = fopen("/your/file") or
+   fail("darn!");</literal>. ���������� ����, ��� � PHP/FI 2.0 �����������
+   ������ �������, ������������ ������������ ��������� �������� �
+   ���������� �� ���������� ����������, ����������� ����� ��������
+   ������ ���� ��������� ������� ����� ������������� ���������������
+   �������� ������ 2.0 � ������ 3.0.
+  </simpara>
+  <para>
+   <example>
+    <title>������� �� 2.0: ������������ ��������, ������� ���</title>
+    <programlisting role="php">
+<![CDATA[
+$fp = fopen($file, "r");
+if ($fp == -1);
+    echo("������ �������� ����� $file ��� ������<br>\n");
+endif;
+]]|
+    </programlisting>
+   </example>
+   <example>
+    <title>������� �� 2.0: ������������ ��������, ����� ���</title>
+    <programlisting role="php">
+<![CDATA[
+$fp = @fopen($file, "r") or print("������ �������� ����� $file ��� ������<br>\n");
+]]>
+    </programlisting>
+   </example>
+  </para>
+ </section>
+
+ <section id="migration-other">
+  <title>������ ���������������</title>
+
+  <itemizedlist>
+   <listitem><simpara>
+    Apache-������ PHP 3.0 ������ �� ������������ Apache ������
+    ����� ������, ��� 1.2. ��� ������ ��������� Apache 1.2 ���
+    ����� ������� ������.
+   </simpara></listitem>
+
+   <listitem><simpara>
+    <function>echo</function> ������ �� ��������� �������������� �����.
+    ����������� <function>printf</function> ��� ���� ����.
+   </simpara></listitem>
+
+   <listitem><simpara>
+    � PHP/FI 2.0 �������� ������ ���������������� �������� � ����, ��� 
+    <literal>$foo[0]</literal> ����� �� �� ��������, ��� �
+    <literal>$foo</literal>. ���� ������� ��� ��������� � PHP 3.0.
+   </simpara></listitem>
+
+   <listitem>
+    <simpara>
+     ������ �������� � �������������� <literal>$array[]</literal> ������
+     �� ��������������.
+    </simpara>
+    <simpara>
+     ��� ��������, ��� �� �� ������ ��������� ������ � ��������������
+     �����, ������������ <literal>$data = $array[]</literal>. �����������
+     <function>current</function> � <function>next</function> ��� ���� ����.
+    </simpara>
+    <simpara>
+     �����, <literal>$array1[] = $array2</literal> �� ���������
+     �������� <literal>$array2</literal> �
+     <literal>$array1</literal>, � ���������
+     <literal>$array2</literal> � �������� ���������� ��������
+     <literal>$array1</literal>. ������������ ����� � ����������
+     �������������� ��������.
+    </simpara>
+   </listitem>
+
+   <listitem>
+    <simpara>
+     <literal>"+"</literal> ������ �� �������� ������������� ���������� 
+     ������������ �� ��������� � �������, ������ ����� �� �����������
+     �� �������� � ������������� ��������� � ���������� ��������
+     ��������. ��� ������������ ����� ����������� <literal>"."</literal>.
+    </simpara>
+   </listitem>
+  </itemizedlist>
+
+  <example>
+   <title>������� �� 2.0: ������������ �����</title>
+   <programlisting role="php">
+<![CDATA[
+echo "1" + "1";
+]]>
+   </programlisting>
+   <para> 
+    � PHP 2.0 ���� ������ ������� 11, � PHP 3.0 -
+    2. �����������:
+    <programlisting role="php">
+<![CDATA[
+echo "1"."1";
+]]>
+    </programlisting>
+    <programlisting role="php">
+<![CDATA[
+$a = 1;
+$b = 1;
+echo $a + $b;
+]]>
+    </programlisting>
+   </para>
+   <para>
+    ���� ������ ������� 2 � � PHP 2.0 � � PHP 3.0.
+    <programlisting role="php">
+<![CDATA[
+$a = 1;
+$b = 1;
+echo $a.$b;
+]]>
+    </programlisting>
+    ���� ������ ������� 11 � PHP 3.0.
+   </para>
+  </example>
+ </section>
+
+</appendix>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+sgml-parent-document:nil
+sgml-default-dtd-file:"../../manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->


Reply via email to