1
0
mirror of https://github.com/php/doc-tr.git synced 2026-03-24 15:22:23 +01:00
Files
archived-doc-tr/reference/array/functions/array-key-first.xml
Nilgün Belma Bugüner b67e38b421 new translation
2021-03-15 08:25:00 +03:00

128 lines
3.2 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: cd943f94a013b74df8765ab8e1a620a916a64a85 Maintainer: nilgun Status: ready -->
<refentry xml:id="function.array-key-first" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>array_key_first</refname>
<refpurpose>Dizinin ilk anahtarı ile döner</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>int</type><type>string</type><type>null</type></type><methodname>array_key_first</methodname>
<methodparam><type>array</type><parameter>dizi</parameter></methodparam>
</methodsynopsis>
<para>
Dahili dizi göstericisini etkilemeden belirtilen
<parameter>dizi</parameter>nin ilk anahtarı ile döner.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>dizi</parameter></term>
<listitem>
<para>
İlk anahtarı istenen dizi.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Dizi boş değilse <parameter>dizi</parameter>nin ilk anahtarı ile döner;
aksi takdirde &null; döner.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example xml:id="array_key_first.example.basic">
<title>- <function>array_key_first</function> Temel Kullanım Örneği</title>
<programlisting role="php">
<![CDATA[
<?php
$dizi = ['a' => 1, 'b' => 2, 'c' => 3];
$ilkAnh = array_key_first($dizi);
var_dump($ilkAnh);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
string(1) "a"
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<tip>
<simpara>
PHP 7.3.0'dan önceki sürümlerde bu işlevselliği sağlamanın çeşitli
yolları vardır. <function>array_keys</function> işlevi kullanılabilir
ama oldukça verimsiz olabilir. <function>reset</function> ve
<function>key</function> işlevleri ise dahili dizi göstericisini
değiştirebilir. Dahili dizi göstericisini değiştirmeyen aşağıdaki
örnek en verimli çözüm olabilir:
</simpara>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
if (!function_exists('array_key_first')) {
function array_key_first(array $dizi) {
foreach($dizi as $key => $unused) {
return $key;
}
return NULL;
}
}
?>
]]>
</programlisting>
</informalexample>
</tip>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>array_key_last</function></member>
<member><function>reset</function></member>
</simplelist>
</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
-->