1
0
mirror of https://github.com/php/doc-ru.git synced 2026-03-24 15:52:13 +01:00
Files
Mikhail Alferov 619c94f977 Update 761d722 to En (#1092)
* Update book.xml to en

* Update ceil.xml to en

* Update deg2rad.xml to en

* Update exp.xml to En

* Update floor.xml to en

* Update fmod.xml to en

* Update hexdec.xml to en

* Update intdiv.xml to en

* Update max.xml to en

* Update min.xml to en

* Update pi.xml to en

* Update pow.xml to en

* Update sin.xml to en

* Update sqrt.xml to en
2025-07-22 15:05:38 +03:00

147 lines
4.7 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: 761d72245071f89a626903c9bcdc6aaff1252d54 Maintainer: das Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.hexdec" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>hexdec</refname>
<refpurpose>Переводит число из шестнадцатеричной системы счисления в десятичную</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>int</type><type>float</type></type><methodname>hexdec</methodname>
<methodparam><type>string</type><parameter>hex_string</parameter></methodparam>
</methodsynopsis>
<para>
Функция возвращает десятичный эквивалент шестнадцатеричного числа, которое указали в параметре
<parameter>hex_string</parameter>.
Функция <function>hexdec</function> преобразовывает шестнадцатеричную строку
в десятичное число.
</para>
<para>
Функция <function>hexdec</function> проигнорирует нешестнадцатеричные символы,
которые встретит.
Начиная с PHP 7.4.0 передача недопустимых символов устарела.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>hex_string</parameter></term>
<listitem>
<para>
Шестнадцатеричная строка для преобразования.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Функция возвращает десятичное представление строки <parameter>hex_string</parameter>.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>7.4.0</entry>
<entry>
Передача недопустимых символов теперь выдаёт уведомление об устаревании.
Результат по-прежнему вычисляется так, как если бы недопустимые символы не передавались.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример преобразования шестнадцатеричного представления числа в десятичное функцией <function>hexdec</function></title>
<programlisting role="php">
<![CDATA[
<?php
var_dump(hexdec("ee")); // Выводит "int(238)"
var_dump(hexdec("a0")); // Выводит "int(160)"
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title>Пример работы функции <function>hexdec</function> с недопустимыми символами</title>
<programlisting role="php">
<![CDATA[
<?php
var_dump(hexdec("See")); // Выводит "int(238)"
var_dump(hexdec("that")); // Выводит "int(10)"
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<para>
Функция умеет конвертировать числа, которые слишком велики,
чтобы вписаться в целочисленный тип данных (<type>int</type>) платформ,
результатом обработки таких значений будет число с плавающей точкой <type>float</type>.
</para>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>dechex</function></member>
<member><function>bindec</function></member>
<member><function>octdec</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
-->