mirror of
https://github.com/php/doc-ja.git
synced 2026-03-24 15:12:22 +01:00
There is no need to describe the behavior on passing an unsupported
type at all, since that is already documented generally for internal
functions.
d93972fb2d
118 lines
2.9 KiB
XML
118 lines
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: d93972fb2d8855d7953d1f09aba48f53c870b135 Maintainer: hirokawa Status: ready -->
|
|
<!-- Credits: mumumu -->
|
|
<refentry xml:id="function.array-pop" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>array_pop</refname>
|
|
<refpurpose>配列の末尾から要素を取り除く</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>mixed</type><methodname>array_pop</methodname>
|
|
<methodparam><type>array</type><parameter role="reference">array</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>array_pop</function> は配列 <parameter>array</parameter>
|
|
の最後の要素の値を取り出して返します。
|
|
配列 <parameter>array</parameter> は、要素一つ分短くなります。
|
|
</para>
|
|
&array.resetspointer;
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>array</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
値を取り出す配列。
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
配列 <parameter>array</parameter>
|
|
の最後の要素の値を取り出して返します。
|
|
<parameter>array</parameter> が空の場合、
|
|
&null; が返されます。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>array_pop</function> の例</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$stack = array("orange", "banana", "apple", "raspberry");
|
|
$fruit = array_pop($stack);
|
|
print_r($stack);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
この後、<varname>$stack</varname> の要素は三つのみとなります。
|
|
</para>
|
|
<screen role="php">
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[0] => orange
|
|
[1] => banana
|
|
[2] => apple
|
|
)
|
|
]]>
|
|
</screen>
|
|
<para>
|
|
そして、<literal>raspberry</literal> が
|
|
<varname>$fruit</varname> に代入されます。
|
|
</para>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>array_push</function></member>
|
|
<member><function>array_shift</function></member>
|
|
<member><function>array_unshift</function></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
|
|
-->
|