1
0
mirror of https://github.com/php/doc-ja.git synced 2026-04-28 10:33:19 +02:00
Files
archived-doc-ja/language/predefined/variables/argc.xml
T
Gina Peter Banyard 6bc8826d13 Use <refentry> tag with role attribute instead of custom XML tag
Done using the following commands:

find ./language/predefined/variables/ -type f -name "*.xml" -exec sed -i 's+<phpdoc:varentry xmlns:phpdoc="http://php.net/ns/phpdoc"+<refentry role="variable"+g' {} +
find ./language/predefined/variables/ -type f -name "*.xml" -exec sed -i 's+</phpdoc:varentry>+</refentry>+g' {} +

Applies commit a6d209f4ff71ccba3f1255902827f5df3e092ff9 from doc-en
2023-11-01 16:51:53 +00:00

99 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 660a9ebe1fc4ae3a32104381090f70bce652ee75 Maintainer: takagi Status: ready -->
<refentry role="variable" xml:id="reserved.variables.argc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>$argc</refname>
<refpurpose>スクリプトに渡された引数の数</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>
<link linkend="features.commandline">コマンドライン</link>から実行したときに、
現在のスクリプトに渡された引数の数が含まれます。
</para>
<note>
<simpara>
スクリプトのファイル名は、常にスクリプトへの引数として渡されます。
したがって、<varname>$argc</varname> の最小値は <literal>1</literal> です。
</simpara>
</note>
<note>
<simpara>
この変数は、<link linkend="ini.register-argc-argv">register_argc_argv</link>
が無効になっている場合には使えません。
</simpara>
</note>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example xml:id="variable.argc.basic">
<title><varname>$argc</varname> の例</title>
<programlisting role="php">
<![CDATA[
<?php
var_dump($argc);
?>
]]>
</programlisting>
<simpara>
このサンプルを php script.php arg1 arg2 arg3
と実行します。
</simpara>
&example.outputs.similar;
<screen>
<![CDATA[
int(4)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<para>
これは、<varname>$_SERVER['argc']</varname> としても使用可能です。
</para>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>getopt</function></member>
<member><link linkend="reserved.variables.argv"><varname>$argv</varname></link></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- 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:"~/.phpdoc/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
-->