Files

746 lines
39 KiB
Plaintext
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.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="https://www.php.net/manual/ru/index.php">
<title>PHP: Предисловие - Manual</title>
<link rel="stylesheet" type="text/css" href="/cached.php?t=&amp;f=/fonts/Fira/fira.css" media="screen">
<link rel="stylesheet" type="text/css" href="/cached.php?t=&amp;f=/fonts/Font-Awesome/css/fontello.css" media="screen">
<link rel="stylesheet" type="text/css" href="/cached.php?t=&amp;f=/styles/theme-base.css" media="screen">
<link rel="stylesheet" type="text/css" href="/cached.php?t=&amp;f=/styles/theme-medium.css" media="screen">
<link rel="icon" type="image/svg+xml" sizes="any" href="https://www.php.net/favicon.svg?v=2">
<link rel="icon" type="image/png" sizes="196x196" href="https://www.php.net/favicon-196x196.png?v=2">
<link rel="icon" type="image/png" sizes="32x32" href="https://www.php.net/favicon-32x32.png?v=2">
<link rel="icon" type="image/png" sizes="16x16" href="https://www.php.net/favicon-16x16.png?v=2">
<link rel="shortcut icon" href="https://www.php.net/favicon.ico?v=2">
<link rel="search" type="application/opensearchdescription+xml" href="https://www.php.net/phpnetimprovedsearch.src" title="Add PHP.net search">
<link rel="alternate" type="application/atom+xml" href="https://www.php.net/releases/feed.php" title="PHP Release feed">
<link rel="alternate" type="application/atom+xml" href="https://www.php.net/feed.atom" title="PHP: Hypertext Preprocessor">
<link rel="canonical" href="https://www.php.net/manual/ru/index.php">
<link rel="shorturl" href="https://www.php.net/manual/ru/index.php">
<link rel="alternate" href="https://www.php.net/manual/ru/index.php" hreflang="x-default">
<link rel="contents" href="https://www.php.net/manual/ru/index.php">
<link rel="index" href="https://www.php.net/manual/ru/">
<link rel="prev" href="https://www.php.net/manual/ru/">
<link rel="next" href="https://www.php.net/manual/ru/">
<link rel="alternate" href="https://www.php.net/manual/en/index.php" hreflang="en">
<link rel="alternate" href="https://www.php.net/manual/de/index.php" hreflang="de">
<link rel="alternate" href="https://www.php.net/manual/es/index.php" hreflang="es">
<link rel="alternate" href="https://www.php.net/manual/fr/index.php" hreflang="fr">
<link rel="alternate" href="https://www.php.net/manual/it/index.php" hreflang="it">
<link rel="alternate" href="https://www.php.net/manual/ja/index.php" hreflang="ja">
<link rel="alternate" href="https://www.php.net/manual/pt_BR/index.php" hreflang="pt_BR">
<link rel="alternate" href="https://www.php.net/manual/ru/index.php" hreflang="ru">
<link rel="alternate" href="https://www.php.net/manual/tr/index.php" hreflang="tr">
<link rel="alternate" href="https://www.php.net/manual/uk/index.php" hreflang="uk">
<link rel="alternate" href="https://www.php.net/manual/zh/index.php" hreflang="zh">
<link rel="stylesheet" type="text/css" href="/cached.php?t=&amp;f=/fonts/Fira/fira.css" media="screen">
<link rel="stylesheet" type="text/css" href="/cached.php?t=&amp;f=/fonts/Font-Awesome/css/fontello.css" media="screen">
<link rel="stylesheet" type="text/css" href="/cached.php?t=&amp;f=/styles/theme-base.css" media="screen">
<link rel="stylesheet" type="text/css" href="/cached.php?t=&amp;f=/styles/theme-medium.css" media="screen">
<meta name="Description" content="Руководство по PHP" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@official_php" />
<meta name="twitter:title" content="PHP: Предисловие - Manual" />
<meta name="twitter:description" content="Руководство по PHP" />
<meta name="twitter:creator" content="@official_php" />
<meta name="twitter:image:src" content="https://www.php.net/images/meta-image.png" />
<meta itemprop="name" content="PHP: Предисловие - Manual" />
<meta itemprop="description" content="Руководство по PHP" />
<meta itemprop="image" content="https://www.php.net/images/meta-image.png" />
<meta property="og:image" content="https://www.php.net/images/meta-image.png" />
<meta property="og:description" content="Руководство по PHP" />
<link href="https://fosstodon.org/@php" rel="me" />
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDoNotTrack", true]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.php.net/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head>
<body class="docs ">
<nav class="navbar navbar-fixed-top">
<div class="navbar__inner">
<a href="/" aria-label="PHP Home" class="navbar__brand">
<img
src="/images/logos/php-logo-white.svg"
aria-hidden="true"
width="80"
height="40"
>
</a>
<div
id="navbar__offcanvas"
tabindex="-1"
class="navbar__offcanvas"
aria-label="Menu"
role="navigation"
>
<button
id="navbar__close-button"
class="navbar__icon-item navbar_icon-item--visually-aligned navbar__close-button"
>
<svg xmlns="http://www.w3.org/2000/svg" width="24" viewBox="0 0 24 24" fill="currentColor"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>
</button>
<ul class="navbar__nav">
<li class="navbar__item">
<a
href="/downloads.php"
class="navbar__link "
>
Downloads </a>
</li>
<li class="navbar__item">
<a
href="/docs.php"
aria-current="page" class="navbar__link navbar__link--active "
>
Documentation </a>
</li>
<li class="navbar__item">
<a
href="/get-involved.php"
class="navbar__link "
>
Get Involved </a>
</li>
<li class="navbar__item">
<a
href="/support.php"
class="navbar__link "
>
Help </a>
</li>
<li class="navbar__item">
<a
href="/releases/8.5/index.php"
class="navbar__link navbar__release"
>
<img src="/images/php8/logo_php8_5.svg" alt="PHP 8.5">
</a>
</li>
</ul>
</div>
<div class="navbar__right">
<!-- Desktop default search -->
<form
action="/manual-lookup.php"
class="navbar__search-form"
>
<label for="navbar__search-input" aria-label="Search docs">
<svg
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
width="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg> </label>
<input
type="search"
name="pattern"
id="navbar__search-input"
class="navbar__search-input"
placeholder="Search docs"
accesskey="s"
>
<input type="hidden" name="scope" value="quickref">
</form>
<!-- Desktop encanced search -->
<button
id="navbar__search-button"
class="navbar__search-button"
hidden
>
<svg
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
width="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg> Search docs
</button>
<!-- Mobile default items -->
<a
id="navbar__search-link"
href="/lookup-form.php"
aria-label="Search docs"
class="navbar__icon-item navbar__search-link"
>
<svg
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
width="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg> </a>
<a
id="navbar__menu-link"
href="/menu.php"
aria-label="Menu"
class="navbar__icon-item navbar_icon-item--visually-aligned navbar_menu-link"
>
<svg xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
width="24"
viewBox="0 0 24 24"
fill="currentColor"
>
<path d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" />
</svg> </a>
<!-- Mobile enhanced items -->
<button
id="navbar__search-button-mobile"
aria-label="Search docs"
class="navbar__icon-item navbar__search-button-mobile"
hidden
>
<svg
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
width="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg> </button>
<button
id="navbar__menu-button"
aria-label="Menu"
class="navbar__icon-item navbar_icon-item--visually-aligned"
hidden
>
<svg xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
width="24"
viewBox="0 0 24 24"
fill="currentColor"
>
<path d="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z" />
</svg> </button>
</div>
<div
id="navbar__backdrop"
class="navbar__backdrop"
></div>
</div>
<div id="flash-message"></div>
</nav>
<div class="headsup"><a href='/index.php#2026-10-23-1'>Informational advisory: Session upload progress</a></div>
<nav id="trick"><div><dl>
<dt><a href='/manual/en/getting-started.php'>Getting Started</a></dt>
<dd><a href='/manual/en/introduction.php'>Introduction</a></dd>
<dd><a href='/manual/en/tutorial.php'>A simple tutorial</a></dd>
<dt><a href='/manual/en/langref.php'>Language Reference</a></dt>
<dd><a href='/manual/en/language.basic-syntax.php'>Basic syntax</a></dd>
<dd><a href='/manual/en/language.types.php'>Types</a></dd>
<dd><a href='/manual/en/language.variables.php'>Variables</a></dd>
<dd><a href='/manual/en/language.constants.php'>Constants</a></dd>
<dd><a href='/manual/en/language.expressions.php'>Expressions</a></dd>
<dd><a href='/manual/en/language.operators.php'>Operators</a></dd>
<dd><a href='/manual/en/language.control-structures.php'>Control Structures</a></dd>
<dd><a href='/manual/en/language.functions.php'>Functions</a></dd>
<dd><a href='/manual/en/language.oop5.php'>Classes and Objects</a></dd>
<dd><a href='/manual/en/language.namespaces.php'>Namespaces</a></dd>
<dd><a href='/manual/en/language.enumerations.php'>Enumerations</a></dd>
<dd><a href='/manual/en/language.error-handling.php'>Error Handling</a></dd>
<dd><a href='/manual/en/language.fibers.php'>Fibers</a></dd>
<dd><a href='/manual/en/language.generators.php'>Generators</a></dd>
<dd><a href='/manual/en/language.attributes.php'>Attributes</a></dd>
<dd><a href='/manual/en/language.references.php'>References Explained</a></dd>
<dd><a href='/manual/en/reserved.variables.php'>Predefined Variables</a></dd>
<dd><a href='/manual/en/reserved.exceptions.php'>Predefined Exceptions</a></dd>
<dd><a href='/manual/en/reserved.interfaces.php'>Predefined Interfaces and Classes</a></dd>
<dd><a href='/manual/en/reserved.attributes.php'>Predefined Attributes</a></dd>
<dd><a href='/manual/en/context.php'>Context options and parameters</a></dd>
<dd><a href='/manual/en/wrappers.php'>Supported Protocols and Wrappers</a></dd>
</dl>
<dl>
<dt><a href='/manual/en/security.php'>Security</a></dt>
<dd><a href='/manual/en/security.intro.php'>Introduction</a></dd>
<dd><a href='/manual/en/security.general.php'>General considerations</a></dd>
<dd><a href='/manual/en/security.cgi-bin.php'>Installed as CGI binary</a></dd>
<dd><a href='/manual/en/security.apache.php'>Installed as an Apache module</a></dd>
<dd><a href='/manual/en/security.sessions.php'>Session Security</a></dd>
<dd><a href='/manual/en/security.filesystem.php'>Filesystem Security</a></dd>
<dd><a href='/manual/en/security.database.php'>Database Security</a></dd>
<dd><a href='/manual/en/security.errors.php'>Error Reporting</a></dd>
<dd><a href='/manual/en/security.variables.php'>User Submitted Data</a></dd>
<dd><a href='/manual/en/security.hiding.php'>Hiding PHP</a></dd>
<dd><a href='/manual/en/security.current.php'>Keeping Current</a></dd>
<dt><a href='/manual/en/features.php'>Features</a></dt>
<dd><a href='/manual/en/features.http-auth.php'>HTTP authentication with PHP</a></dd>
<dd><a href='/manual/en/features.cookies.php'>Cookies</a></dd>
<dd><a href='/manual/en/features.sessions.php'>Sessions</a></dd>
<dd><a href='/manual/en/features.file-upload.php'>Handling file uploads</a></dd>
<dd><a href='/manual/en/features.remote-files.php'>Using remote files</a></dd>
<dd><a href='/manual/en/features.connection-handling.php'>Connection handling</a></dd>
<dd><a href='/manual/en/features.persistent-connections.php'>Persistent Database Connections</a></dd>
<dd><a href='/manual/en/features.commandline.php'>Command line usage</a></dd>
<dd><a href='/manual/en/features.gc.php'>Garbage Collection</a></dd>
<dd><a href='/manual/en/features.dtrace.php'>DTrace Dynamic Tracing</a></dd>
</dl>
<dl>
<dt><a href='/manual/en/funcref.php'>Function Reference</a></dt>
<dd><a href='/manual/en/refs.basic.php.php'>Affecting PHP's Behaviour</a></dd>
<dd><a href='/manual/en/refs.utilspec.audio.php'>Audio Formats Manipulation</a></dd>
<dd><a href='/manual/en/refs.remote.auth.php'>Authentication Services</a></dd>
<dd><a href='/manual/en/refs.utilspec.cmdline.php'>Command Line Specific Extensions</a></dd>
<dd><a href='/manual/en/refs.compression.php'>Compression and Archive Extensions</a></dd>
<dd><a href='/manual/en/refs.crypto.php'>Cryptography Extensions</a></dd>
<dd><a href='/manual/en/refs.database.php'>Database Extensions</a></dd>
<dd><a href='/manual/en/refs.calendar.php'>Date and Time Related Extensions</a></dd>
<dd><a href='/manual/en/refs.fileprocess.file.php'>File System Related Extensions</a></dd>
<dd><a href='/manual/en/refs.international.php'>Human Language and
Character Encoding Support</a></dd>
<dd><a href='/manual/en/refs.utilspec.image.php'>Image Processing and Generation</a></dd>
<dd><a href='/manual/en/refs.remote.mail.php'>Mail Related Extensions</a></dd>
<dd><a href='/manual/en/refs.math.php'>Mathematical Extensions</a></dd>
<dd><a href='/manual/en/refs.utilspec.nontext.php'>Non-Text MIME Output</a></dd>
<dd><a href='/manual/en/refs.fileprocess.process.php'>Process Control Extensions</a></dd>
<dd><a href='/manual/en/refs.basic.other.php'>Other Basic Extensions</a></dd>
<dd><a href='/manual/en/refs.remote.other.php'>Other Services</a></dd>
<dd><a href='/manual/en/refs.search.php'>Search Engine Extensions</a></dd>
<dd><a href='/manual/en/refs.utilspec.server.php'>Server Specific Extensions</a></dd>
<dd><a href='/manual/en/refs.basic.session.php'>Session Extensions</a></dd>
<dd><a href='/manual/en/refs.basic.text.php'>Text Processing</a></dd>
<dd><a href='/manual/en/refs.basic.vartype.php'>Variable and Type Related Extensions</a></dd>
<dd><a href='/manual/en/refs.webservice.php'>Web Services</a></dd>
<dd><a href='/manual/en/refs.utilspec.windows.php'>Windows Only Extensions</a></dd>
<dd><a href='/manual/en/refs.xml.php'>XML Manipulation</a></dd>
<dd><a href='/manual/en/refs.ui.php'>GUI Extensions</a></dd>
</dl>
<dl>
<dt>Keyboard Shortcuts</dt><dt>?</dt>
<dd>This help</dd>
<dt>j</dt>
<dd>Next menu item</dd>
<dt>k</dt>
<dd>Previous menu item</dd>
<dt>g p</dt>
<dd>Previous man page</dd>
<dt>g n</dt>
<dd>Next man page</dd>
<dt>G</dt>
<dd>Scroll to bottom</dd>
<dt>g g</dt>
<dd>Scroll to top</dd>
<dt>g h</dt>
<dd>Goto homepage</dd>
<dt>g s</dt>
<dd>Goto search<br>(current page)</dd>
<dt>/</dt>
<dd>Focus search box</dd>
</dl></div></nav>
<div id="goto">
<div class="search">
<div class="text"></div>
<div class="results"><ul></ul></div>
</div>
</div>
<div id="layout" class="clearfix">
<section id="layout-content">
<div class="page-tools">
<div class="change-language">
<form action="/manual/change.php" method="get" id="changelang" name="changelang">
<fieldset>
<label for="changelang-langs">Язык:</label>
<select onchange="document.changelang.submit()" name="page" id="changelang-langs">
<option value='en/index.php'>English</option>
<option value='de/index.php'>German</option>
<option value='es/index.php'>Spanish</option>
<option value='fr/index.php'>French</option>
<option value='it/index.php'>Italian</option>
<option value='ja/index.php'>Japanese</option>
<option value='pt_BR/index.php'>Brazilian Portuguese</option>
<option value='ru/index.php' selected="selected">Russian</option>
<option value='tr/index.php'>Turkish</option>
<option value='uk/index.php'>Ukrainian</option>
<option value='zh/index.php'>Chinese (Simplified)</option>
<option value='help-translate.php'>Other</option>
</select>
</fieldset>
</form>
</div>
</div><div id="index" class="set">
<h1 class="title">Руководство по PHP</h1>
<div class="info">
<div class="pubdate">2026-10-26</div>
<div class="authorgroup" id="translators">
<div class="author vcard"><strong class="by">от</strong>:<br />
<span class="personname fn">
<span class="firstname given-name">Алексей</span> <span class="surname family-name">Пыльцын</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Андрей</span> <span class="surname family-name">Громов</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Евгений</span> <span class="surname family-name">Четвериков</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Михаил</span> <span class="surname family-name">Алфёров</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Сергей</span> <span class="surname family-name">Зорин</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Сергей</span> <span class="surname family-name">Пантелеев</span>
</span>
</div>
</div>
<div class="authorgroup" id="translators.old">
<div class="author vcard"><strong class="by">от</strong>:<br />
<span class="personname fn">
<span class="firstname given-name">Александр</span> <span class="surname family-name">Москалёв</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Александр</span> <span class="surname family-name">Войцеховский</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Алексей</span> <span class="surname family-name">Асемов</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Алексей</span> <span class="surname family-name">Егоров</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Алексей</span> <span class="surname family-name">Шеин</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Андрей</span> <span class="surname family-name">Безруков</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Андрей</span> <span class="surname family-name">Деменев</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Антон</span> <span class="surname family-name">Довгаль</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Борис</span> <span class="surname family-name">Безруков</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Борис</span> <span class="surname family-name">Клименко</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Борис</span> <span class="surname family-name">Флейтлих</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Даниил</span> <span class="surname family-name">Реужков</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Дмитрий</span> <span class="surname family-name">Винярчук</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Евгений</span> <span class="surname family-name">Сюзев</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Иван</span> <span class="surname family-name">Коваленко</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Казбек</span> <span class="surname family-name">Джигкаев</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Кирилл</span> <span class="surname family-name">Барашкин</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Максим</span> <span class="surname family-name">Чабан</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Михаил</span> <span class="surname family-name">Баранов</span>
</span>
</div>
<div class="author vcard">
<span class="personname fn">
<span class="firstname given-name">Юрий</span> <span class="surname family-name">Бабиков</span>
</span>
</div>
</div>
</div>
<ul class="chunklist chunklist_set"><li><a href="copyright.php">Авторские права</a></li><li><a href="getting-started.php">Приступая к работе</a><ul class="chunklist chunklist_set chunklist_children"><li><a href="introduction.php">Введение</a> — Что такое PHP и что он умеет делать</li><li><a href="tutorial.php">Простой учебник</a></li></ul></li><li><a href="install.php">Установка и настройка</a><ul class="chunklist chunklist_set chunklist_children"><li><a href="install.general.php">Общие инструкции по установке</a></li><li><a href="install.unix.php">Установка в Unix-системы</a></li><li><a href="install.macosx.php">Установка на macOS</a></li><li><a href="install.windows.php">Установка в системы с ОС Windows</a></li><li><a href="install.cloud.php">Установка на платформах Cloud Computing</a></li><li><a href="install.fpm.php">Менеджер процессов FastCGI (FPM)</a></li><li><a href="install.pecl.php">Установка PECL-модулей</a></li><li><a href="install.composer.intro.php">Знакомство с пакетным менеджером Composer</a></li><li><a href="install.pie.intro.php">Введение в PIE</a></li><li><a href="configuration.php">Конфигурация времени выполнения</a></li></ul></li><li><a href="langref.php">Справочник языка</a><ul class="chunklist chunklist_set chunklist_children"><li><a href="language.basic-syntax.php">Основы синтаксиса</a></li><li><a href="language.types.php">Типы</a></li><li><a href="language.variables.php">Переменные</a></li><li><a href="language.constants.php">Константы</a></li><li><a href="language.expressions.php">Выражения</a></li><li><a href="language.operators.php">Операторы</a></li><li><a href="language.control-structures.php">Управляющие конструкции</a></li><li><a href="language.functions.php">Функции</a></li><li><a href="language.oop5.php">Классы и объекты</a></li><li><a href="language.namespaces.php">Пространства имён</a></li><li><a href="language.enumerations.php">Перечисления</a></li><li><a href="language.error-handling.php">Error Handling</a></li><li><a href="language.fibers.php">Fibers</a></li><li><a href="language.generators.php">Генераторы</a></li><li><a href="language.attributes.php">Атрибуты</a></li><li><a href="language.references.php">Объяснение ссылок</a></li><li><a href="reserved.variables.php">Предопределённые переменные</a></li><li><a href="reserved.exceptions.php">Предопределённые исключения</a></li><li><a href="reserved.interfaces.php">Встроенные интерфейсы и классы</a></li><li><a href="reserved.attributes.php">Предопределённые атрибуты</a></li><li><a href="context.php">Опции и параметры контекста</a></li><li><a href="wrappers.php">Протоколы и обёртки</a></li></ul></li><li><a href="security.php">Безопасность</a><ul class="chunklist chunklist_set chunklist_children"><li><a href="security.intro.php">Вступление</a></li><li><a href="security.general.php">Общие соображения</a></li><li><a href="security.cgi-bin.php">О безопасности PHP в режиме CGI-программы</a></li><li><a href="security.apache.php">Если PHP установлен как модуль Apache</a></li><li><a href="security.sessions.php">Безопасность сессий</a></li><li><a href="security.filesystem.php">Безопасность файловой системы</a></li><li><a href="security.database.php">Безопасность баз данных</a></li><li><a href="security.errors.php">Сообщения об ошибках</a></li><li><a href="security.variables.php">Данные пользовательского ввода</a></li><li><a href="security.hiding.php">Сокрытие PHP</a></li><li><a href="security.current.php">Необходимость обновлений</a></li></ul></li><li><a href="features.php">Особенности</a><ul class="chunklist chunklist_set chunklist_children"><li><a href="features.http-auth.php">HTTP-аутентификация в PHP</a></li><li><a href="features.cookies.php">Cookies</a></li><li><a href="features.sessions.php">Сессии</a></li><li><a href="features.file-upload.php">Загрузка файлов на сервер</a></li><li><a href="features.remote-files.php">Работа с удалёнными файлами</a></li><li><a href="features.connection-handling.php">Работа с соединениями</a></li><li><a href="features.persistent-connections.php">Постоянные соединения с базами данных</a></li><li><a href="features.commandline.php">Работа с PHP из командной строки</a></li><li><a href="features.gc.php">Сборка мусора</a></li><li><a href="features.dtrace.php">Динамическая трассировка DTrace</a></li></ul></li><li><a href="funcref.php">Справочник функций</a><ul class="chunklist chunklist_set chunklist_children"><li><a href="refs.basic.php.php">Изменение поведения PHP</a></li><li><a href="refs.utilspec.audio.php">Обработка аудиоформатов</a></li><li><a href="refs.remote.auth.php">Службы аутентификации</a></li><li><a href="refs.utilspec.cmdline.php">Модули для работы с командной строкой</a></li><li><a href="refs.compression.php">Модули сжатия и архивации</a></li><li><a href="refs.crypto.php">Криптографические модули</a></li><li><a href="refs.database.php">Модули для работы с базами данных</a></li><li><a href="refs.calendar.php">Модули для работы с датой и временем</a></li><li><a href="refs.fileprocess.file.php">Модули для работы с файловой системой</a></li><li><a href="refs.international.php">Поддержка языков и кодировок</a></li><li><a href="refs.utilspec.image.php">Обработка и генерация изображений</a></li><li><a href="refs.remote.mail.php">Модули для работы с почтой</a></li><li><a href="refs.math.php">Математические модули</a></li><li><a href="refs.utilspec.nontext.php">Генерация нетекстовых MIME-форматов</a></li><li><a href="refs.fileprocess.process.php">Модули управления процессами программ</a></li><li><a href="refs.basic.other.php">Другие базовые модули</a></li><li><a href="refs.remote.other.php">Другие службы</a></li><li><a href="refs.search.php">Модули для работы с поисковыми системами</a></li><li><a href="refs.utilspec.server.php">Модули для работы с серверами</a></li><li><a href="refs.basic.session.php">Модули для работы с сессиями</a></li><li><a href="refs.basic.text.php">Обработка текста</a></li><li><a href="refs.basic.vartype.php">Модули для работы с переменными и типами</a></li><li><a href="refs.webservice.php">Веб-сервисы</a></li><li><a href="refs.utilspec.windows.php">Модули только для Windows</a></li><li><a href="refs.xml.php">Обработка XML</a></li><li><a href="refs.ui.php">Модули для работы с GUI</a></li></ul></li><li><a href="faq.php">ЧАВО</a> — Часто задаваемые вопросы<ul class="chunklist chunklist_set chunklist_children"><li><a href="faq.general.php">Общая информация</a></li><li><a href="faq.mailinglist.php">Списки рассылки</a></li><li><a href="faq.obtaining.php">О получении PHP</a></li><li><a href="faq.databases.php">Вопросы по базам данных</a> — Вопросы по Базам данных</li><li><a href="faq.installation.php">Установка</a></li><li><a href="faq.build.php">Проблемы сборки</a></li><li><a href="faq.using.php">Использование PHP</a></li><li><a href="faq.passwords.php">Хеширование паролей</a> — Безопасное и надежное хеширование паролей</li><li><a href="faq.html.php">PHP и HTML</a> — PHP и HTML-разметка</li><li><a href="faq.com.php">PHP и COM</a></li><li><a href="faq.misc.php">Разные вопросы</a></li></ul></li><li><a href="appendices.php">Приложения</a><ul class="chunklist chunklist_set chunklist_children"><li><a href="history.php">История PHP и смежных проектов</a></li><li><a href="examples.php">О примерах руководства</a></li><li><a href="migration86.php">Migrating from PHP 8.5.x to PHP 8.6.x</a></li><li><a href="migration85.php">Миграция с PHP 8.4.x на PHP 8.5.x</a></li><li><a href="migration84.php">Миграция с PHP 8.3.x на PHP 8.4.x</a></li><li><a href="migration83.php">Миграция с PHP 8.2.x на PHP 8.3.x</a></li><li><a href="migration82.php">Миграция с PHP 8.1.x на PHP 8.2.x</a></li><li><a href="migration81.php">Миграция с PHP 8.0.x на PHP 8.1.x</a></li><li><a href="migration80.php">Миграция с PHP 7.4.x на PHP 8.0.x</a></li><li><a href="migration74.php">Миграция с PHP 7.3.x на PHP 7.4.x</a></li><li><a href="migration73.php">Миграция с PHP 7.2.x на PHP 7.3.x</a></li><li><a href="migration72.php">Миграция с PHP 7.1.x на PHP 7.2.x</a></li><li><a href="migration71.php">Миграция с PHP 7.0.x на PHP 7.1.x</a></li><li><a href="migration70.php">Миграция с PHP 5.6.x на PHP 7.0.x</a></li><li><a href="migration56.php">Миграция с PHP 5.5.x на PHP 5.6.x</a></li><li><a href="debugger.php">Отладка в PHP</a></li><li><a href="configure.php">Опции конфигурации</a></li><li><a href="ini.php">Директивы php.ini</a></li><li><a href="extensions.php">Список модулей</a></li><li><a href="aliases.php">Список псевдонимов функций</a></li><li><a href="reserved.php">Список зарезервированных слов</a></li><li><a href="resource.php">Список типов ресурсов</a></li><li><a href="filters.php">Список доступных фильтров</a></li><li><a href="transports.php">Список транспортов для работы с сокетами</a></li><li><a href="types.comparisons.php">Таблицы сравнения типов PHP</a></li><li><a href="tokens.php">Список токенов парсера</a></li><li><a href="userlandnaming.php">Руководство по именованию</a></li><li><a href="about.php">О руководстве</a></li><li><a href="cc.license.php">Creative Commons Attribution 3.0</a></li><li><a href="indexes.php">Алфавитный список</a></li><li><a href="doc.changelog.php">Список изменений</a></li></ul></li></ul></div> <div class="contribute">
<h3 class="title">Нашли ошибку?</h3>
<div>
</div>
<div class="edit-bug">
<a href="https://github.com/php/doc-base/blob/master/README.md" title="Github-инструкция по улучшению страниц" target="_blank" rel="noopener noreferrer">Инструкция</a>
•
<a href="https://github.com/php/doc-ru">Исправление</a>
•
<a href="https://github.com/php/doc-ru/issues/new?body=From%20manual%20page:%20https:%2F%2Fphp.net%2Findex%0A%0A---">Сообщение об ошибке</a>
</div>
</div><section id="usernotes">
<div class="head">
<span class="action"><a href="/manual/add-note.php?sect=index&amp;repo=ru&amp;redirect=https://www.php.net/manual/ru/index.php">+<small>Добавить</small></a></span>
<h3 class="title">Примечания пользователей </h3>
</div>
<div class="note">Пользователи ещё не добавляли примечания для страницы</div></section> </section><!-- layout-content -->
</div><!-- layout -->
<footer>
<div class="container footer-content">
<div class="row-fluid">
<ul class="footmenu">
<li><a href="/manual/ru/copyright.php">Copyright &copy; 2001-2026 The PHP Documentation Group</a></li>
<li><a href="/my.php">My PHP.net</a></li>
<li><a href="/contact.php">Contact</a></li>
<li><a href="/sites.php">Other PHP.net sites</a></li>
<li><a href="/privacy.php">Privacy policy</a></li>
</ul>
</div>
</div>
</footer>
<script src="/cached.php?t=&amp;f=/js/ext/jquery-3.6.0.min.js"></script>
<script src="/cached.php?t=&amp;f=/js/ext/FuzzySearch.min.js"></script>
<script src="/cached.php?t=&amp;f=/js/ext/mousetrap.min.js"></script>
<script src="/cached.php?t=&amp;f=/js/ext/jquery.scrollTo.min.js"></script>
<script src="/cached.php?t=&amp;f=/js/search.js"></script>
<script src="/cached.php?t=&amp;f=/js/common.js"></script>
<script type="module" src="/cached.php?t=&amp;f=/js/interactive-examples.js"></script>
<a id="toTop" href="javascript:;"><span id="toTopHover"></span><img width="40" height="40" alt="To Top" src="/images/to-top@2x.png"></a>
<div id="search-modal__backdrop" class="search-modal__backdrop">
<div
role="dialog"
aria-label="Search modal"
id="search-modal"
class="search-modal"
>
<div class="search-modal__header">
<div class="search-modal__form">
<div class="search-modal__input-icon">
<!-- https://feathericons.com search -->
<svg xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
width="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg>
</div>
<input
type="search"
id="search-modal__input"
class="search-modal__input"
placeholder="Search docs"
aria-label="Search docs"
/>
</div>
<button aria-label="Close" class="search-modal__close">
<!-- https://pictogrammers.com/library/mdi/icon/close/ -->
<svg
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
width="24"
viewBox="0 0 24 24"
>
<path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"/>
</svg>
</button>
</div>
<div
role="listbox"
aria-label="Search results"
id="search-modal__results"
class="search-modal__results"
></div>
<div class="search-modal__helper-text">
<div>
<kbd>↑</kbd> and <kbd>↓</kbd> to navigate •
<kbd>Enter</kbd> to select •
<kbd>Esc</kbd> to close • <kbd>/</kbd> to open
</div>
<div>
Press <kbd>Enter</kbd> without
selection to search using Google
</div>
</div>
</div>
</div>
</body>
</html>