shlomi Sat Jan 19 01:14:10 2002 EDT
Added files:
/phpdoc/he/language basic-syntax.xml
Log:
initial translation
Index: phpdoc/he/language/basic-syntax.xml
+++ phpdoc/he/language/basic-syntax.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<chapter id="language.basic-syntax">
<title>����� �����</title>
<!--
NOTE: Last modified: 2001-05-16 13:00 GMT
the language part is currently under heavy revision. Please do not
not make any heavy (i.e. structural) modifications to this part
for a moment.
You'd also better not start any translation yet.
Comments are always welcome at [EMAIL PROTECTED]
Progress:
intro : DOESN'T EXIST - yet?
new chapter, with some introductionary remarks?
Will be discussed on the ML soon.
basic-syntax:
FINISHED
except maybe moving the 'advanced escaping'
to a better place?
TODO:
- nada
types : Being revised. Added all new types
Boolean and Integer are more or less finished.
The rest isn't.
TODO:
- why is $foo[bar] bad syntax?
- what's the difference between unset($bla) and
$bla = NULL; (it is different!)
- $obj->{expr} syntax
- (unset) cast?????
- $bla = unset <== should've been nuked, don't mention it
- $str{offset} syntax, rather than $str[offset]
- read notes and apply when any of them are useful
- remove notes which have been included here.
- ...
the rest: Not yet started with.
TODO:
- ?
oop : has been revised by Kristian, DONE.
-->
<sect1 id="language.basic-syntax.phpmode">
<title>���� ���� HTML ���� PHP</title>
<para>
���� PHP ����� ����, ��� ����� �� ����� ���, �� ����
��� ���� ����� ������� ������� �� �� ��� ����� ������
���� �� PHP. ����� ���� �� �� ������ � PHP ����� �� ����
������ ����, ����� ����� �� ��� ���� ������ ����� ����� ��
��� ����� ����� �� ����� �� ����. ������ �� ����� �� �����
���� ����� HTML: �� �� ����� ������ � PHP ���� ���� ���� ����
��� �� ����� ����� ����� ����.
</para>
<para>
���� ���� ����� ���� �� ����� ������ ������ �� ��� PHP. ���
�� ����� (<?php. . .?> � <script
language="php">. . .</script>).
������ ����. ������ ���� ������ ���� ����� ������ �����
������� <filename>php.ini</filename>.
����� ������ � PHP ������ ������� ������ ASP ���� �����
������, �� �� ������� ������ ���� �������, ������ - ��
������ ���� ��� PHP � XML �� XHTML, ��� ���� ������ ������
������� <?php. . .?> ��� �� ������ �� ����� XML.
</para>
<para>
������ ������� � PHP ��:
</para>
<para>
<example>
<title>����� ����� ���� HTML ���� PHP</title>
<programlisting role="php">
<![CDATA[
1. <? echo ("this is the simplest, an SGML processing instruction\n"); ?>
<?= expression ?> This is a shortcut for "<? echo expression ?>"
2. <?php echo("if you want to serve XHTML or XML documents, do like this\n"); ?>
3. <script language="php">
echo ("some editors (like FrontPage) don't
like processing instructions");
</script>
4. <% echo ("You may optionally use ASP-style tags"); %>
<%= $variable; # This is a shortcut for "<% echo . . ." %>
]]>
</programlisting>
</example>
</para>
<para>
���� ������� ���� �� �� ������ ������ ����� ������. ���
���� ������ ����� ��(� PHP 3 ) ��-��� ����� ��������
<function>short_tags</function>, ��� ����� ������� <link
linkend="ini.short-open-tag">short_open_tag</link> �����
������� �� PHP, �� ��-��� ����� �� PHP �� �������
--enable-short-tags ����� � <command>configure</command>.
</para>
<para>
���� �� ����� �� ���� ������ ������ ���� ����� �����
�������� �� ������ ���� XML ������ XHTML.
</para>
<para>
���� ������� ���� �� �� ����� ����� � ASP ������ ��-���
������ <link linkend="ini.asp-tags">asp_tags</link>
����� �������.
<note>
<para>����� ������ ������� ASP ������ �� ����� 3.0.4 �����.</para>
</note>
</para>
<para>
����� ������ �� ���� ����� �� �� ����� ����� �����, ��
���� ���. ��� ��, ����� ����� ������ �� ���� �� ����� ��
����� ���� � PHP ���� ���� ������ ; ����� ������� �� ����.
</para>
<para>
PHP ����� ����� ����� ��� ��:
<example><title>���� ����� �����</title>
<programlisting role="php">
<![CDATA[
<?php
if ($expression) {
?>
<strong>This is true.</strong>
<?php
} else {
?>
<strong>This is false.</strong>
<?php
}
?>
]]>
</programlisting>
</example>
�����, ��� �� ����, �� ���� PHP ����� �� ������ ������, ���
���� ������ ������ ����� �� ����� ���� �� ����� �� ����
������ ����. ������ ������ ��� �����, �� ���� ����� ������ ����
���� ������ ����, ����� ������ ������ ������ ���� ���� �����
���� ����� �������� <function>echo</function> �� ��������
<function>print</function> �� ������� ����.
</para>
</sect1>
<sect1 id="language.basic-syntax.instruction-separation">
<title>����� ������</title>
<simpara>
����� ������ � PHP ������ ����� ��� ��� ������ ���� C �� ��� -
�� ����� ������� ��������� ; .</simpara>
<para>
���� ������ ����� �� �� ��� ������ ��� ���� ���, ���
������� ���� �������:
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
echo "This is a test";
?>
<?php echo "This is a test" ?>
]]>
</programlisting>
</informalexample>
</para>
</sect1>
<sect1 id="language.basic-syntax.comments">
<title>����� ����</title>
<para>
PHP ����� ������� ������ �� ��� C, C++ ������ ������. ������:
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
echo "This is a test"; // This is a one-line c++ style comment
/* This is a multi line comment
yet another line of comment */
echo "This is yet another test";
echo "One Final Test"; # This is shell-style style comment
?>
]]>
</programlisting>
</informalexample>
</para>
<simpara>
���� � "one-line" ����� �� �� ����� �� ��� ����� �� ��
���� ����� �� PHP.
</simpara>
<informalexample>
<programlisting role="php">
<![CDATA[
<h1>This is an <?php # echo "simple";?> example.>/h1>
<p>The header above will say 'This is an example'.
]]>
</programlisting>
</informalexample>
<simpara>
���� �� ���� ����� ������ 'C' ��� ����� ����� ����
���� ����� ���� ���� �� ��� �����
</simpara>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
/*
echo "This is a test"; /* This comment will cause a problem */
*/
?>
]]>
</programlisting>
</informalexample>
</sect1>
</chapter>
<!-- 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
-->