Files
Leonardo Lara Rodrigues cf27151e17 Tranlations to many oudated/abandoned/missing pages (#360)
* Updates to abandoned/outdated pages in reference/array/functions/

* Updates to outdated/abandoned pages and new translations in reference/classobj/

* Updates to abandoned/outdated pages in reference/ctype/

* Correction to double-byte UTF-8 character which is similar to 'E'

* Correction of translation

* Updates to abandoned/outdated files and new translations in reference/dir/

* Updates to abandoned/outdated files in reference/mysqli/

* New translation of reference/sockets/functions/socket-atmark.xml

* New translation of reference/stream/*

* Corrections after QA scripts

* Delete reference/stream/versions.xml

Arquivo marcado para não tradução.

---------

Co-authored-by: LEONARDO LARA RODRIGUES <leonardolara@github.com>
Co-authored-by: alfsb <alfsb@users.noreply.github.com>
2023-11-23 14:00:30 -03:00

113 lines
3.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 0a192fcd9cc43c0007de795063b4494974058992 Maintainer: leonardolara Status: ready --><!-- CREDITS: felipe,lucasr,leonardolara -->
<refentry xml:id="function.end" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>end</refname>
<refpurpose>Define o ponteiro interno de um array para seu último elemento</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>end</methodname>
<methodparam><type class="union"><type>array</type><type>object</type></type><parameter role="reference">array</parameter></methodparam>
</methodsynopsis>
<para>
<function>end</function> avança o ponteiro interno de <parameter>array</parameter>
até o último elemento, e retorna seu valor.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>array</parameter></term>
<listitem>
<para>
O array. Este array é passado por referência porque ele é modificado pela
função. Isto significa que deve-se passar a esta função uma variável real, e não
uma função retornando um array, porque somente variáveis reais podem ser
passadas por referência.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Retorna o valor do último elemento ou &false; para array vazio.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&standard.changelog.calling-on-objects;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Exemplo de <function>end</function></title>
<programlisting role="php">
<![CDATA[
<?php
$frutas = array('melancia', 'banana', 'morango');
echo end($frutas); // morango
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>current</function></member>
<member><function>each</function></member>
<member><function>prev</function></member>
<member><function>reset</function></member>
<member><function>next</function></member>
<member><function>array_key_last</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
-->