cvs: phpdoc /ja/language constants.xml expressions.xml operators.xml references.xml
| From: | Masaki Fujimoto | Date: | Sun, 16 Dec 2001 09:13:45 +0000 |
| Subject: | cvs: phpdoc /ja/language constants.xml expressions.xml operators.xml references.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969339851@lists.php.net to get a copy of this message | ||
fujimoto Sun Dec 16 04:13:45 2001 EDT
Modified files:
/phpdoc/ja/language constants.xml expressions.xml operators.xml
references.xml
Log:
updated translation.
Index: phpdoc/ja/language/constants.xml diff -u phpdoc/ja/language/constants.xml:1.10 phpdoc/ja/language/constants.xml:1.11 --- phpdoc/ja/language/constants.xml:1.10 Wed Dec 12 15:53:57 2001 +++ phpdoc/ja/language/constants.xml Sun Dec 16 04:13:45 2001 @@ -92,11 +92,13 @@ <example> <title>宿°ã®å®ç¾©</title> <programlisting> -<?php +<![CDATA[ +<?php define("CONSTANT", "Hello world."); echo CONSTANT; // "Hello world."ãåºå echo Constant; // outputs "Constant" ããã³éç¥ãçºçã -?> +?> +]]> </programlisting> </example> @@ -138,7 +140,7 @@ <listitem> <simpara> ç¾å¨ä½¿ç¨ä¸ã®PHPãã¼ãµã®ãã¼ã¸ã§ã³ã表ãæååã - ä¾:'4.0.7-dev' + ä¾:'4.1.0' </simpara> </listitem> </varlistentry> @@ -246,13 +248,15 @@ <example> <title>__FILE__ ããã³ __LINE__ ã®ä½¿ç¨</title> <programlisting> -<?php +<![CDATA[ +<?php function report_error($file, $line, $message) { echo "An error occured in $file on line $line: $message."; } report_error(__FILE__,__LINE__, "Something went wrong!"); -?> +?> +]]> </programlisting> </example> </para> Index: phpdoc/ja/language/expressions.xml diff -u phpdoc/ja/language/expressions.xml:1.7 phpdoc/ja/language/expressions.xml:1.8 --- phpdoc/ja/language/expressions.xml:1.7 Wed Dec 12 15:53:59 2001 +++ phpdoc/ja/language/expressions.xml Sun Dec 16 04:13:45 2001 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.8 $ --> <chapter id="language.expressions"> <title>å¼</title> @@ -27,10 +28,12 @@ ä¾ãã°ã次ã®é¢æ°ãèãã¦ã¿ã¾ãããã <informalexample> - <programlisting> + <programlisting role="php"> +<![CDATA[ function foo () { return 5; } +]]> </programlisting> </informalexample></para> @@ -143,8 +146,10 @@ ä»ã®è¨èªã§è¦ããã¨ããªãå ´åã«ã¯çè§£ã§ããªãããããã¾ããã <informalexample><programlisting> +<![CDATA[ $first ? $second : $third -</programlisting></informalexample> +]]> + </programlisting></informalexample> æåã®é¨åå¼ã®å¤ã &true; (éã¼ã)ã®å ´åãäºçªç®ã®é¨åå¼ãè©ä¾¡ããã ãã®æ¡ä»¶æã®çµæã¨ãªãã¾ãã @@ -156,6 +161,7 @@ <informalexample> <programlisting> +<![CDATA[ function double($i) { return $i*2; } @@ -173,7 +179,10 @@ ã¤ã¾ã 2*7 = 14 ããä»£å ¥ããã¾ãã $h = $g += 10; /* ã¾ãã$g ã« 10 ãå ç®ããã24 ã«ãªãã¾ããä»£å ¥å¤ (24) ã¯ã $h ã«ä»£å ¥ããã¾ããããã¦ã$a ãåæ§ã« 24 ã«ãªãã¾ãã */ -</programlisting></informalexample></para> +]]> + </programlisting> + </informalexample> + </para> <simpara> æ¬ç« ã®ã¯ããã§ãæ§ã ãªæã®åã«ã¤ãã¦æ¸ãã¨è¨ãã¾ãããã Index: phpdoc/ja/language/operators.xml diff -u phpdoc/ja/language/operators.xml:1.13 phpdoc/ja/language/operators.xml:1.14 --- phpdoc/ja/language/operators.xml:1.13 Wed Dec 12 15:54:01 2001 +++ phpdoc/ja/language/operators.xml Sun Dec 16 04:13:45 2001 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.14 $ --> <chapter id="language.operators"> <title>æ¼ç®å</title> <simpara> @@ -70,7 +71,9 @@ ããã«ããã以ä¸ã®ãããªããªããã¼ãªãã¨ãã§ããããã«ãªãã¾ãã <informalexample> <programlisting role="php"> +<![CDATA[ $a = ($b = 4) + 5; // $a 㯠9 ã«çããã$b 㯠4 ã«ã»ããããã¾ãã +]]> </programlisting> </informalexample> </para> @@ -80,10 +83,12 @@ ã®çµæã«ãã®å¤ãè¨å®ãããã¨ãã§ãã¾ããä¾ãã°ã <informalexample> <programlisting role="php"> +<![CDATA[ $a = 3; $a += 5; // $a ã 8 ã«ã»ãããã¾ãã$a = $a + 5; ã¨åãã§ãã $b = "Hello "; $b .= "There!"; // $bã"Hello There!"ã«ã»ãããã¾ãã$b = $b . "There!";ã¨åãã§ãã +]]> </programlisting> </informalexample> </para> @@ -239,7 +244,9 @@ ãã®æ¼ç®åã®åä½ã¯ãCã¾ãã¯ä»ã®å¤ãè¨èªã¨åãã§ãã <informalexample> <programlisting> +<![CDATA[ (å¼1) ? (å¼2) : (å¼3); +]]> </programlisting> </informalexample> ãã®å¼ã¯ã<replaceable>å¼1</replaceable> ã&true;ã®å ´åã« @@ -265,7 +272,8 @@ <para> <informalexample> <programlisting role="php"> -<?php +<![CDATA[ +<?php /* æå³çãªã¨ã©ã¼ */ $my_file = @file ('non_existent_file') or die ("Failed opening file: error was '$php_errormsg'"); @@ -274,7 +282,8 @@ $value = @$cache[$key]; // ã¤ã³ããã¯ã¹ $key ãåå¨ããªãå ´åã§ããè¦åãçºçãã¾ããã -?> +?> +]]> </programlisting> </informalexample> </para> @@ -318,22 +327,26 @@ ãã¾ãã) <informalexample> <programlisting role="php"> +<![CDATA[ $output = `ls -al`; -echo "<pre>$output</pre>"; +echo "<pre>$output</pre>"; +]]> </programlisting> </informalexample> </para> <note> <para> ããã¯ã¯ãªã¼ãæ¼ç®åã¯ã<link linkend="ini.safe-mode">ã»ã¼ãã¢ã¼ - ã</link> ãæå¹ãªå ´åã«ç¡å¹ã¨ãªãã¾ãã + ã</link> ãæå¹ãªå ´åããããã¯<function>shell_exec</function> + ãç¡å¹ãªå ´åã¯ç¡å¹ã¨ãªãã¾ãã </para> </note> <para> - <function>system</function>, - <function>passthru</function>, <function>exec</function>, + <function>escapeshellcmd</function>, <function>exec</function>, + <function>passthru</function>, <function>popen</function>, <function>popen</function>, - <function>escapeshellcmd</function> ãåç §ä¸ããã + <function>shell_exec</function>, <function>system</function> + ãåç §ãã¦ä¸ããã </para> </sect1> @@ -380,27 +393,29 @@ 以ä¸ã«ç°¡åãªã¹ã¯ãªããã®ä¾ã示ãã¾ãã <informalexample> <programlisting role="php"> -<?php -echo "<h3>å¾ç½®å ç®</h3>"; +<![CDATA[ +<?php +echo "<h3>å¾ç½®å ç®</h3>"; $a = 5; -echo "5ã¨ãªãã¾ã: " . $a++ . "<br>\n"; -echo "6ã¨ãªãã¾ã: " . $a . "<br>\n"; +echo "5ã¨ãªãã¾ã: " . $a++ . "<br>\n"; +echo "6ã¨ãªãã¾ã: " . $a . "<br>\n"; -echo "<h3>åç½®å ç®</h3>"; +echo "<h3>åç½®å ç®</h3>"; $a = 5; -echo "6ã¨ãªãã¾ã: " . ++$a . "<br>\n"; -echo "6ã¨ãªãã¾ã: " . $a . "<br>\n"; +echo "6ã¨ãªãã¾ã: " . ++$a . "<br>\n"; +echo "6ã¨ãªãã¾ã: " . $a . "<br>\n"; -echo "<h3>å¾ç½®æ¸ç®</h3>"; +echo "<h3>å¾ç½®æ¸ç®</h3>"; $a = 5; -echo "5ã¨ãªãã¾ã: " . $a-- . "<br>\n"; -echo "4ã¨ãªãã¾ã: " . $a . "<br>\n"; +echo "5ã¨ãªãã¾ã: " . $a-- . "<br>\n"; +echo "4ã¨ãªãã¾ã: " . $a . "<br>\n"; -echo "<h3>åç½®æ¸ç®</h3>"; +echo "<h3>åç½®æ¸ç®</h3>"; $a = 5; -echo "4ã¨ãªãã¾ã: " . --$a . "<br>\n"; -echo "4ã¨ãªãã¾ã: " . $a . "<br>\n"; -?> +echo "4ã¨ãªãã¾ã: " . --$a . "<br>\n"; +echo "4ã¨ãªãã¾ã: " . $a . "<br>\n"; +?> +]]> </programlisting> </informalexample> </para> @@ -585,11 +600,13 @@ <para> <informalexample> <programlisting role="php"> +<![CDATA[ $a = "Hello "; $b = $a . "World!"; // $b ã¯ã"Hello World!" ã¨ãªãã¾ãã $a = "Hello "; $a .= "World!"; // $a ã¯ã"Hello World!" ã¨ãªãã¾ãã +]]> </programlisting> </informalexample> </para> Index: phpdoc/ja/language/references.xml diff -u phpdoc/ja/language/references.xml:1.7 phpdoc/ja/language/references.xml:1.8 --- phpdoc/ja/language/references.xml:1.7 Wed Dec 12 15:54:02 2001 +++ phpdoc/ja/language/references.xml Sun Dec 16 04:13:45 2001 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.8 $ --> <chapter id="language.references"> <title>ãªãã¡ã¬ã³ã¹ã®èª¬æ</title> @@ -23,7 +24,9 @@ ããã¤ã¾ãã以ä¸ã®ãããªãã®ãå®è¡ããå ´åã§ãã <informalexample> <programlisting role="php"> -$a =& $b +<![CDATA[ +$a =& $b +]]> </programlisting> </informalexample> ãã®å ´åã<varname>$a</varname>ã¨<varname>$b</varname>ã¯åã夿°ã @@ -42,19 +45,23 @@ ã使ç¨å¯è½ã§ãã(PHP 4.0.4 以é) <informalexample> <programlisting role="php"> -$bar =& new fooclass(); -$foo =& find_var ($bar); +<![CDATA[ +$bar =& new fooclass(); +$foo =& find_var ($bar); +]]> </programlisting> </informalexample> </para> <note> <para> - ä¸è¨ã®æ§æã使ç¨ããªãå ´åã<literal>$bar = new - fooclass()</literal> ã®çµæã¯ãã³ã³ã¹ãã©ã¯ã¿ã® - <literal>$this</literal> ã¨åã夿°ã«ã¯ãªãã¾ããããã®ãããã³ã³ - ã¹ãã©ã¯ã¿ã§ <literal>$this</literal> ã¸ã®ãªãã¡ã¬ã³ã¹ã使ç¨ãã - éã«ã¯ããªãã¡ã¬ã³ã¹ã«ããä»£å ¥ã使ç¨ããããäºã¤ã®ç°ãªã£ããªãã¸ã§ - ã¯ããåå¾ããå¿ è¦ãããã¾ãã + <literal>&</literal>æ¼ç®åã使ç¨ããªãã¨ãªãã¸ã§ã¯ãã®ã³ãã¼ã + çæããã¾ãããã<literal>$this</literal>ãã¯ã©ã¹ã®ä¸ã§ä½¿ç¨ããã¨ã + ãã®å¤æ°ã¯ããã®ã¯ã©ã¹ã®ç¾å¨ã®ã¤ã³ã¹ã¿ã³ã¹ãæãã¾ãã<literal> + &</literal>ç¡ãã«å¤ãå²ãå½ã¦ãã¨ã¤ã³ã¹ã¿ã³ã¹(ã¤ã¾ããªãã¸ã§ã¯ã) + ã®ã³ãã¼ãçæããã<literal>$this</literal>ã¯ã³ãã¼ãæããã¨ã« + ãªãã¾ãããã®æåãæã¾ãããªãå ´åãããã§ããããã¨ããã®ãæ®é㯠+ ããã©ã¼ãã³ã¹ã¨ã¡ã¢ãªå¹çã®é¢ããèãã¦åä½ããã¤ã³ã¹ã¿ã³ã¹ã¯ä¸ã¤ + ã§ååã ããã§ãã </para> </note> <para> @@ -63,12 +70,14 @@ ã³ã¹ã¨ãªãã¾ããä¾ã示ãã¾ãã <informalexample> <programlisting role="php"> -function foo(&$var) { +<![CDATA[ +function foo(&$var) { $var++; } $a=5; foo($a); +]]> </programlisting> </informalexample> ãã®çµæã<varname>$a</varname> 㯠6ã¨ãªãã¾ããããã¯ã颿° @@ -91,21 +100,24 @@ ä¾ã¯æå¾ éãã«åä½ãã¾ããã <informalexample> <programlisting role="php"> -function foo(&$var) { - $var =& $GLOBALS["baz"]; +<![CDATA[ +function foo(&$var) { + $var =& $GLOBALS["baz"]; } foo($bar); +]]> </programlisting> </informalexample> </para> <simpara> - ããã§ã®åä½ã¨ãã¦ã¯ã颿°fooã®<varname>$var</varname>ã¯ã³ã¼ã«å´ã® - <varname>$bar</varname>ã¨çµåããã¾ããã - <varname>$GLOBALS["baz"]</varname>ã«åçµåãããã¨ãã£ããã®ã«ãªã - ã¾ãã<varname>$bar</varname>ã¯é¢æ°fooã§å©ç¨ã§ããªãããããªãã¡ã¬ - ã³ã¹ä»¥å¤ã«ã¯ã³ã¼ã«å´ã®å¤æ°ã¹ã³ã¼ãã«ãã<varname>$bar</varname>ã - ä½ãã«çµåããææ®µã¯ããã¾ããã(ãã®å¤æ°ã¯ã - <varname>$var</varname>ã¨ãã¦è¡¨ããã¦ãã¾ããã + ããã§ã®åä½ã¨ãã¦ã¯ã颿°<varname>foo</varname>ã® + <varname>$var</varname>ã¯ã³ã¼ã«å´ã®<varname>$bar</varname> + ã¨çµåããã¾ããã<varname>$GLOBALS["baz"]</varname> + ã«åçµåãããã¨ãã£ããã®ã«ãªãã¾ãã<varname>$bar</varname> + ã¯é¢æ°<varname>foo</varname>ã§å©ç¨ã§ããªãããã + ãªãã¡ã¬ã³ã¹ä»¥å¤ã«ã¯ã³ã¼ã«å´ã®å¤æ°ã¹ã³ã¼ãã«ãã + <varname>$bar</varname>ãä½ãã«çµåããææ®µã¯ããã¾ããã + (ãã®å¤æ°ã¯ã<varname>$var</varname>ã¨ãã¦è¡¨ããã¦ãã¾ããã <varname>$var</varname>ã¯ãã®å¤æ°ã®å 容ã®ã¿ãæãã¦ããã ã³ã¼ã«å´ã®ã·ã³ãã«ãã¼ãã«ã§ååã¨å¤æ°ãçµåãããã®ã§ã¯ããã¾ããã) </simpara> @@ -118,13 +130,15 @@ ã§ãã®å¼æ°ãä¿®æ£å¯è½ã«ãªãã¾ããæ§æã¯æ¬¡ã®ããã«ãªãã¾ãã <informalexample> <programlisting role="php"> -function foo (&$var) { +<![CDATA[ +function foo (&$var) { $var++; } $a=5; foo ($a); // $a ã¯ããã§ã¯ 6 ã§ã +]]> </programlisting> </informalexample> 颿°ã³ã¼ã«ã®éã«ã¯ããªãã¡ã¬ã³ã¹è¨å·ããªããã¨ã«æ³¨æãã¦ä¸ãããé¢ @@ -149,12 +163,14 @@ 颿°ããè¿ããããªãã¡ã¬ã³ã¹ã¯ã次ã®ããã«ãªãã¾ãã <informalexample> <programlisting role="php"> -function &bar() +<![CDATA[ +function &bar() { $a = 5; return $a; } foo(bar()); +]]> </programlisting> </informalexample> <link linkend="language.references.return">ãªãã¡ã¬ã³ã¹ã«ããè¿ @@ -168,15 +184,17 @@ ãããä¾ãã°ããªãã¡ã¬ã³ã¹ã§æ¸¡ã次ã®ä¾ã¯ãç¡å¹ã§ãã <informalexample> <programlisting role="php"> -function bar() // & ããªããã¨ã«æ³¨æ +<![CDATA[ +function bar() // & ããªããã¨ã«æ³¨æ { $a = 5; return $a; } -foo(bar); +foo(bar()); foo($a = 5) // å¼ã夿°ã§ã¯ãªã foo(5) // 宿°ã夿°ã§ã¯ãªã +]]> </programlisting> </informalexample> 以ä¸ã®èª¬æã¯ãPHP 4.0.4 以éç¨ã§ãã @@ -191,13 +209,15 @@ ãã <informalexample> <programlisting role="php"> -function &find_var($param) { +<![CDATA[ +function &find_var($param) { ...ã³ã¼ã... return $found_var; } -$foo =& find_var($bar); +$foo =& find_var($bar); $foo->x = 2; +]]> </programlisting> </informalexample> ãã®ä¾ã§ã¯ã颿°<varname>find_var</varname>ã«ããè¿ããã @@ -223,9 +243,11 @@ ã¾ãããä¾ãã°ã <informalexample> <programlisting role="php"> +<![CDATA[ $a = 1; -$b =& $a; +$b =& $a; unset($a); +]]> </programlisting> </informalexample> ã¯ã<varname>$b</varname>ãåé¤ããã<varname>$a</varname>ã®ã¿ãå @@ -257,7 +279,9 @@ ã¯ã次ã®ä¾ã¨åãã§ãã <informalexample> <programlisting role="php"> -$var =& $GLOBALS["var"]; +<![CDATA[ +$var =& $GLOBALS["var"]; +]]> </programlisting> </informalexample> </para> @@ -294,4 +318,4 @@ sgml-local-catalogs:nil sgml-local-ecat-files:nil End: ---> \ No newline at end of file +-->
Index: phpdoc/ja/language/constants.xml diff -u phpdoc/ja/language/constants.xml:1.10 phpdoc/ja/language/constants.xml:1.11 --- phpdoc/ja/language/constants.xml:1.10 Wed Dec 12 15:53:57 2001 +++ phpdoc/ja/language/constants.xml Sun Dec 16 04:13:45 2001 @@ -92,11 +92,13 @@ <example> <title>宿°ã®å®ç¾©</title> <programlisting> -<?php +<![CDATA[ +<?php define("CONSTANT", "Hello world."); echo CONSTANT; // "Hello world."ãåºå echo Constant; // outputs "Constant" ããã³éç¥ãçºçã -?> +?> +]]> </programlisting> </example> @@ -138,7 +140,7 @@ <listitem> <simpara> ç¾å¨ä½¿ç¨ä¸ã®PHPãã¼ãµã®ãã¼ã¸ã§ã³ã表ãæååã - ä¾:'4.0.7-dev' + ä¾:'4.1.0' </simpara> </listitem> </varlistentry> @@ -246,13 +248,15 @@ <example> <title>__FILE__ ããã³ __LINE__ ã®ä½¿ç¨</title> <programlisting> -<?php +<![CDATA[ +<?php function report_error($file, $line, $message) { echo "An error occured in $file on line $line: $message."; } report_error(__FILE__,__LINE__, "Something went wrong!"); -?> +?> +]]> </programlisting> </example> </para> Index: phpdoc/ja/language/expressions.xml diff -u phpdoc/ja/language/expressions.xml:1.7 phpdoc/ja/language/expressions.xml:1.8 --- phpdoc/ja/language/expressions.xml:1.7 Wed Dec 12 15:53:59 2001 +++ phpdoc/ja/language/expressions.xml Sun Dec 16 04:13:45 2001 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.8 $ --> <chapter id="language.expressions"> <title>å¼</title> @@ -27,10 +28,12 @@ ä¾ãã°ã次ã®é¢æ°ãèãã¦ã¿ã¾ãããã <informalexample> - <programlisting> + <programlisting role="php"> +<![CDATA[ function foo () { return 5; } +]]> </programlisting> </informalexample></para> @@ -143,8 +146,10 @@ ä»ã®è¨èªã§è¦ããã¨ããªãå ´åã«ã¯çè§£ã§ããªãããããã¾ããã <informalexample><programlisting> +<![CDATA[ $first ? $second : $third -</programlisting></informalexample> +]]> + </programlisting></informalexample> æåã®é¨åå¼ã®å¤ã &true; (éã¼ã)ã®å ´åãäºçªç®ã®é¨åå¼ãè©ä¾¡ããã ãã®æ¡ä»¶æã®çµæã¨ãªãã¾ãã @@ -156,6 +161,7 @@ <informalexample> <programlisting> +<![CDATA[ function double($i) { return $i*2; } @@ -173,7 +179,10 @@ ã¤ã¾ã 2*7 = 14 ããä»£å ¥ããã¾ãã $h = $g += 10; /* ã¾ãã$g ã« 10 ãå ç®ããã24 ã«ãªãã¾ããä»£å ¥å¤ (24) ã¯ã $h ã«ä»£å ¥ããã¾ããããã¦ã$a ãåæ§ã« 24 ã«ãªãã¾ãã */ -</programlisting></informalexample></para> +]]> + </programlisting> + </informalexample> + </para> <simpara> æ¬ç« ã®ã¯ããã§ãæ§ã ãªæã®åã«ã¤ãã¦æ¸ãã¨è¨ãã¾ãããã Index: phpdoc/ja/language/operators.xml diff -u phpdoc/ja/language/operators.xml:1.13 phpdoc/ja/language/operators.xml:1.14 --- phpdoc/ja/language/operators.xml:1.13 Wed Dec 12 15:54:01 2001 +++ phpdoc/ja/language/operators.xml Sun Dec 16 04:13:45 2001 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.14 $ --> <chapter id="language.operators"> <title>æ¼ç®å</title> <simpara> @@ -70,7 +71,9 @@ ããã«ããã以ä¸ã®ãããªããªããã¼ãªãã¨ãã§ããããã«ãªãã¾ãã <informalexample> <programlisting role="php"> +<![CDATA[ $a = ($b = 4) + 5; // $a 㯠9 ã«çããã$b 㯠4 ã«ã»ããããã¾ãã +]]> </programlisting> </informalexample> </para> @@ -80,10 +83,12 @@ ã®çµæã«ãã®å¤ãè¨å®ãããã¨ãã§ãã¾ããä¾ãã°ã <informalexample> <programlisting role="php"> +<![CDATA[ $a = 3; $a += 5; // $a ã 8 ã«ã»ãããã¾ãã$a = $a + 5; ã¨åãã§ãã $b = "Hello "; $b .= "There!"; // $bã"Hello There!"ã«ã»ãããã¾ãã$b = $b . "There!";ã¨åãã§ãã +]]> </programlisting> </informalexample> </para> @@ -239,7 +244,9 @@ ãã®æ¼ç®åã®åä½ã¯ãCã¾ãã¯ä»ã®å¤ãè¨èªã¨åãã§ãã <informalexample> <programlisting> +<![CDATA[ (å¼1) ? (å¼2) : (å¼3); +]]> </programlisting> </informalexample> ãã®å¼ã¯ã<replaceable>å¼1</replaceable> ã&true;ã®å ´åã« @@ -265,7 +272,8 @@ <para> <informalexample> <programlisting role="php"> -<?php +<![CDATA[ +<?php /* æå³çãªã¨ã©ã¼ */ $my_file = @file ('non_existent_file') or die ("Failed opening file: error was '$php_errormsg'"); @@ -274,7 +282,8 @@ $value = @$cache[$key]; // ã¤ã³ããã¯ã¹ $key ãåå¨ããªãå ´åã§ããè¦åãçºçãã¾ããã -?> +?> +]]> </programlisting> </informalexample> </para> @@ -318,22 +327,26 @@ ãã¾ãã) <informalexample> <programlisting role="php"> +<![CDATA[ $output = `ls -al`; -echo "<pre>$output</pre>"; +echo "<pre>$output</pre>"; +]]> </programlisting> </informalexample> </para> <note> <para> ããã¯ã¯ãªã¼ãæ¼ç®åã¯ã<link linkend="ini.safe-mode">ã»ã¼ãã¢ã¼ - ã</link> ãæå¹ãªå ´åã«ç¡å¹ã¨ãªãã¾ãã + ã</link> ãæå¹ãªå ´åããããã¯<function>shell_exec</function> + ãç¡å¹ãªå ´åã¯ç¡å¹ã¨ãªãã¾ãã </para> </note> <para> - <function>system</function>, - <function>passthru</function>, <function>exec</function>, + <function>escapeshellcmd</function>, <function>exec</function>, + <function>passthru</function>, <function>popen</function>, <function>popen</function>, - <function>escapeshellcmd</function> ãåç §ä¸ããã + <function>shell_exec</function>, <function>system</function> + ãåç §ãã¦ä¸ããã </para> </sect1> @@ -380,27 +393,29 @@ 以ä¸ã«ç°¡åãªã¹ã¯ãªããã®ä¾ã示ãã¾ãã <informalexample> <programlisting role="php"> -<?php -echo "<h3>å¾ç½®å ç®</h3>"; +<![CDATA[ +<?php +echo "<h3>å¾ç½®å ç®</h3>"; $a = 5; -echo "5ã¨ãªãã¾ã: " . $a++ . "<br>\n"; -echo "6ã¨ãªãã¾ã: " . $a . "<br>\n"; +echo "5ã¨ãªãã¾ã: " . $a++ . "<br>\n"; +echo "6ã¨ãªãã¾ã: " . $a . "<br>\n"; -echo "<h3>åç½®å ç®</h3>"; +echo "<h3>åç½®å ç®</h3>"; $a = 5; -echo "6ã¨ãªãã¾ã: " . ++$a . "<br>\n"; -echo "6ã¨ãªãã¾ã: " . $a . "<br>\n"; +echo "6ã¨ãªãã¾ã: " . ++$a . "<br>\n"; +echo "6ã¨ãªãã¾ã: " . $a . "<br>\n"; -echo "<h3>å¾ç½®æ¸ç®</h3>"; +echo "<h3>å¾ç½®æ¸ç®</h3>"; $a = 5; -echo "5ã¨ãªãã¾ã: " . $a-- . "<br>\n"; -echo "4ã¨ãªãã¾ã: " . $a . "<br>\n"; +echo "5ã¨ãªãã¾ã: " . $a-- . "<br>\n"; +echo "4ã¨ãªãã¾ã: " . $a . "<br>\n"; -echo "<h3>åç½®æ¸ç®</h3>"; +echo "<h3>åç½®æ¸ç®</h3>"; $a = 5; -echo "4ã¨ãªãã¾ã: " . --$a . "<br>\n"; -echo "4ã¨ãªãã¾ã: " . $a . "<br>\n"; -?> +echo "4ã¨ãªãã¾ã: " . --$a . "<br>\n"; +echo "4ã¨ãªãã¾ã: " . $a . "<br>\n"; +?> +]]> </programlisting> </informalexample> </para> @@ -585,11 +600,13 @@ <para> <informalexample> <programlisting role="php"> +<![CDATA[ $a = "Hello "; $b = $a . "World!"; // $b ã¯ã"Hello World!" ã¨ãªãã¾ãã $a = "Hello "; $a .= "World!"; // $a ã¯ã"Hello World!" ã¨ãªãã¾ãã +]]> </programlisting> </informalexample> </para> Index: phpdoc/ja/language/references.xml diff -u phpdoc/ja/language/references.xml:1.7 phpdoc/ja/language/references.xml:1.8 --- phpdoc/ja/language/references.xml:1.7 Wed Dec 12 15:54:02 2001 +++ phpdoc/ja/language/references.xml Sun Dec 16 04:13:45 2001 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.8 $ --> <chapter id="language.references"> <title>ãªãã¡ã¬ã³ã¹ã®èª¬æ</title> @@ -23,7 +24,9 @@ ããã¤ã¾ãã以ä¸ã®ãããªãã®ãå®è¡ããå ´åã§ãã <informalexample> <programlisting role="php"> -$a =& $b +<![CDATA[ +$a =& $b +]]> </programlisting> </informalexample> ãã®å ´åã<varname>$a</varname>ã¨<varname>$b</varname>ã¯åã夿°ã @@ -42,19 +45,23 @@ ã使ç¨å¯è½ã§ãã(PHP 4.0.4 以é) <informalexample> <programlisting role="php"> -$bar =& new fooclass(); -$foo =& find_var ($bar); +<![CDATA[ +$bar =& new fooclass(); +$foo =& find_var ($bar); +]]> </programlisting> </informalexample> </para> <note> <para> - ä¸è¨ã®æ§æã使ç¨ããªãå ´åã<literal>$bar = new - fooclass()</literal> ã®çµæã¯ãã³ã³ã¹ãã©ã¯ã¿ã® - <literal>$this</literal> ã¨åã夿°ã«ã¯ãªãã¾ããããã®ãããã³ã³ - ã¹ãã©ã¯ã¿ã§ <literal>$this</literal> ã¸ã®ãªãã¡ã¬ã³ã¹ã使ç¨ãã - éã«ã¯ããªãã¡ã¬ã³ã¹ã«ããä»£å ¥ã使ç¨ããããäºã¤ã®ç°ãªã£ããªãã¸ã§ - ã¯ããåå¾ããå¿ è¦ãããã¾ãã + <literal>&</literal>æ¼ç®åã使ç¨ããªãã¨ãªãã¸ã§ã¯ãã®ã³ãã¼ã + çæããã¾ãããã<literal>$this</literal>ãã¯ã©ã¹ã®ä¸ã§ä½¿ç¨ããã¨ã + ãã®å¤æ°ã¯ããã®ã¯ã©ã¹ã®ç¾å¨ã®ã¤ã³ã¹ã¿ã³ã¹ãæãã¾ãã<literal> + &</literal>ç¡ãã«å¤ãå²ãå½ã¦ãã¨ã¤ã³ã¹ã¿ã³ã¹(ã¤ã¾ããªãã¸ã§ã¯ã) + ã®ã³ãã¼ãçæããã<literal>$this</literal>ã¯ã³ãã¼ãæããã¨ã« + ãªãã¾ãããã®æåãæã¾ãããªãå ´åãããã§ããããã¨ããã®ãæ®é㯠+ ããã©ã¼ãã³ã¹ã¨ã¡ã¢ãªå¹çã®é¢ããèãã¦åä½ããã¤ã³ã¹ã¿ã³ã¹ã¯ä¸ã¤ + ã§ååã ããã§ãã </para> </note> <para> @@ -63,12 +70,14 @@ ã³ã¹ã¨ãªãã¾ããä¾ã示ãã¾ãã <informalexample> <programlisting role="php"> -function foo(&$var) { +<![CDATA[ +function foo(&$var) { $var++; } $a=5; foo($a); +]]> </programlisting> </informalexample> ãã®çµæã<varname>$a</varname> 㯠6ã¨ãªãã¾ããããã¯ã颿° @@ -91,21 +100,24 @@ ä¾ã¯æå¾ éãã«åä½ãã¾ããã <informalexample> <programlisting role="php"> -function foo(&$var) { - $var =& $GLOBALS["baz"]; +<![CDATA[ +function foo(&$var) { + $var =& $GLOBALS["baz"]; } foo($bar); +]]> </programlisting> </informalexample> </para> <simpara> - ããã§ã®åä½ã¨ãã¦ã¯ã颿°fooã®<varname>$var</varname>ã¯ã³ã¼ã«å´ã® - <varname>$bar</varname>ã¨çµåããã¾ããã - <varname>$GLOBALS["baz"]</varname>ã«åçµåãããã¨ãã£ããã®ã«ãªã - ã¾ãã<varname>$bar</varname>ã¯é¢æ°fooã§å©ç¨ã§ããªãããããªãã¡ã¬ - ã³ã¹ä»¥å¤ã«ã¯ã³ã¼ã«å´ã®å¤æ°ã¹ã³ã¼ãã«ãã<varname>$bar</varname>ã - ä½ãã«çµåããææ®µã¯ããã¾ããã(ãã®å¤æ°ã¯ã - <varname>$var</varname>ã¨ãã¦è¡¨ããã¦ãã¾ããã + ããã§ã®åä½ã¨ãã¦ã¯ã颿°<varname>foo</varname>ã® + <varname>$var</varname>ã¯ã³ã¼ã«å´ã®<varname>$bar</varname> + ã¨çµåããã¾ããã<varname>$GLOBALS["baz"]</varname> + ã«åçµåãããã¨ãã£ããã®ã«ãªãã¾ãã<varname>$bar</varname> + ã¯é¢æ°<varname>foo</varname>ã§å©ç¨ã§ããªãããã + ãªãã¡ã¬ã³ã¹ä»¥å¤ã«ã¯ã³ã¼ã«å´ã®å¤æ°ã¹ã³ã¼ãã«ãã + <varname>$bar</varname>ãä½ãã«çµåããææ®µã¯ããã¾ããã + (ãã®å¤æ°ã¯ã<varname>$var</varname>ã¨ãã¦è¡¨ããã¦ãã¾ããã <varname>$var</varname>ã¯ãã®å¤æ°ã®å 容ã®ã¿ãæãã¦ããã ã³ã¼ã«å´ã®ã·ã³ãã«ãã¼ãã«ã§ååã¨å¤æ°ãçµåãããã®ã§ã¯ããã¾ããã) </simpara> @@ -118,13 +130,15 @@ ã§ãã®å¼æ°ãä¿®æ£å¯è½ã«ãªãã¾ããæ§æã¯æ¬¡ã®ããã«ãªãã¾ãã <informalexample> <programlisting role="php"> -function foo (&$var) { +<![CDATA[ +function foo (&$var) { $var++; } $a=5; foo ($a); // $a ã¯ããã§ã¯ 6 ã§ã +]]> </programlisting> </informalexample> 颿°ã³ã¼ã«ã®éã«ã¯ããªãã¡ã¬ã³ã¹è¨å·ããªããã¨ã«æ³¨æãã¦ä¸ãããé¢ @@ -149,12 +163,14 @@ 颿°ããè¿ããããªãã¡ã¬ã³ã¹ã¯ã次ã®ããã«ãªãã¾ãã <informalexample> <programlisting role="php"> -function &bar() +<![CDATA[ +function &bar() { $a = 5; return $a; } foo(bar()); +]]> </programlisting> </informalexample> <link linkend="language.references.return">ãªãã¡ã¬ã³ã¹ã«ããè¿ @@ -168,15 +184,17 @@ ãããä¾ãã°ããªãã¡ã¬ã³ã¹ã§æ¸¡ã次ã®ä¾ã¯ãç¡å¹ã§ãã <informalexample> <programlisting role="php"> -function bar() // & ããªããã¨ã«æ³¨æ +<![CDATA[ +function bar() // & ããªããã¨ã«æ³¨æ { $a = 5; return $a; } -foo(bar); +foo(bar()); foo($a = 5) // å¼ã夿°ã§ã¯ãªã foo(5) // 宿°ã夿°ã§ã¯ãªã +]]> </programlisting> </informalexample> 以ä¸ã®èª¬æã¯ãPHP 4.0.4 以éç¨ã§ãã @@ -191,13 +209,15 @@ ãã <informalexample> <programlisting role="php"> -function &find_var($param) { +<![CDATA[ +function &find_var($param) { ...ã³ã¼ã... return $found_var; } -$foo =& find_var($bar); +$foo =& find_var($bar); $foo->x = 2; +]]> </programlisting> </informalexample> ãã®ä¾ã§ã¯ã颿°<varname>find_var</varname>ã«ããè¿ããã @@ -223,9 +243,11 @@ ã¾ãããä¾ãã°ã <informalexample> <programlisting role="php"> +<![CDATA[ $a = 1; -$b =& $a; +$b =& $a; unset($a); +]]> </programlisting> </informalexample> ã¯ã<varname>$b</varname>ãåé¤ããã<varname>$a</varname>ã®ã¿ãå @@ -257,7 +279,9 @@ ã¯ã次ã®ä¾ã¨åãã§ãã <informalexample> <programlisting role="php"> -$var =& $GLOBALS["var"]; +<![CDATA[ +$var =& $GLOBALS["var"]; +]]> </programlisting> </informalexample> </para> @@ -294,4 +318,4 @@ sgml-local-catalogs:nil sgml-local-ecat-files:nil End: ---> \ No newline at end of file +-->