mirror of
https://github.com/php/doc-de.git
synced 2026-03-24 15:22:14 +01:00
138 lines
3.4 KiB
XML
138 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 0c9c2dd669fe9395eaa73d487fbd160f9057429a Maintainer: hholzgra Status: ready -->
|
|
<refentry xml:id="function.dechex" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>dechex</refname>
|
|
<refpurpose>Wandelt von dezimal zu hexadezimal um</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>dechex</methodname>
|
|
<methodparam><type>int</type><parameter>num</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Gibt die hexadezimale Darstellung der in <parameter>num</parameter>
|
|
angegebenen vorzeichenlosen Ganzzahl als Zeichenkette zurück.
|
|
</para>
|
|
<para>
|
|
Der größte umwandelbare Wert ist
|
|
<constant>PHP_INT_MAX</constant><literal> * 2 + 1</literal> (oder
|
|
<literal>-1</literal>): auf 32bit-Platformen ist dies
|
|
<literal>4294967295</literal> in Dezimaldarstellung, was in
|
|
<function>dechex</function> <literal>ffffffff</literal> zurückgibt.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>num</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Der umzuwandelnde Wert.
|
|
</para>
|
|
<para>
|
|
Da der Typ <type>int</type> von PHP vorzeichenbehaftet ist, aber
|
|
<function>dechex</function> nur vorzeichenlose Ganzzahlen umwandelt,
|
|
werden negative Ganzzahlen behandelt, als wären sie vorzeichenlos.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Die hexadezimale Zeichenkettendarstellung von <parameter>num</parameter>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>dechex</function>-Beispiel</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
echo dechex(10) . "\n";
|
|
echo dechex(47);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
a
|
|
2f
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title><function>dechex</function>-Beispiel mit großen Ganzzahlen</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// Die Ausgaben weiter unten setzen eine 32bit-Plattform voraus.
|
|
// Es ist zu beachten, dass die Ausgabe für alle Werte gleich ist.
|
|
echo dechex(-1)."\n";
|
|
echo dechex(PHP_INT_MAX * 2 + 1)."\n";
|
|
echo dechex(pow(2, 32) - 1)."\n";
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
ffffffff
|
|
ffffffff
|
|
ffffffff
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>hexdec</function></member>
|
|
<member><function>decbin</function></member>
|
|
<member><function>decoct</function></member>
|
|
<member><function>base_convert</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
|
|
-->
|