Merge branch 'master' of github.com:php/doc-en

This commit is contained in:
Derick Rethans 2021-08-06 17:33:28 +01:00
commit 388226f9e1
2997 changed files with 17729 additions and 143275 deletions

View file

@ -39,5 +39,8 @@ jobs:
path: "doc-base"
repository: "php/doc-base"
- name: "Quality Assurance scripts"
run: "php8.0 doc-base/scripts/qa/extensions.xml.php --check"
- name: "Build documentation for ${{ matrix.language }}"
run: "php8.0 doc-base/configure.php --disable-libxml-check --enable-xml-details --redirect-stderr-to-stdout --with-lang=${{ matrix.language }}"

View file

@ -221,11 +221,6 @@
<entry><function>ldap_unbind</function></entry>
<entry><link linkend="ref.ldap">LDAP</link></entry>
</row>
<row>
<entry>magic_quotes_runtime</entry>
<entry><function>set_magic_quotes_runtime</function></entry>
<entry>Base syntax</entry>
</row>
<row>
<entry>mbstrcut</entry>
<entry><function>mb_strcut</function></entry>

View file

@ -168,29 +168,6 @@ code!
</listitem>
</varlistentry>
<varlistentry xml:id="configure.enable-memory-limit">
<term>
<option role="configure">--enable-memory-limit</option>
</term>
<listitem>
<para>
Compile with memory limit support.
(not available since PHP 5.2.1 - always enabled)
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="configure.disable-url-fopen-wrapper">
<term>
<option role="configure">--disable-url-fopen-wrapper</option>
</term>
<listitem>
<para>
Disable the URL-aware fopen wrapper that allows
accessing files via HTTP or FTP.
(not available since PHP 5.2.5)
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="configure.enable-versioning.php4">
<term>
<option role="configure">--enable-versioning</option>

View file

@ -73,7 +73,7 @@
</term>
<listitem>
<para>
Enable phpdbg interactive debugger SAPI module support in PHP 5.6.x or later.
Enable phpdbg interactive debugger SAPI module support.
</para>
</listitem>
</varlistentry>
@ -112,100 +112,11 @@
Disable building CGI version of PHP.
</para>
<para>
As of PHP 5.3.0 this argument enables FastCGI which previously
had to be enabled using <literal>--enable-fastcgi</literal>.
This argument also enables FastCGI.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="configure.enable-force-cgi-redirect">
<term>
<option role="configure">--enable-force-cgi-redirect</option>
</term>
<listitem>
<para>
Enable the security check for internal server redirects. You should use
this if you are running the CGI version with Apache.
</para>
<para>
As of PHP 5.3.0 this argument is enabled by default and no longer
exists. To disable this, the
<link linkend="ini.cgi.force-redirect">cgi.force_redirect</link> ini directive
should be set to <literal>0</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="configure.enable-discard-path">
<term>
<option role="configure">--enable-discard-path</option>
</term>
<listitem>
<para>
If this is enabled, the PHP CGI binary can safely be placed outside of
the web tree and people will not be able to circumvent &htaccess;
security.
</para>
<para>
As of PHP 5.3.0 this argument is disabled by default and no longer
exists. To enable this feature the cgi.discard_path ini directive
must be set to <literal>1</literal>.
</para>
</listitem>
</varlistentry>
<!--<varlistentry xml:id="configure.disable-path-info-check">
<term>
<option role="configure">disable-path-info-check</option>
</term>
<listitem>
<para>
Disables path info checks, disabling paths such as
<literal>/file.php/test?a=b</literal>.
</para>
<para>
As of PHP 5.3.0 this argument is enabled by default and no longer
exists. To disable this, the
<link linkend="ini.cgi.fix-pathinfo">cgi.fix_pathinfo</link> ini directive
should be set to <literal>0</literal>.
</para>
</listitem>
</varlistentry> -->
<varlistentry xml:id="configure.enable-fastcgi">
<term>
<option role="configure">--enable-fastcgi</option>
</term>
<listitem>
<para>
If this is enabled, the CGI module will be built with support for FastCGI
also.
</para>
<para>
As of PHP 5.3.0 this argument no longer exists and is enabled by
<literal>--enable-cgi</literal> instead.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="configure.disable-path-info-check">
<term>
<option role="configure">--disable-path-info-check</option>
</term>
<listitem>
<para>
If this is disabled, paths such as <filename>/info.php/test?a=b</filename>
will fail to work. For more information see the
<link xlink:href="&url.apache.core;#acceptpathinfo">Apache Manual</link>.
</para>
<para>
As of PHP 5.3.0 this argument is enabled by default and no longer exists.
To disable this feature the <link
linkend="ini.cgi.fix-pathinfo">cgi.fix_pathinfo</link> ini directive must
be set to <literal>0</literal>.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>

View file

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!--
DO NOT TRANSLATE THIS FILE! All the content that is displayed
on the extension categorization page in your translated manual
@ -18,9 +17,10 @@
<listitem><simpara><xref linkend="book.bc"/></simpara></listitem>
<listitem><simpara><xref linkend="book.bzip2"/></simpara></listitem>
<listitem><simpara><xref linkend="book.calendar"/></simpara></listitem>
<listitem><simpara><xref linkend="book.classkit"/></simpara></listitem>
<listitem><simpara><xref linkend="book.classobj"/></simpara></listitem>
<listitem><simpara><xref linkend="book.cmark"/></simpara></listitem>
<listitem><simpara><xref linkend="book.com"/></simpara></listitem>
<listitem><simpara><xref linkend="book.componere"/></simpara></listitem>
<listitem><simpara><xref linkend="book.csprng"/></simpara></listitem>
<listitem><simpara><xref linkend="book.ctype"/></simpara></listitem>
<listitem><simpara><xref linkend="book.cubrid"/></simpara></listitem>
@ -28,7 +28,6 @@
<listitem><simpara><xref linkend="book.datetime"/></simpara></listitem>
<listitem><simpara><xref linkend="book.dba"/></simpara></listitem>
<listitem><simpara><xref linkend="book.dbase"/></simpara></listitem>
<listitem><simpara><xref linkend="book.dbplus"/></simpara></listitem>
<listitem><simpara><xref linkend="book.dio"/></simpara></listitem>
<listitem><simpara><xref linkend="book.dir"/></simpara></listitem>
<listitem><simpara><xref linkend="book.dom"/></simpara></listitem>
@ -42,11 +41,10 @@
<listitem><simpara><xref linkend="book.exif"/></simpara></listitem>
<listitem><simpara><xref linkend="book.expect"/></simpara></listitem>
<listitem><simpara><xref linkend="book.fann"/></simpara></listitem>
<listitem><simpara><xref linkend="book.fann"/></simpara></listitem>
<listitem><simpara><xref linkend="book.fbsql"/></simpara></listitem>
<listitem><simpara><xref linkend="book.fdf"/></simpara></listitem>
<listitem><simpara><xref linkend="book.ffi"/></simpara></listitem>
<listitem><simpara><xref linkend="book.fileinfo"/></simpara></listitem>
<listitem><simpara><xref linkend="book.filepro"/></simpara></listitem>
<listitem><simpara><xref linkend="book.filesystem"/></simpara></listitem>
<listitem><simpara><xref linkend="book.filter"/></simpara></listitem>
<listitem><simpara><xref linkend="book.fpm"/></simpara></listitem>
@ -68,13 +66,13 @@
<listitem><simpara><xref linkend="book.imagick"/></simpara></listitem>
<listitem><simpara><xref linkend="book.imap"/></simpara></listitem>
<listitem><simpara><xref linkend="book.info"/></simpara></listitem>
<listitem><simpara><xref linkend="book.ingres"/></simpara></listitem>
<listitem><simpara><xref linkend="book.inotify"/></simpara></listitem>
<listitem><simpara><xref linkend="book.intl"/></simpara></listitem>
<listitem><simpara><xref linkend="book.json"/></simpara></listitem>
<listitem><simpara><xref linkend="book.ldap"/></simpara></listitem>
<listitem><simpara><xref linkend="book.libxml"/></simpara></listitem>
<listitem><simpara><xref linkend="book.lua"/></simpara></listitem>
<listitem><simpara><xref linkend="book.luasandbox"/></simpara></listitem>
<listitem><simpara><xref linkend="book.lzf"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mail"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mailparse"/></simpara></listitem>
@ -83,22 +81,13 @@
<listitem><simpara><xref linkend="book.mcrypt"/></simpara></listitem>
<listitem><simpara><xref linkend="book.memcache"/></simpara></listitem>
<listitem><simpara><xref linkend="book.memcached"/></simpara></listitem>
<listitem><simpara><xref linkend="book.memtrack"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mhash"/></simpara></listitem>
<listitem><simpara><xref linkend="book.misc"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mongo"/></simpara></listitem>
<listitem><simpara><xref linkend="book.bson"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mongodb"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mqseries"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mysql"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mysql-xdevapi"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mysqli"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mysqlnd"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mysqlnd-memcache"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mysqlnd-ms"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mysqlnd-mux"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mysqlnd-qc"/></simpara></listitem>
<listitem><simpara><xref linkend="book.mysqlnd-uh"/></simpara></listitem>
<listitem><simpara><xref linkend="book.ncurses"/></simpara></listitem>
<listitem><simpara><xref linkend="book.network"/></simpara></listitem>
<listitem><simpara><xref linkend="book.oauth"/></simpara></listitem>
<listitem><simpara><xref linkend="book.oci8"/></simpara></listitem>
@ -106,7 +95,7 @@
<listitem><simpara><xref linkend="book.openal"/></simpara></listitem>
<listitem><simpara><xref linkend="book.openssl"/></simpara></listitem>
<listitem><simpara><xref linkend="book.outcontrol"/></simpara></listitem>
<listitem><simpara><xref linkend="book.paradox"/></simpara></listitem>
<listitem><simpara><xref linkend="book.parallel"/></simpara></listitem>
<listitem><simpara><xref linkend="book.parle"/></simpara></listitem>
<listitem><simpara><xref linkend="book.password"/></simpara></listitem>
<listitem><simpara><xref linkend="book.pcntl"/></simpara></listitem>
@ -125,19 +114,20 @@
<listitem><simpara><xref linkend="ref.pdo-sqlsrv"/></simpara></listitem>
<listitem><simpara><xref linkend="book.pgsql"/></simpara></listitem>
<listitem><simpara><xref linkend="book.phar"/></simpara></listitem>
<listitem><simpara><xref linkend="book.phpdbg"/></simpara></listitem>
<listitem><simpara><xref linkend="book.pht"/></simpara></listitem>
<listitem><simpara><xref linkend="book.posix"/></simpara></listitem>
<listitem><simpara><xref linkend="book.proctitle"/></simpara></listitem>
<listitem><simpara><xref linkend="book.ps"/></simpara></listitem>
<listitem><simpara><xref linkend="book.pspell"/></simpara></listitem>
<listitem><simpara><xref linkend="book.pthreads"/></simpara></listitem>
<listitem><simpara><xref linkend="book.quickhash"/></simpara></listitem>
<listitem><simpara><xref linkend="book.radius"/></simpara></listitem>
<listitem><simpara><xref linkend="book.rar"/></simpara></listitem>
<listitem><simpara><xref linkend="book.readline"/></simpara></listitem>
<listitem><simpara><xref linkend="book.recode"/></simpara></listitem>
<listitem><simpara><xref linkend="book.reflection"/></simpara></listitem>
<listitem><simpara><xref linkend="book.regex"/></simpara></listitem>
<listitem><simpara><xref linkend="book.rpminfo"/></simpara></listitem>
<listitem><simpara><xref linkend="book.rrd"/></simpara></listitem>
<listitem><simpara><xref linkend="book.runkit7"/></simpara></listitem>
<listitem><simpara><xref linkend="book.scoutapm"/></simpara></listitem>
<listitem><simpara><xref linkend="book.seaslog"/></simpara></listitem>
<listitem><simpara><xref linkend="book.sem"/></simpara></listitem>
@ -149,17 +139,14 @@
<listitem><simpara><xref linkend="book.sockets"/></simpara></listitem>
<listitem><simpara><xref linkend="book.sodium"/></simpara></listitem>
<listitem><simpara><xref linkend="book.solr"/></simpara></listitem>
<listitem><simpara><xref linkend="book.sphinx"/></simpara></listitem>
<listitem><simpara><xref linkend="book.spl"/></simpara></listitem>
<listitem><simpara><xref linkend="book.sqlite3"/></simpara></listitem>
<listitem><simpara><xref linkend="book.sqlsrv"/></simpara></listitem>
<listitem><simpara><xref linkend="book.ssdeep"/></simpara></listitem>
<listitem><simpara><xref linkend="book.ssh2"/></simpara></listitem>
<listitem><simpara><xref linkend="book.stats"/></simpara></listitem>
<listitem><simpara><xref linkend="book.stomp"/></simpara></listitem>
<listitem><simpara><xref linkend="book.stream"/></simpara></listitem>
<listitem><simpara><xref linkend="book.strings"/></simpara></listitem>
<!-- <listitem><simpara><xref linkend="book.suhosin"/></simpara></listitem> -->
<listitem><simpara><xref linkend="book.svm"/></simpara></listitem>
<listitem><simpara><xref linkend="book.svn"/></simpara></listitem>
<listitem><simpara><xref linkend="book.swoole"/></simpara></listitem>
@ -168,7 +155,6 @@
<listitem><simpara><xref linkend="book.tcpwrap"/></simpara></listitem>
<listitem><simpara><xref linkend="book.tidy"/></simpara></listitem>
<listitem><simpara><xref linkend="book.tokenizer"/></simpara></listitem>
<listitem><simpara><xref linkend="book.tokyo-tyrant"/></simpara></listitem>
<listitem><simpara><xref linkend="book.trader"/></simpara></listitem>
<listitem><simpara><xref linkend="book.ui"/></simpara></listitem>
<listitem><simpara><xref linkend="book.uodbc"/></simpara></listitem>
@ -178,19 +164,20 @@
<listitem><simpara><xref linkend="book.var"/></simpara></listitem>
<listitem><simpara><xref linkend="book.varnish"/></simpara></listitem>
<listitem><simpara><xref linkend="book.wddx"/></simpara></listitem>
<listitem><simpara><xref linkend="book.weakref"/></simpara></listitem>
<listitem><simpara><xref linkend="book.win32service"/></simpara></listitem>
<listitem><simpara><xref linkend="book.wincache"/></simpara></listitem>
<listitem><simpara><xref linkend="book.wkhtmltox"/></simpara></listitem>
<listitem><simpara><xref linkend="book.xattr"/></simpara></listitem>
<listitem><simpara><xref linkend="book.xdiff"/></simpara></listitem>
<listitem><simpara><xref linkend="book.xhprof"/></simpara></listitem>
<listitem><simpara><xref linkend="book.xlswriter"/></simpara></listitem>
<listitem><simpara><xref linkend="book.xml"/></simpara></listitem>
<listitem><simpara><xref linkend="book.xmldiff"/></simpara></listitem>
<listitem><simpara><xref linkend="book.xmlreader"/></simpara></listitem>
<listitem><simpara><xref linkend="book.xmlrpc"/></simpara></listitem>
<listitem><simpara><xref linkend="book.xmlwriter"/></simpara></listitem>
<listitem><simpara><xref linkend="book.xsl"/></simpara></listitem>
<listitem><simpara><xref linkend="book.yac"/></simpara></listitem>
<listitem><simpara><xref linkend="book.yaconf"/></simpara></listitem>
<listitem><simpara><xref linkend="book.yaf"/></simpara></listitem>
<listitem><simpara><xref linkend="book.yaml"/></simpara></listitem>
@ -218,24 +205,23 @@
<listitem><para><xref linkend="book.errorfunc"/></para></listitem>
<listitem><para><xref linkend="book.exec"/></para></listitem>
<listitem><para><xref linkend="book.filesystem"/></para></listitem>
<listitem><para><xref linkend="book.filter"/></para></listitem>
<listitem><para><xref linkend="book.fpm"/></para></listitem>
<listitem><para><xref linkend="book.funchand"/></para></listitem>
<listitem><para><xref linkend="book.hash"/></para></listitem>
<listitem><para><xref linkend="book.info"/></para></listitem>
<listitem><para><xref linkend="book.json"/></para></listitem>
<listitem><para><xref linkend="book.mail"/></para></listitem>
<listitem><para><xref linkend="book.math"/></para></listitem>
<listitem><para><xref linkend="book.misc"/></para></listitem>
<listitem><para><xref linkend="book.network"/></para></listitem>
<listitem><para><xref linkend="book.opcache"/></para></listitem>
<listitem><para><xref linkend="book.outcontrol"/></para></listitem>
<listitem><para><xref linkend="book.password"/></para></listitem>
<listitem><para><xref linkend="book.phar"/></para></listitem>
<listitem><para><xref linkend="book.pcre"/></para></listitem>
<listitem><para><xref linkend="book.reflection"/></para></listitem>
<listitem><para><xref linkend="book.regex"/></para></listitem>
<listitem><para><xref linkend="book.session"/></para></listitem>
<listitem><para><xref linkend="book.spl"/></para></listitem>
<listitem><para><xref linkend="book.stream"/></para></listitem>
<listitem><para><xref linkend="book.strings"/></para></listitem>
<listitem><para><xref linkend="book.tokenizer"/></para></listitem>
<listitem><para><xref linkend="book.url"/></para></listitem>
<listitem><para><xref linkend="book.var"/></para></listitem>
</itemizedlist>
@ -252,23 +238,27 @@
<listitem><para><xref linkend="book.ctype"/></para></listitem>
<listitem><para><xref linkend="book.dba"/></para></listitem>
<listitem><para><xref linkend="book.exif"/></para></listitem>
<listitem><para><xref linkend="book.ffi"/></para></listitem>
<listitem><para><xref linkend="book.fileinfo"/></para></listitem>
<listitem><para><xref linkend="book.filter"/></para></listitem>
<listitem><para><xref linkend="book.ftp"/></para></listitem>
<listitem><para><xref linkend="book.hrtime"/></para></listitem>
<listitem><para><xref linkend="book.iconv"/></para></listitem>
<listitem><para><xref linkend="book.image"/></para></listitem>
<listitem><para><xref linkend="book.intl"/></para></listitem>
<listitem><para><xref linkend="book.json"/></para></listitem>
<listitem><para><xref linkend="book.mbstring"/></para></listitem>
<listitem><para><xref linkend="book.opcache"/></para></listitem>
<listitem><para><xref linkend="book.mhash"/></para></listitem>
<listitem><para><xref linkend="book.pcntl"/></para></listitem>
<listitem><para><xref linkend="book.pcre"/></para></listitem>
<listitem><para><xref linkend="book.pdo"/></para></listitem>
<listitem><para><xref linkend="book.phar"/></para></listitem>
<listitem><para><xref linkend="book.phpdbg"/></para></listitem>
<listitem><para><xref linkend="book.posix"/></para></listitem>
<listitem><para><xref linkend="book.sem"/></para></listitem>
<listitem><para><xref linkend="book.session"/></para></listitem>
<listitem><para><xref linkend="book.shmop"/></para></listitem>
<listitem><para><xref linkend="book.sockets"/></para></listitem>
<listitem><para><xref linkend="book.sqlite3"/></para></listitem>
<listitem><para><xref linkend="book.xmlrpc"/></para></listitem>
<listitem><para><xref linkend="book.tokenizer"/></para></listitem>
<listitem><para><xref linkend="book.zlib"/></para></listitem>
</itemizedlist>
</section>
@ -279,19 +269,14 @@
<itemizedlist>
<listitem><para><xref linkend="book.bzip2"/></para></listitem>
<listitem><para><xref linkend="book.curl"/></para></listitem>
<listitem><para><xref linkend="book.dbase"/></para></listitem>
<listitem><para><xref linkend="book.dom"/></para></listitem>
<listitem><para><xref linkend="book.enchant"/></para></listitem>
<listitem><para><xref linkend="book.fbsql"/></para></listitem>
<listitem><para><xref linkend="book.gettext"/></para></listitem>
<listitem><para><xref linkend="book.gmp"/></para></listitem>
<listitem><para><xref linkend="book.ibase"/></para></listitem>
<listitem><para><xref linkend="book.imap"/></para></listitem>
<listitem><para><xref linkend="book.ldap"/></para></listitem>
<listitem><para><xref linkend="book.libxml"/></para></listitem>
<listitem><para><xref linkend="book.mcrypt"/></para></listitem>
<listitem><para><xref linkend="book.mhash"/></para></listitem>
<listitem><para><xref linkend="book.mysql"/></para></listitem>
<listitem><para><xref linkend="book.mysqli"/></para></listitem>
<listitem><para><xref linkend="book.mysqlnd"/></para></listitem>
<listitem><para><xref linkend="book.oci8"/></para></listitem>
@ -304,16 +289,15 @@
<listitem><para><xref linkend="ref.pdo-pgsql"/></para></listitem>
<listitem><para><xref linkend="ref.pdo-sqlite"/></para></listitem>
<listitem><para><xref linkend="book.pgsql"/></para></listitem>
<listitem><para><xref linkend="book.pht"/></para></listitem>
<listitem><para><xref linkend="book.pspell"/></para></listitem>
<listitem><para><xref linkend="book.readline"/></para></listitem>
<listitem><para><xref linkend="book.recode"/></para></listitem>
<listitem><para><xref linkend="book.simplexml"/></para></listitem>
<listitem><para><xref linkend="book.snmp"/></para></listitem>
<listitem><para><xref linkend="book.soap"/></para></listitem>
<listitem><para><xref linkend="book.sodium"/></para></listitem>
<listitem><para><xref linkend="book.tidy"/></para></listitem>
<listitem><para><xref linkend="book.uodbc"/></para></listitem>
<listitem><para><xref linkend="book.wddx"/></para></listitem>
<listitem><para><xref linkend="book.xml"/></para></listitem>
<listitem><para><xref linkend="book.xmlreader"/></para></listitem>
<listitem><para><xref linkend="book.xmlwriter"/></para></listitem>
@ -326,82 +310,90 @@
&extcat.membership.pecl;
<itemizedlist>
<listitem><para><xref linkend="book.classkit"/></para></listitem>
<listitem><para><xref linkend="book.apcu"/></para></listitem>
<listitem><para><xref linkend="book.cmark"/></para></listitem>
<listitem><para><xref linkend="book.componere"/></para></listitem>
<listitem><para><xref linkend="book.cubrid"/></para></listitem>
<listitem><para><xref linkend="book.dbplus"/></para></listitem>
<listitem><para><xref linkend="book.dbase"/></para></listitem>
<listitem><para><xref linkend="book.dio"/></para></listitem>
<listitem><para><xref linkend="book.ds"/></para></listitem>
<listitem><para><xref linkend="book.eio"/></para></listitem>
<listitem><para><xref linkend="book.ev"/></para></listitem>
<listitem><para><xref linkend="book.event"/></para></listitem>
<listitem><para><xref linkend="book.expect"/></para></listitem>
<listitem><para><xref linkend="book.fann"/></para></listitem>
<listitem><para><xref linkend="book.fdf"/></para></listitem>
<listitem><para><xref linkend="book.filepro"/></para></listitem>
<listitem><para><xref linkend="book.gearman"/></para></listitem>
<listitem><para><xref linkend="book.gender"/></para></listitem>
<listitem><para><xref linkend="book.geoip"/></para></listitem>
<listitem><para><xref linkend="book.gmagick"/></para></listitem>
<listitem><para><xref linkend="book.gnupg"/></para></listitem>
<listitem><para><xref linkend="book.ibase"/></para></listitem>
<listitem><para><xref linkend="book.ibm-db2"/></para></listitem>
<listitem><para><xref linkend="book.imagick"/></para></listitem>
<listitem><para><xref linkend="book.ingres"/></para></listitem>
<listitem><para><xref linkend="book.inotify"/></para></listitem>
<listitem><para><xref linkend="book.lua"/></para></listitem>
<listitem><para><xref linkend="book.luasandbox"/></para></listitem>
<listitem><para><xref linkend="book.lzf"/></para></listitem>
<listitem><para><xref linkend="book.mailparse"/></para></listitem>
<listitem><para><xref linkend="book.mcrypt"/></para></listitem>
<listitem><para><xref linkend="book.memcache"/></para></listitem>
<listitem><para><xref linkend="book.memcached"/></para></listitem>
<listitem><para><xref linkend="book.memtrack"/></para></listitem>
<listitem><para><xref linkend="book.mongo"/></para></listitem>
<listitem><para><xref linkend="book.mqseries"/></para></listitem>
<listitem><para><xref linkend="book.mysqlnd-memcache"/></para></listitem>
<listitem><para><xref linkend="book.mysqlnd-ms"/></para></listitem>
<listitem><para><xref linkend="book.mysqlnd-mux"/></para></listitem>
<listitem><para><xref linkend="book.mysqlnd-qc"/></para></listitem>
<listitem><para><xref linkend="book.mysqlnd-uh"/></para></listitem>
<listitem><para><xref linkend="book.ncurses"/></para></listitem>
<listitem><para><xref linkend="book.mysql"/></para></listitem>
<listitem><para><xref linkend="book.mysql-xdevapi"/></para></listitem>
<listitem><para><xref linkend="book.oauth"/></para></listitem>
<listitem><para><xref linkend="book.openal"/></para></listitem>
<listitem><para><xref linkend="book.paradox"/></para></listitem>
<listitem><para><xref linkend="book.parallel"/></para></listitem>
<listitem><para><xref linkend="book.parle"/></para></listitem>
<listitem><para><xref linkend="ref.pdo-cubrid"/></para></listitem>
<listitem><para><xref linkend="ref.pdo-ibm"/></para></listitem>
<listitem><para><xref linkend="ref.pdo-informix"/></para></listitem>
<listitem><para><xref linkend="ref.pdo-sqlsrv"/></para></listitem>
<listitem><para><xref linkend="book.proctitle"/></para></listitem>
<listitem><para><xref linkend="book.pht"/></para></listitem>
<listitem><para><xref linkend="book.ps"/></para></listitem>
<listitem><para><xref linkend="book.pthreads"/></para></listitem>
<listitem><para><xref linkend="book.quickhash"/></para></listitem>
<listitem><para><xref linkend="book.radius"/></para></listitem>
<listitem><para><xref linkend="book.rar"/></para></listitem>
<listitem><para><xref linkend="book.recode"/></para></listitem>
<listitem><para><xref linkend="book.rpminfo"/></para></listitem>
<listitem><para><xref linkend="book.rrd"/></para></listitem>
<listitem><para><xref linkend="book.runkit7"/></para></listitem>
<listitem><para><xref linkend="book.scoutapm"/></para></listitem>
<listitem><para><xref linkend="book.seaslog"/></para></listitem>
<listitem><para><xref linkend="book.solr"/></para></listitem>
<listitem><para><xref linkend="book.sphinx"/></para></listitem>
<listitem><para><xref linkend="book.sqlsrv"/></para></listitem>
<listitem><para><xref linkend="book.ssdeep"/></para></listitem>
<listitem><para><xref linkend="book.ssh2"/></para></listitem>
<listitem><para><xref linkend="book.stats"/></para></listitem>
<listitem><para><xref linkend="book.stomp"/></para></listitem>
<listitem><para><xref linkend="book.swoole"/></para></listitem>
<listitem><para><xref linkend="book.svm"/></para></listitem>
<listitem><para><xref linkend="book.svn"/></para></listitem>
<listitem><para><xref linkend="book.swoole"/></para></listitem>
<listitem><para><xref linkend="book.sync"/></para></listitem>
<listitem><para><xref linkend="book.taint"/></para></listitem>
<listitem><para><xref linkend="book.tcpwrap"/></para></listitem>
<listitem><para><xref linkend="book.tokyo-tyrant"/></para></listitem>
<listitem><para><xref linkend="book.trader"/></para></listitem>
<listitem><para><xref linkend="book.ui"/></para></listitem>
<listitem><para><xref linkend="book.uopz"/></para></listitem>
<listitem><para><xref linkend="book.v8js"/></para></listitem>
<listitem><para><xref linkend="book.varnish"/></para></listitem>
<listitem><para><xref linkend="book.weakref"/></para></listitem>
<listitem><para><xref linkend="book.wddx"/></para></listitem>
<listitem><para><xref linkend="book.win32service"/></para></listitem>
<listitem><para><xref linkend="book.wincache"/></para></listitem>
<listitem><para><xref linkend="book.wkhtmltox"/></para></listitem>
<listitem><para><xref linkend="book.xattr"/></para></listitem>
<listitem><para><xref linkend="book.xdiff"/></para></listitem>
<listitem><para><xref linkend="book.xhprof"/></para></listitem>
<listitem><para><xref linkend="book.xlswriter"/></para></listitem>
<listitem><para><xref linkend="book.xmldiff"/></para></listitem>
<listitem><para><xref linkend="book.xmlrpc"/></para></listitem>
<listitem><para><xref linkend="book.yac"/></para></listitem>
<listitem><para><xref linkend="book.yaconf"/></para></listitem>
<listitem><para><xref linkend="book.yaf"/></para></listitem>
<listitem><para><xref linkend="book.yaml"/></para></listitem>
<listitem><para><xref linkend="book.yar"/></para></listitem>
<listitem><para><xref linkend="book.yaz"/></para></listitem>
<listitem><para><xref linkend="book.zmq"/></para></listitem>
<listitem><para><xref linkend="book.zookeeper"/></para></listitem>
</itemizedlist>
</section>
@ -414,7 +406,7 @@
&extcat.state.deprecated;
<itemizedlist>
<listitem><para><xref linkend="book.memtrack"/></para></listitem>
<listitem><para/></listitem>
</itemizedlist>
</section>
@ -422,11 +414,8 @@
&extcat.state.experimental;
<itemizedlist>
<listitem><para><xref linkend="book.dbplus"/></para></listitem>
<listitem><para><xref linkend="book.hash"/></para></listitem>
<listitem><para><xref linkend="book.imagick"/></para></listitem>
<listitem><para><xref linkend="book.ncurses"/></para></listitem>
<listitem><para><xref linkend="book.paradox"/></para></listitem>
<listitem><para><xref linkend="ref.pdo-dblib"/></para></listitem>
<listitem><para><xref linkend="ref.pdo-firebird"/></para></listitem>
<listitem><para><xref linkend="ref.pdo-oci"/></para></listitem>

View file

@ -322,7 +322,7 @@ Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in Unk
is used, both zend.multibyte and zend.script_encoding must be used.
</para>
<para>
Literal strings will be transliterated from zend.script_enconding to
Literal strings will be transliterated from zend.script_encoding to
mbstring.internal_encoding, as if
<function>mb_convert_encoding</function> would have been called.
</para>
@ -564,7 +564,7 @@ Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in Unk
<entry><link linkend="ini.enable-post-data-reading">enable_post_data_reading</link></entry>
<entry>"1"</entry>
<entry>PHP_INI_PERDIR</entry>
<entry>Available as of PHP 5.4.0</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.post-max-size">post_max_size</link></entry>
@ -975,12 +975,6 @@ Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in Unk
</variablelist>
</para>
<para>
See also: <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link>,
<link linkend="ini.magic-quotes-runtime">magic_quotes_runtime</link>,
and
magic_quotes_sybase.
</para>
</section>
<section xml:id="ini.sect.path-directory">
@ -1261,6 +1255,12 @@ include_path = ".:${USER}/pear/php"
to <literal>0</literal> and thus <emphasis>disable</emphasis> the realpath cache.
</para>
</note>
<caution>
<para>
<literal>open_basedir</literal> is just an extra safety net, that is in no way
comprehensive, and can therefore not be relied upon when security is needed.
</para>
</caution>
</listitem>
</varlistentry>
@ -1629,6 +1629,9 @@ include_path = ".:${USER}/pear/php"
<para>
The maximum size of an uploaded file.
</para>
<para>
<link linkend="ini.post-max-size">post_max_size</link> must be larger than this value.
</para>
&ini.shorthandbytes;
@ -1643,7 +1646,7 @@ include_path = ".:${USER}/pear/php"
<listitem>
<para>
The maximum number of files allowed to be uploaded simultaneously.
Starting with PHP 5.3.4, upload fields left blank on submission do not
Upload fields left blank on submission do not
count towards this limit.
</para>
</listitem>

View file

@ -484,7 +484,6 @@
<entry></entry>
</row>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('intl.configuration.list')/*)"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('ingres.configuration.list')/*)"><xi:fallback/></xi:include>
<row>
<entry><link linkend="ini.last-modified">last_modified</link></entry>
<entry>"0"</entry>
@ -555,15 +554,9 @@
<entry>PHP_INI_ALL</entry>
<entry></entry>
</row>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mongo.configuration.list')/*)"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysql.configuration.list')/*)"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqli.configuration.list')/*)"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd.config.options.list')/*)"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd-memcache.configuration.list')/*)"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd-ms.configuration.list')/*)"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd-mux.configuration.list')/*)"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd-qc.configuration.list')/*)"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('mysqlnd-uh.configuration.list')/*)"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('oci8.configuration.list')/*)"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('odbc.configuration.list')/*)"><xi:fallback/></xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('opcache.configuration.list')/*)"><xi:fallback/></xi:include>

View file

@ -32,12 +32,12 @@
<row>
<entry><link linkend="ini.per-host">[HOST=]</link></entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Added in PHP 5.3.0.</entry>
<entry></entry>
</row>
<row>
<entry><link linkend="ini.per-path">[PATH=]</link></entry>
<entry>PHP_INI_SYSTEM</entry>
<entry>Added in PHP 5.3.0.</entry>
<entry></entry>
</row>
</tbody>
</tgroup>

View file

@ -27,7 +27,7 @@
All ereg* functions
</title>
<para>
All <link linkend="book.regex">ereg</link> functions were removed.
All <literal>ereg</literal> functions were removed.
<link linkend="book.pcre">PCRE</link> is a recommended alternative.
</para>
</sect3>

View file

@ -46,9 +46,12 @@
<term><link linkend="ini.syslog.filter">syslog.filter</link></term>
<listitem>
<simpara>
Specifies the filter type to filter the logged messages. There are three
Specifies the filter type to filter the logged messages, with the
supported filter types - <literal>all</literal>,
<literal>no-ctrl</literal> and <literal>ascii</literal>.
Starting with PHP 7.3.8, <literal>raw</literal> is also available,
restoring the way syslog behaved in previous PHP versions.
This filter will also affect calls to <function>syslog</function>.
</simpara>
</listitem>
</varlistentry>

View file

@ -249,6 +249,12 @@
supported and resulted in corrupted reflection objects. It has been
explicitly prohibited now.
</para>
<para>
The values of the class constant of <classname>ReflectionClassConstant</classname>,
<classname>ReflectionMethod</classname> and <classname>ReflectionProperty</classname>
have changed.
</para>
</sect2>
<sect2 xml:id="migration74.incompatible.spl">

View file

@ -142,7 +142,7 @@ $fruits = ['banana', 'orange', ...$parts, 'watermelon'];
<title>Weak references</title>
<para>
Weak references allow the programmer to retain a reference to an object
<link linkend="class.weakreference">Weak references</link> allow the programmer to retain a reference to an object
that does not prevent the object from being destroyed.
</para>
</sect3>
@ -233,7 +233,7 @@ $fruits = ['banana', 'orange', ...$parts, 'watermelon'];
The <function>preg_replace_callback</function> and <function>preg_replace_callback_array</function>
functions now accept an additional <parameter>flags</parameter> argument, with support for the
<constant>PREG_OFFSET_CAPTURE</constant> and <constant>PREG_UNMATCHED_AS_NULL</constant> flags.
This influences the format of the matches array passed to to the callback function.
This influences the format of the matches array passed to the callback function.
</para>
</sect2>

View file

@ -1,6 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="migration74.new-functions">
<title>New Functions</title>
@ -38,6 +36,18 @@
</itemizedlist>
</sect2>
<sect2 xml:id="migration74.new-functions.mbstring">
<title>Multibyte String</title>
<itemizedlist>
<listitem>
<simpara>
<function>mb_str_split</function>
</simpara>
</listitem>
</itemizedlist>
</sect2>
<sect2 xml:id="migration74.new-functions.openssl">
<title>OpenSSL</title>
@ -80,7 +90,6 @@
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -95,7 +95,10 @@ function test(?A $a, $b) {} // Recommended
<para>
<function>libxml_disable_entity_loader</function> has been deprecated. As libxml 2.9.0 is now
required, external entity loading is guaranteed to be disabled by default, and this function is
no longer needed to protect against XXE attacks.
no longer needed to protect against XXE attacks, unless the (still vulnerable)
<constant>LIBXML_NOENT</constant> is used.
In that case, it is recommended to refactor the code using
<function>libxml_set_external_entity_loader</function> to suppress loading of external entities.
</para>
</sect2>

View file

@ -71,8 +71,7 @@
<itemizedlist>
<listitem>
<para>
<!-- we cannot use <classname>WeakMap</classname> because that would link to the wrong class -->
The <literal>WeakMap</literal> class has been added.
The <link linkend="class.weakmap">WeakMap</link> class has been added.
<!-- RFC: https://wiki.php.net/rfc/weak_maps -->
</para>
</listitem>

View file

@ -27,7 +27,7 @@
<listitem>
<simpara>
The current PHP "major" version as an integer (e.g., int(5)
from version "5.2.7-extra"). Available since PHP 5.2.7.
from version "5.2.7-extra").
</simpara>
</listitem>
</varlistentry>
@ -39,7 +39,7 @@
<listitem>
<simpara>
The current PHP "minor" version as an integer (e.g., int(2)
from version "5.2.7-extra"). Available since PHP 5.2.7.
from version "5.2.7-extra").
</simpara>
</listitem>
</varlistentry>
@ -51,7 +51,7 @@
<listitem>
<simpara>
The current PHP "release" version as an integer (e.g., int(7)
from version "5.2.7-extra"). Available since PHP 5.2.7.
from version "5.2.7-extra").
</simpara>
</listitem>
</varlistentry>
@ -64,7 +64,6 @@
<simpara>
The current PHP version as an integer, useful for
version comparisons (e.g., int(50207) from version "5.2.7-extra").
Available since PHP 5.2.7.
</simpara>
</listitem>
</varlistentry>
@ -77,8 +76,7 @@
<simpara>
The current PHP "extra" version as a string (e.g., '-extra'
from version "5.2.7-extra"). Often used by distribution
vendors to indicate a package version. Available since
PHP 5.2.7.
vendors to indicate a package version.
</simpara>
</listitem>
</varlistentry>
@ -89,7 +87,7 @@
</term>
<listitem>
<simpara>
Available since PHP 5.2.7.
</simpara>
</listitem>
</varlistentry>
@ -100,7 +98,7 @@
</term>
<listitem>
<simpara>
Available since PHP 5.2.7.
</simpara>
</listitem>
</varlistentry>
@ -112,7 +110,7 @@
<listitem>
<simpara>
The maximum length of filenames (including path) supported
by this build of PHP. Available since PHP 5.3.0.
by this build of PHP.
</simpara>
</listitem>
</varlistentry>
@ -162,7 +160,6 @@
<listitem>
<simpara>
The correct 'End Of Line' symbol for this platform.
Available since PHP 5.0.2
</simpara>
</listitem>
</varlistentry>
@ -175,7 +172,6 @@
<simpara>
The largest integer supported in this build of PHP. Usually int(2147483647)
in 32 bit systems and int(9223372036854775807) in 64 bit systems.
Available since PHP 5.0.5
</simpara>
</listitem>
</varlistentry>
@ -187,7 +183,7 @@
<listitem>
<simpara>
The smallest integer supported in this build of PHP. Usually int(-2147483648) in 32 bit systems and
int(-9223372036854775808) in 64 bit systems. Available since PHP 7.0.0.
int(-9223372036854775808) in 64 bit systems.
Usually, PHP_INT_MIN === ~PHP_INT_MAX.
</simpara>
</listitem>
@ -199,7 +195,7 @@
</term>
<listitem>
<simpara>
The size of an integer in bytes in this build of PHP. Available since PHP 5.0.5
The size of an integer in bytes in this build of PHP.
</simpara>
</listitem>
</varlistentry>
@ -294,7 +290,9 @@
</term>
<listitem>
<simpara>
The default directory where to look for dynamically loadable extensions
(unless overridden by <link linkend="ini.extension-dir">extension_dir</link>).
Defaults to <constant>PHP_PREFIX</constant> (or <code>PHP_PREFIX . "\\ext"</code> on Windows).
</simpara>
</listitem>
</varlistentry>
@ -343,7 +341,6 @@
<listitem>
<simpara>
Specifies where the manpages were installed into.
Available since PHP 5.3.7.
</simpara>
</listitem>
</varlistentry>
@ -566,7 +563,6 @@
<listitem>
<simpara>
<link linkend="errorfunc.constants">Error reporting constant</link>.
Available since PHP 5.2.0
</simpara>
</listitem>
</varlistentry>
@ -578,7 +574,6 @@
<listitem>
<simpara>
<link linkend="errorfunc.constants">Error reporting constant</link>.
Available since PHP 5.3.0
</simpara>
</listitem>
</varlistentry>
@ -590,7 +585,6 @@
<listitem>
<simpara>
<link linkend="errorfunc.constants">Error reporting constant</link>.
Available since PHP 5.3.0
</simpara>
</listitem>
</varlistentry>
@ -623,7 +617,7 @@
</term>
<listitem>
<simpara>
Available since PHP 5.1.0
</simpara>
</listitem>
</varlistentry>
@ -686,7 +680,7 @@
</varlistentry>
</variablelist>
<para>
See also: <link linkend="language.constants.predefined">Magic
See also: <link linkend="language.constants.magic">Magic
constants</link>.
</para>
</sect2>

View file

@ -16,12 +16,9 @@
<simpara>
These words have special meaning in PHP. Some of them represent things
which look like functions, some look like constants, and so on - but
they're not, really: they are language constructs. You cannot use any
of the following words as constants, class names, function or method names.
Using them as variable names is generally OK, but could lead to confusion.
</simpara>
<simpara>
As of PHP 7.0.0 these keywords are allowed as property, constant, and
they're not, really: they are language constructs.
The following words cannot be used as constants, class names, function or method names.
They are, however, allowed as property, constant, and
method names of classes, interfaces and traits, except that
<literal>class</literal> may not be used as constant name.
</simpara>
@ -52,7 +49,7 @@
<link linkend="control-structures.break">break</link>
</entry>
<entry>
<link linkend="language.types.callable">callable</link> (as of PHP 5.4)
<link linkend="language.types.callable">callable</link>
</entry>
<entry>
<link linkend="control-structures.switch">case</link>
@ -137,7 +134,7 @@
<link linkend="language.oop5.final">final</link>
</entry>
<entry>
<link linkend="language.exceptions">finally</link> (as of PHP 5.5)
<link linkend="language.exceptions">finally</link>
</entry>
<entry>
<link linkend="functions.arrow">fn</link> (as of PHP 7.4)
@ -157,7 +154,7 @@
<link linkend="language.variables.scope">global</link>
</entry>
<entry>
<link linkend="control-structures.goto">goto</link> (as of PHP 5.3)
<link linkend="control-structures.goto">goto</link>
</entry>
<entry>
<link linkend="control-structures.if">if</link>
@ -177,7 +174,7 @@
<link linkend="language.operators.type">instanceof</link>
</entry>
<entry>
<link linkend="language.oop5.traits.conflict">insteadof</link> (as of PHP 5.4)
<link linkend="language.oop5.traits.conflict">insteadof</link>
</entry>
<entry>
<link linkend="language.oop5.interfaces">interface</link>
@ -194,7 +191,7 @@
<link linkend="control-structures.match">match</link> (as of PHP 8.0)
</entry>
<entry>
<link linkend="language.namespaces">namespace</link> (as of PHP 5.3)
<link linkend="language.namespaces">namespace</link>
</entry>
<entry>
<link linkend="language.oop5.basic.new">new</link>
@ -239,7 +236,7 @@
<link linkend="language.exceptions">throw</link>
</entry>
<entry>
<link linkend="language.oop5.traits">trait</link> (as of PHP 5.4)
<link linkend="language.oop5.traits">trait</link>
</entry>
<entry>
<link linkend="language.exceptions">try</link>
@ -262,10 +259,10 @@
<link linkend="language.operators.logical">xor</link>
</entry>
<entry>
<link linkend="language.generators">yield</link> (as of PHP 5.5)
<link linkend="language.generators">yield</link>
</entry>
<entry>
<link linkend="control-structures.yield.from">yield from</link> (as of PHP 7.0)
<link linkend="control-structures.yield.from">yield from</link>
</entry>
</row>
</tbody>
@ -281,7 +278,7 @@
<link linkend="language.constants.predefined">__CLASS__</link>
</entry>
<entry>
<link linkend="language.constants.predefined">__DIR__</link> (as of PHP 5.3)
<link linkend="language.constants.predefined">__DIR__</link>
</entry>
<entry>
<link linkend="language.constants.predefined">__FILE__</link>
@ -298,10 +295,10 @@
</row>
<row>
<entry>
<link linkend="language.namespaces.nsconstants">__NAMESPACE__</link> (as of PHP 5.3)
<link linkend="language.namespaces.nsconstants">__NAMESPACE__</link>
</entry>
<entry>
<link linkend="language.constants.predefined">__TRAIT__</link> (as of PHP 5.4)
<link linkend="language.constants.predefined">__TRAIT__</link>
</entry>
<entry>
</entry>
@ -358,18 +355,6 @@
</simpara>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 xml:id="reserved.classes.php5">
<title>Predefined classes as of PHP 5</title>
<simpara>
These additional predefined classes were introduced in
PHP 5.0.0.
</simpara>
<variablelist>
<varlistentry>
<term><classname>Exception</classname></term>
<listitem>
@ -381,7 +366,7 @@
<term><classname>ErrorException</classname></term>
<listitem>
<simpara>
Available since PHP 5.1.0.
</simpara>
</listitem>
</varlistentry>
@ -392,46 +377,26 @@
</simpara>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 xml:id="reserved.classes.closure">
<title>Closure</title>
<simpara>
The predefined final class <classname>Closure</classname> was introduced
in PHP 5.3.0. It is used for representing <link
linkend="functions.anonymous">anonymous functions</link>.
</simpara>
<simpara>
For more information, see its <link linkend="class.closure">class
page</link>.
</simpara>
</sect2>
<sect2 xml:id="reserved.classes.generator">
<title>Generator</title>
<simpara>
The predefined final class <classname>Generator</classname> was introduced
in PHP 5.5.0. It is used for representing <link
linkend="language.generators">generators</link>.
</simpara>
<simpara>
For more information, see its <link linkend="class.generator">class
page</link>.
</simpara>
</sect2>
<sect2 xml:id="reserved.classes.php7">
<title>Predefined interfaces and classes as of PHP 7</title>
<simpara>
These additional predefined interfaces and classes were introduced in
PHP 7.0.0.
</simpara>
<variablelist>
<varlistentry>
<term><classname>Closure</classname></term>
<listitem>
<simpara>
The predefined final class <classname>Closure</classname>
is used for representing <link
linkend="functions.anonymous">anonymous functions</link>.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><classname>Generator</classname></term>
<listitem>
<simpara>
The predefined final class <classname>Generator</classname>
is used for representing <link
linkend="language.generators">generators</link>.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><classname>ArithmeticError</classname></term>
<listitem>
@ -538,27 +503,27 @@
<tbody>
<row>
<entry>
int (as of PHP 7)
int
</entry>
<entry>
float (as of PHP 7)
float
</entry>
<entry>
bool (as of PHP 7)
bool
</entry>
<entry>
string (as of PHP 7)
string
</entry>
</row>
<row>
<entry>
true (as of PHP 7)
true
</entry>
<entry>
false (as of PHP 7)
false
</entry>
<entry>
null (as of PHP 7)
null
</entry>
<entry>
void (as of PHP 7.1)
@ -589,13 +554,13 @@
<tbody>
<row>
<entry>
resource (as of PHP 7)
resource
</entry>
<entry>
mixed (as of PHP 7)
mixed
</entry>
<entry>
numeric (as of PHP 7)
numeric
</entry>
<entry>
</entry>

View file

@ -362,31 +362,6 @@
</entry>
<entry>Link to Dbase database</entry>
</row>
<row>
<entry>dbx_link_object</entry>
<entry>
<function>dbx_connect</function>
</entry>
<entry>
<function>dbx_query</function>
</entry>
<entry>
<function>dbx_close</function>
</entry>
<entry>dbx connection</entry>
</row>
<row>
<entry>dbx_result_object</entry>
<entry>
<function>dbx_query</function>
</entry>
<entry>
</entry>
<entry>
None
</entry>
<entry>dbx result</entry>
</row>
<row>
<entry>enchant_broker</entry>
<entry>
@ -644,7 +619,6 @@
<function>imageinterlace</function>,
<function>imageline</function>,
<function>imagepolygon</function>,
<function>imagepstext</function>,
<function>imagerectangle</function>,
<function>imagerotate</function>,
<function>imagesetpixel</function>,
@ -704,55 +678,6 @@
</entry>
<entry>Font for GD</entry>
</row>
<row>
<entry>GMP integer</entry>
<entry>
<function>gmp_init</function>
</entry>
<entry>
<function>gmp_intval</function>,
<function>gmp_strval</function>,
<function>gmp_add</function>,
<function>gmp_sub</function>,
<function>gmp_mul</function>,
<function>gmp_div_q</function>,
<function>gmp_div_r</function>,
<function>gmp_div_qr</function>,
<function>gmp_div</function>,
<function>gmp_mod</function>,
<function>gmp_divexact</function>,
<function>gmp_cmp</function>,
<function>gmp_neg</function>,
<function>gmp_abs</function>,
<function>gmp_sign</function>,
<function>gmp_fact</function>,
<function>gmp_sqrt</function>,
<function>gmp_sqrtrm</function>,
<function>gmp_perfect_square</function>,
<function>gmp_pow</function>,
<function>gmp_powm</function>,
<function>gmp_prob_prime</function>,
<function>gmp_gcd</function>,
<function>gmp_gcdext</function>,
<function>gmp_invert</function>,
<function>gmp_legendre</function>,
<function>gmp_jacobi</function>,
<function>gmp_random</function>,
<function>gmp_and</function>,
<function>gmp_or</function>,
<function>gmp_xor</function>,
<function>gmp_setbit</function>,
<function>gmp_clrbit</function>,
<function>gmp_scan0</function>,
<function>gmp_scan1</function>,
<function>gmp_popcount</function>,
<function>gmp_hamdist</function>
</entry>
<entry>
None
</entry>
<entry>GMP Number</entry>
</row>
<row>
<entry>imap</entry>
<entry>
@ -802,60 +727,6 @@
</entry>
<entry>Link to IMAP, POP3 server</entry>
</row>
<row>
<entry>ingres</entry>
<entry>
<function>ingres_connect</function>
</entry>
<entry>
<function>ingres_query</function>,
<function>ingres_num_rows</function>,
<function>ingres_num_fields</function>,
<function>ingres_field_name</function>,
<function>ingres_field_type</function>,
<function>ingres_field_nullable</function>,
<function>ingres_field_length</function>,
<function>ingres_field_precision</function>,
<function>ingres_field_scale</function>,
<function>ingres_fetch_array</function>,
<function>ingres_fetch_row</function>,
<function>ingres_fetch_object</function>,
<function>ingres_rollback</function>,
<function>ingres_commit</function>,
<function>ingres_autocommit</function>
</entry>
<entry>
<function>ingres_close</function>
</entry>
<entry>Link to ingresII base</entry>
</row>
<row>
<entry>ingres persistent</entry>
<entry>
<function>ingres_pconnect</function>
</entry>
<entry>
<function>ingres_query</function>,
<function>ingres_num_rows</function>,
<function>ingres_num_fields</function>,
<function>ingres_field_name</function>,
<function>ingres_field_type</function>,
<function>ingres_field_nullable</function>,
<function>ingres_field_length</function>,
<function>ingres_field_precision</function>,
<function>ingres_field_scale</function>,
<function>ingres_fetch_array</function>,
<function>ingres_fetch_row</function>,
<function>ingres_fetch_object</function>,
<function>ingres_rollback</function>,
<function>ingres_commit</function>,
<function>ingres_autocommit</function>
</entry>
<entry>
None
</entry>
<entry>Persistent link to ingresII base</entry>
</row>
<row>
<entry>interbase blob</entry>
<entry>
@ -1023,7 +894,6 @@
</entry>
<entry>
<function>mysql_affected_rows</function>,
<function>mysql_change_user</function>,
<function>mysql_create_db</function>,
<function>mysql_data_seek</function>,
<function>mysql_db_name</function>,
@ -1055,7 +925,6 @@
</entry>
<entry>
<function>mysql_affected_rows</function>,
<function>mysql_change_user</function>,
<function>mysql_create_db</function>,
<function>mysql_data_seek</function>,
<function>mysql_db_name</function>,
@ -1424,7 +1293,7 @@
<function>pg_untrace</function>,
<function>pg_set_client_encoding</function>,
<function>pg_client_encoding</function>,
<function>pg_metadata</function>,
<function>pg_meta_data</function>,
<function>pg_convert</function>,
<function>pg_insert</function>,
<function>pg_select</function>,
@ -1469,7 +1338,7 @@
<function>pg_untrace</function>,
<function>pg_set_client_encoding</function>,
<function>pg_client_encoding</function>,
<function>pg_metadata</function>,
<function>pg_meta_data</function>,
<function>pg_convert</function>,
<function>pg_insert</function>,
<function>pg_select</function>,

View file

@ -4,30 +4,38 @@
<appendix xml:id="tokens" xmlns="http://docbook.org/ns/docbook">
<title>List of Parser Tokens</title>
<para>
Various parts of the PHP language are represented internally by types like
T_SR. PHP outputs identifiers like this one in parse errors, like
<literal>"Parse error: unexpected T_SR, expecting ',' or ';' in script.php on line 10."</literal>
Various parts of the PHP language are represented internally by tokens.
A code snippet that contains an invalid sequence of tokens may lead to errors like
<literal>Parse error: syntax error, unexpected token "==", expecting "(" in script.php on line 10."</literal>
where token <code>==</code> is internally represented by <constant>T_IS_EQUAL</constant>.
</para>
<para>
You're supposed to know what T_SR means. For everybody who doesn't
know that, here is a table with those identifiers, PHP-syntax and
references to the appropriate places in the manual.
The following table lists all tokens. They are also available as PHP constants.
</para>
<note>
<title>Usage of T_* constants</title>
<para>
All tokens listed below are also defined as PHP constants. Their value is
automatically generated based on PHP's underlying parser infrastructure.
T_* constants values are automatically generated based on PHP's underlying parser infrastructure.
This means that the concrete value of a token may change between two PHP
versions. For example the <constant>T_FILE</constant> constant is
<literal>365</literal> in PHP 5.3, while the same value refers now to
<constant>T_TRAIT</constant> in PHP 5.4 and the value of <constant>T_FILE</constant>
is <literal>369</literal>. This means that your code should never rely directly
versions.
This means that your code should never rely directly
on the original T_* values taken from PHP version X.Y.Z, to provide some compatibility
across multiple PHP versions. Instead your code should utilize custom values
(using big numbers like <literal>10000</literal>) and an appropriate strategy that
will work with both PHP versions and T_* values.
across multiple PHP versions.
</para>
<para>
To make use of T_* constants across multiple PHP versions, undefined constants
may be defined by the user (using big numbers like <literal>10000</literal>) with an
appropriate strategy that will work with both PHP versions and T_* values.
<programlisting role="php">
<![CDATA[
<?php
// Prior to PHP 7.4.0, T_FN is not defined.
defined('T_FN') || define('T_FN', 10001);
]]>
</programlisting>
</para>
</note>
@ -64,17 +72,22 @@
<entry>(array)</entry>
<entry><link linkend="language.types.typecasting">type-casting</link></entry>
</row>
<row>
<row>
<entry><constant>T_AS</constant></entry>
<entry>as</entry>
<entry>&foreach;</entry>
</row>
<row>
<entry><constant>T_ATTRIBUTE</constant></entry>
<entry>#[</entry>
<entry><link linkend="language.attributes">attributes</link> (available as of PHP 8.0.0)</entry>
</row>
<row>
<entry><constant>T_BAD_CHARACTER</constant></entry>
<entry></entry>
<entry>
anything below ASCII 32 except \t (0x09), \n (0x0a) and \r (0x0d)
(available since PHP 7.4.0)
(available as of PHP 7.4.0)
</entry>
</row>
<row>
@ -149,7 +162,7 @@
<entry>??=</entry>
<entry>
<link linkend="language.operators.assignment">assignment operators</link>
(available since PHP 7.4.0)
(available as of PHP 7.4.0)
</entry>
</row>
<row>
@ -361,7 +374,7 @@
<entry>fn</entry>
<entry>
<link linkend="functions.arrow">arrow functions</link>
(available since PHP 7.4.0)
(available as of PHP 7.4.0)
</entry>
</row>
<row>

View file

@ -90,7 +90,7 @@
<title>Unix Domain: Unix and UDG</title>
<simpara>
<literal>unix://</literal> and
<literal>udg://</literal> (udg:// since PHP 5).
<literal>udg://</literal>.
</simpara>
<itemizedlist>

View file

@ -464,38 +464,9 @@ cgi error:
</question>
<answer>
<para>
There are several ways of doing this. If you are using Apache, read
their installation specific instructions (<link
linkend="install.windows.legacy.apache1">Apache 1</link>, <link
linkend="install.windows.legacy.apache2">Apache 2</link>), otherwise you must
set the <varname>PHPRC</varname> environment variable:
</para>
<para>
On Windows:
<itemizedlist>
<listitem><para>
Go to Control Panel and open the System icon (Start → Settings
→ Control Panel → System, or just Start → Control Panel
→ System)
</para></listitem>
<listitem><para>
Go to the Advanced tab
</para></listitem>
<listitem><para>
Click on the 'Environment Variables' button
</para></listitem>
<listitem><para>
Look into the 'System variables' pane
</para></listitem>
<listitem><para>
Click on 'New' and enter 'PHPRC' as the variable name and the
directory where &php.ini; is located as the variable value (e.g.
<literal>C:\php</literal>)
</para></listitem>
<listitem><para>
Press OK and restart your computer
</para></listitem>
</itemizedlist>
There are several ways of doing this. If you are using Apache,
refer to the Apache documentation, otherwise
you must set the <varname>PHPRC</varname> environment variable.
</para>
</answer>
</qandaentry>

View file

@ -333,7 +333,7 @@ foreach ($headers as $name => $content) {
<answer>
<para>
The available options are K (for Kilobytes), M (for Megabytes) and G (for
Gigabytes; available since PHP 5.1.0), and are all case-insensitive.
Gigabytes), and are all case-insensitive.
Anything else assumes bytes. <literal>1M</literal> equals one Megabyte or
<literal>1048576</literal> bytes. <literal>1K</literal> equals one
Kilobyte or <literal>1024</literal> bytes. These shorthand notations may

View file

@ -56,7 +56,7 @@
</note>
<para>
As of PHP 5, the &cli; binary is distributed in the main folder as <filename>
The &cli; binary is distributed in the main folder as <filename>
php.exe</filename> on Windows. The <acronym>CGI</acronym> version is
distributed as <filename>php-cgi.exe</filename>. Additionally, a <filename>
php-win.exe</filename> is distributed if PHP is configured using
@ -686,7 +686,7 @@ array(370) {
<entry>--process-begin</entry>
<entry>
<para>
PHP code to execute before processing stdin. Added in PHP 5.
PHP code to execute before processing stdin.
</para>
</entry>
</row>
@ -695,7 +695,7 @@ array(370) {
<entry>--process-code</entry>
<entry>
<para>
PHP code to execute for every input line. Added in PHP 5.
PHP code to execute for every input line.
</para>
<para>
There are two special variables available in this mode:
@ -711,7 +711,7 @@ array(370) {
<entry>--process-file</entry>
<entry>
<para>
PHP file to execute for every input line. Added in PHP 5.
PHP file to execute for every input line.
</para>
</entry>
</row>
@ -720,7 +720,7 @@ array(370) {
<entry>--process-end</entry>
<entry>
<para>
PHP code to execute after processing the input. Added in PHP 5.
PHP code to execute after processing the input.
</para>
<para><example>
<title>Using the <option>-B</option>, <option>-R</option> and
@ -742,7 +742,7 @@ Total Lines: 37328
<entry>
<para>
Starts <link linkend="features.commandline.webserver">built-in web
server</link>. Available as of PHP 5.4.0.
server</link>.
</para>
</entry>
</row>
@ -752,7 +752,6 @@ Total Lines: 37328
<entry>
Specifies document root for <link
linkend="features.commandline.webserver">built-in web server</link>.
Available as of PHP 5.4.0.
</entry>
</row>
<row>
@ -830,8 +829,7 @@ Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
<entry>--ini</entry>
<entry>
<para>
Show configuration file names and scanned directories. Available as
of PHP 5.2.3.
Show configuration file names and scanned directories.
<example>
<title><literal>--ini</literal> example</title>
<programlisting role="shell">
@ -853,7 +851,7 @@ Additional .ini files parsed: (none)
<entry>
<para>
Show information about the given function or class method (e.g.
number and name of the parameters). Available as of PHP 5.1.2.
number and name of the parameters).
</para>
<para>
This option is only available if PHP was compiled with
@ -884,7 +882,7 @@ Function [ <internal> public function var_dump ] {
<entry>
<para>
Show information about the given class (list of constants, properties
and methods). Available as of PHP 5.1.2.
and methods).
</para>
<para>
This option is only available if PHP was compiled with
@ -933,7 +931,7 @@ Class [ <internal:standard> class Directory ] {
<entry>
<para>
Show information about the given extension (list of &php.ini; options,
defined functions, constants and classes). Available as of PHP 5.1.2.
defined functions, constants and classes).
</para>
<para>
This option is only available if PHP was compiled with
@ -967,7 +965,6 @@ Extension [ <persistent> extension #19 json version 1.2.1 ] {
<para>
Show the configuration information for the given Zend extension (the
same information that is returned by <function>phpinfo</function>).
Available as of PHP 5.4.0.
</para>
</entry>
</row>
@ -978,7 +975,7 @@ Extension [ <persistent> extension #19 json version 1.2.1 ] {
<para>
Show the configuration information for the given extension (the same
information that is returned by <function>phpinfo</function>).
Available as of PHP 5.2.2. The core configuration information
The core configuration information
is available using "main" as extension name.
</para>
<para>
@ -1292,7 +1289,7 @@ This is a command line PHP script with one option.
<para>
On Windows, PHP can be configured to run without the need to
supply the <filename>C:\php\php.exe</filename> or the <literal>.php</literal>
extension, as described in <link linkend="install.windows.legacy.commandline">Command
extension, as described in <link linkend="install.windows.commandline">Command
Line PHP on Microsoft Windows</link>.
</para>
@ -1413,7 +1410,7 @@ php -r 'fwrite(STDERR, "stderr\n");'
<title>Interactive shell</title>
<para>
As of PHP 5.1.0, the &cli.sapi; provides an interactive shell using the
The &cli.sapi; provides an interactive shell using the
<option>-a</option> option if PHP is compiled with the <option
role="configure">--with-readline</option> option.
As of PHP 7.1.0 the interactive shell is also available on Windows, if the
@ -1492,7 +1489,7 @@ php > $foo[TAB]ThisIsAReallyLongVariableName
</para>
<para>
As of PHP 5.4.0, the &cli.sapi; provides
The &cli.sapi; provides
the &php.ini; settings <parameter>cli.pager</parameter> and
<parameter>cli.prompt</parameter>. The <parameter>cli.pager</parameter>
setting allows an external program (such as <filename>less</filename>) to
@ -1502,7 +1499,7 @@ php > $foo[TAB]ThisIsAReallyLongVariableName
</para>
<para>
In PHP 5.4.0 it was also made possible to set
It is also possible to set
&php.ini; settings in the interactive shell using a shorthand notation.
</para>
@ -1614,7 +1611,7 @@ php >
</warning>
<para>
As of PHP 5.4.0, the &cli.sapi; provides a built-in web server.
The &cli.sapi; provides a built-in web server.
</para>
<para>
@ -1907,7 +1904,7 @@ $ php -S 0.0.0.0:8000
<entry><link linkend="ini.cli-server.color">cli_server.color</link></entry>
<entry>"0"</entry>
<entry>PHP_INI_ALL</entry>
<entry>Available since PHP 5.4.0.</entry>
<entry></entry>
</row>
</tbody>
</tgroup>

View file

@ -301,7 +301,7 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) {
<term><constant>UPLOAD_ERR_NO_TMP_DIR</constant></term>
<listitem>
<para>
Value: 6; Missing a temporary folder. Introduced in PHP 5.0.3.
Value: 6; Missing a temporary folder.
</para>
</listitem>
</varlistentry>
@ -309,7 +309,7 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) {
<term><constant>UPLOAD_ERR_CANT_WRITE</constant></term>
<listitem>
<para>
Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0.
Value: 7; Failed to write file to disk.
</para>
</listitem>
</varlistentry>
@ -319,8 +319,7 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) {
<para>
Value: 8; A PHP extension stopped the file upload. PHP does not
provide a way to ascertain which extension caused the file upload to
stop; examining the list of loaded extensions with <function>phpinfo</function> may help.
Introduced in PHP 5.2.0.
stop; examining the list of loaded extensions with <function>phpinfo</function> may help.
</para>
</listitem>
</varlistentry>
@ -372,7 +371,7 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) {
<literal>post_max_size</literal> large enough.
</simpara>
<simpara>
As of PHP 5.2.12, the
The
<link linkend="ini.max-file-uploads">max_file_uploads</link> configuration
setting controls the maximum number of files that can uploaded in one
request. If more files are uploaded than the limit, then
@ -456,7 +455,7 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) {
</simpara>
<warning>
<simpara>
As of PHP 5.2.12, the
The
<link linkend="ini.max-file-uploads">max_file_uploads</link>
configuration setting acts as a limit on the number of files that can be
uploaded in one request. You will need to ensure that your form does not

View file

@ -14,7 +14,7 @@
and <varname>AUTH_TYPE</varname> set to the user name, password and
authentication type respectively. These predefined variables are found
in the <varname>$_SERVER</varname> array. Both "Basic" and "Digest"
(since PHP 5.1.0) authentication methods are supported. See the
authentication methods are supported. See the
<function>header</function> function for more information.
</simpara>

View file

@ -10,8 +10,8 @@
that take a filename as a parameter. In addition, URLs can be
used with the <function>include</function>,
<function>include_once</function>, <function>require</function> and
<function>require_once</function> statements (since PHP 5.2.0,
<option>allow_url_include</option> must be enabled for these).
<function>require_once</function> statements
(<option>allow_url_include</option> must be enabled for these).
See <xref linkend="wrappers"/> for more information about the protocols
supported by PHP.
</para>

View file

@ -277,7 +277,7 @@
original PHP FastCGI (5.2.2+). Makes sense only with a tcp listening socket.
Each address must be separated by a comma. If this value is left blank,
connections will be accepted from any ip address. Default value: any.
IPv6 addresses are allowed since PHP 5.5.20 and 5.6.4.
IPv6 addresses are allowed.
</para>
</listitem>
</varlistentry>
@ -326,7 +326,7 @@
<para>
When POSIX Access Control Lists are supported you can set them using this option.
When set, <literal>listen.owner</literal> and <literal>listen.group</literal>
are ignored. Value is a comma separated list of user names. Since PHP 5.6.5.
are ignored. Value is a comma separated list of user names.
</para>
</listitem>
</varlistentry>
@ -338,7 +338,7 @@
<listitem>
<para>
See <literal>listen.acl_users</literal>.
Value is a comma separated list of group names. Since PHP 5.6.5.
Value is a comma separated list of group names.
</para>
</listitem>
</varlistentry>
@ -682,7 +682,7 @@
Clear environment in FPM workers.
Prevents arbitrary environment variables from reaching FPM worker processes
by clearing the environment in workers before env vars specified in this
pool configuration are added. Since PHP 5.4.27, 5.5.11, and 5.6.0.
pool configuration are added.
Default value: Yes.
</para>
</listitem>

View file

@ -29,7 +29,7 @@
</listitem>
<listitem>
<para>
<literal>--with-fpm-acl</literal> - Use POSIX Access Control Lists (default - no). Since PHP 5.6.5.
<literal>--with-fpm-acl</literal> - Use POSIX Access Control Lists (default - no).
</para>
</listitem>
</itemizedlist>

View file

@ -25,13 +25,12 @@
</listitem>
<listitem>
<simpara>
The <varname>PHPRC</varname> environment variable. Before PHP 5.2.0,
this was checked after the registry key mentioned below.
The <varname>PHPRC</varname> environment variable.
</simpara>
</listitem>
<listitem>
<simpara>
As of PHP 5.2.0, the location of the <literal>php.ini</literal> file
The location of the <literal>php.ini</literal> file
can be set for different versions of PHP. The root of the registry keys depends on 32- or 64-bitness of the installed OS and PHP.
For 32-bit PHP on a 32-bit OS or a 64-bit PHP on a 64-bit OS use <literal>[(HKEY_LOCAL_MACHINE\SOFTWARE\PHP]</literal> for 32-bit version of PHP on a 64-bit OS use <literal>[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\PHP]</literal>] instead.
For same bitness installation the following registry keys
@ -138,7 +137,7 @@ include_path = ".;c:\php\lib"
</example>
</para>
<para>
Since PHP 5.1.0, it is possible to refer to existing .ini variables from
It is possible to refer to existing .ini variables from
within .ini files. Example: <literal>open_basedir = ${open_basedir}
":/new/dir"</literal>.
</para>
@ -148,8 +147,8 @@ include_path = ".;c:\php\lib"
<para>
It is possible to configure PHP to scan for .ini files in a directory
after reading &php.ini;. This can be done at compile time by setting the
<option role="configure">--with-config-file-scan-dir</option> option. In
PHP 5.2.0 and later, the scan directory can then be overridden at run time
<option role="configure">--with-config-file-scan-dir</option> option.
The scan directory can then be overridden at run time
by setting the <varname>PHP_INI_SCAN_DIR</varname> environment variable.
</para>
@ -245,7 +244,7 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
<title>.user.ini files</title>
<simpara>
Since PHP 5.3.0, PHP includes support for configuration INI files on a
PHP includes support for configuration INI files on a
per-directory basis. These files are processed <emphasis>only</emphasis> by
the CGI/FastCGI SAPI. This functionality obsoletes the PECL htscanner
extension. If you are running PHP as Apache module, use &htaccess; files for the same
@ -322,14 +321,13 @@ $ PHP_INI_SCAN_DIR=/usr/local/etc/php.d: php
<entry>
Entry can be set in user scripts (like with <function>ini_set</function>)
or in the <link linkend="configuration.changes.windows">Windows registry</link>.
Since PHP 5.3, entry can be set in &user-ini;
Entry can be set in &user-ini;
</entry>
</row>
<row>
<entry><literal>PHP_INI_PERDIR</literal></entry>
<entry>
Entry can be set in &php.ini;, &htaccess;, &httpd.conf; or &user-ini;
(since PHP 5.3)
</entry>
</row>
<row>

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.macosx.bundled" xmlns="http://docbook.org/ns/docbook">
<title>Using the bundled PHP</title>
<title>Using the bundled PHP prior to macOS Monterey</title>
<simpara>
PHP has come standard with Macs since Mac OS X version 10.0.0. Enabling PHP
with the default web server requires uncommenting a few lines in the
PHP is bundled with macOS since macOS X (10.0.0) prior to macOS Monterey (12.0.0).
Enabling PHP with the default web server requires uncommenting a few lines in the
Apache configuration file <filename>httpd.conf</filename> whereas the
<acronym>CGI</acronym> and/or <acronym>CLI</acronym> are enabled by
default (easily accessible via the Terminal program).

View file

@ -4,8 +4,8 @@
<title>Installation on macOS</title>
<para>
This section contains notes and hints specific to installing PHP on macOS.
PHP is bundled with Macs, and compiling is similar to the
<link linkend="install.unix">Unix installation guide</link>.
PHP is bundled with macOS since macOS X (10.0.0) prior to macOS Monterey (12.0.0).
Compiling is similar to the <link linkend="install.unix">Unix installation guide</link>.
</para>
&install.macos.packages;
&install.macos.bundled;

View file

@ -111,16 +111,15 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
(see next section for the download).
</para>
<para>
To compile an extension into PHP, please refer to <link linkend="install.windows.legacy.building">
To compile an extension into PHP, please refer to <link linkend="install.windows.building">
building from source</link> documentation.
</para>
<para>
To compile a standalone extension (aka a DLL file), please refer to <link linkend="install.windows.legacy.building">
To compile a standalone extension (aka a DLL file), please refer to <link linkend="install.windows.building">
building from source</link> documentation. If the DLL file is available neither with your
PHP distribution nor in PECL, you may have to compile it before you can start using the
extension.
</para>
<sect2 xml:id="install.pecl.windows.find">
<title>Where to find an extension?</title>
<para>

View file

@ -177,14 +177,25 @@ cp php.ini-development /usr/local/lib/php.ini
<listitem>
<para>
Edit your httpd.conf to load the PHP module. The path on the right hand
side of the LoadModule statement must point to the path of the PHP
module on your system. The make install from above may have already
added this for you, but be sure to check.
</para>
<para>
Edit your httpd.conf to load the PHP module. The path on the right hand
side of the LoadModule statement must point to the path of the PHP
module on your system. The make install from above may have already
added this for you, but be sure to check.
</para>
<informalexample>
<informalexample>
<para>
For PHP 8:
</para>
<programlisting role="apache-conf">
<![CDATA[
LoadModule php_module modules/libphp.so
]]>
</programlisting>
</informalexample>
<informalexample>
<para>
For PHP 7:
</para>
@ -195,20 +206,9 @@ LoadModule php7_module modules/libphp7.so
</programlisting>
</informalexample>
<informalexample>
<para>
For PHP 5:
</para>
<programlisting role="apache-conf">
<![CDATA[
LoadModule php5_module modules/libphp5.so
]]>
</programlisting>
</informalexample>
</listitem>
</listitem>
<listitem>
<listitem>
<para>
Tell Apache to parse certain extensions as PHP. For example, let's have

159
install/windows/apache2.xml Normal file
View file

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="utf-8"?>
<sect1 xml:id="install.windows.apache2" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Apache 2.x on Microsoft Windows</title>
<para>
This section contains notes and hints specific to Apache 2.x installs
of PHP on Microsoft Windows systems.
</para>
<note>
<para>
Please read the <link linkend="install.windows.manual">manual
installation steps</link> first!
</para>
</note>
<para>
It is strongly recommended to consult the
<link xlink:href="&url.apache2.docs;">Apache Documentation</link>
to get have a basic understanding of the Apache 2.x Server.
Also consider reading the
<link xlink:href="&url.apache2.windows;">Windows specific notes</link>
for Apache 2.x before reading on here.
</para>
<para>
Download the most recent version of
<link xlink:href= "&url.apachelounge.download;">Apache 2.x</link>
and a fitting PHP version. Follow the
<link linkend="install.windows.manual">Manual Installation Steps</link>
and come back to go on with the integration of PHP and Apache.
</para>
<para>
There are three ways to set up PHP to work with Apache 2.x on Windows.
PHP can be run as a handler, as a CGI, or under FastCGI.
</para>
&note.apache.slashes;
<sect2 xml:id="install.windows.apache2.module">
<title>Installing as an Apache handler</title>
<para>
To load the PHP module for Apache 2.x, the following lines in the
Apache &httpd.conf; configuration file must be inserted:
<example>
<title>PHP and Apache 2.x as handler</title>
<programlisting role="apache-conf">
<![CDATA[
# before PHP 8.0.0 the name of the module was php7_module
LoadModule php_module "c:/php/php8apache2_4.dll"
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
# configure the path to php.ini
PHPIniDir "C:/php"
]]>
</programlisting>
</example>
</para>
<note>
<simpara>
The actual path to PHP must be substituted instead of
<filename>C:/php/</filename> in the above examples.
Make sure that the file referenced in the <literal>LoadModule</literal> directive is at
the specified location. Use <filename>php7apache2_4.dll</filename>
for PHP 7, or <filename>php8apache2_4.dll</filename> for PHP 8.
</simpara>
</note>
</sect2>
<sect2 xml:id="install.windows.apache2.cgi">
<title>Running PHP as CGI</title>
<para>
It is strongly recommended to consult the
<link xlink:href="&url.apache.cgi;">Apache CGI documentation</link>
for a more complete understanding of running CGI on Apache.
</para>
<para>
To run PHP as CGI, the php-cgi files will need to be placed in a
directory designated as a CGI directory using the ScriptAlias directive.
</para>
<para>
A <literal>#!</literal> line will need to be placed in the PHP files,
which point to the location of the PHP binary:
<example>
<title>PHP and Apache 2.x as CGI</title>
<programlisting>
<![CDATA[
#!C:/php/php.exe
<?php
phpinfo();
?>
]]>
</programlisting>
</example>
</para>
&warn.install.cgi;
</sect2>
<sect2 xml:id="install.windows.apache2.fastcgi">
<title>Running PHP under FastCGI</title>
<para>
Running PHP under FastCGI has a number of advantages over running it as a
CGI. Setting it up this way is fairly straightforward:
</para>
<para>
Obtain <literal>mod_fcgid</literal> from
<link xlink:href="&url.apachelounge.download;">&url.apachelounge;</link>.
Win32 binaries are available for download from that site.
Install the module according to the instructions that will come with it.
</para>
<para>
Configure your web server as shown below, taking care to adjust any paths
to reflect your how you have installed things on your particular system:
<example>
<title>Configure Apache to run PHP as FastCGI</title>
<programlisting>
<![CDATA[
LoadModule fcgid_module modules/mod_fcgid.so
# Where is your php.ini file?
FcgidInitialEnv PHPRC "c:/php"
<FilesMatch \.php$>
SetHandler fcgid-script
</FilesMatch>
FcgidWrapper "c:/php/php-cgi.exe" .php
]]>
</programlisting>
</example>
Files with a .php extension will now be executed by the PHP FastCGI
wrapper.
</para>
</sect2>
</sect1>
<!-- 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
-->

View file

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.building" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<sect1 xml:id="install.windows.building" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Building from source</title>
<para>
This chapter teaches how to compile PHP from sources on windows, using
This chapter teaches how to compile PHP from sources on Windows, using
Microsoft's tools. To compile PHP with cygwin, please refer to <xref
linkend="install.unix"/>.
</para>
@ -11,8 +10,7 @@
See the Wiki documentation at:
<link xlink:href="&url.wiki.windows.build.howto;">&url.wiki.windows.build.howto;</link>
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -0,0 +1,209 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.windows.commandline" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Command Line PHP on Microsoft Windows</title>
<para>
This section contains notes and hints specific to getting PHP running
from the command line for Windows.
</para>
<note>
<para>
You should read the <link linkend="install.windows.manual">manual
installation steps</link> first!
</para>
</note>
<para>
Getting PHP to run from the command line can be performed without making
any changes to Windows.
<screen>
<![CDATA[
C:\php\php.exe -f "C:\PHP Scripts\script.php" -- -arg1 -arg2 -arg3
]]>
</screen>
</para>
<para>
But there are some easy steps that can be followed to make this simpler.
Some of these steps should already have been taken, but are repeated here
to be able to provide a complete step-by-step sequence.
<itemizedlist>
<note>
<para>
Both <envar>PATH</envar> and <envar>PATHEXT</envar> are important
pre-existing system variables in Windows,
and care should be taken to not overwrite either variable,
only to add to them.
</para>
</note>
<listitem>
<para>
Append the location of the PHP executable (<filename>php.exe</filename>,
<filename>php-win.exe</filename> or <filename>php-cli.exe</filename>
depending upon your PHP version and display preferences) to the
<envar>PATH</envar> environment variable. Read more about how to
add your PHP directory to <envar>PATH</envar> in the <link
linkend="faq.installation.addtopath">corresponding FAQ entry</link>.
</para>
</listitem>
<listitem>
<para>
Append the <literal>.PHP</literal> extension to the
<varname>PATHEXT</varname> environment variable. This can be done
at the same time as amending the <envar>PATH</envar> environment
variable. Follow the same steps as described in the <link
linkend="faq.installation.addtopath">FAQ</link> but amend the
<varname>PATHEXT</varname> environment variable rather than the
<envar>PATH</envar> environment variable.
<note>
<para>
The position in which you place the <literal>.PHP</literal> will
determine which script or program is executed when there are matching
filenames. For example, placing <literal>.PHP</literal> before
<literal>.BAT</literal> will cause your script to run, rather than
the batch file, if there is a batch file with the same name.
</para>
</note>
</para>
</listitem>
<listitem>
<para>
Associate the <literal>.PHP</literal> extension with a file type. This
is done by running the following command:
<screen>
<![CDATA[
assoc .php=phpfile
]]>
</screen>
</para>
</listitem>
<listitem>
<para>
Associate the <literal>phpfile</literal> file type with the appropriate
PHP executable. This is done by running the following command:
<screen>
<![CDATA[
ftype phpfile="C:\php\php.exe" -f "%1" -- %~2
]]>
</screen>
</para>
</listitem>
</itemizedlist>
</para>
<para>
Following these steps will allow PHP scripts to be run from any directory
without the need to type the PHP executable or the <literal>.PHP</literal>
extension and all parameters will be supplied to the script for processing.
</para>
<para>
The example below details some of the registry changes that can be made manually.
<example>
<title>Registry changes</title>
<screen>
<![CDATA[
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.php]
@="phpfile"
"Content Type"="application/php"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile]
@="PHP Script"
"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008
"AlwaysShowExt"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\DefaultIcon]
@="C:\\php\\php-win.exe,0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\shell]
@="Open"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\shell\Open]
@="&Open"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\shell\Open\command]
@="\"C:\\php\\php.exe\" -f \"%1\" -- %~2"
]]>
</screen>
</example>
</para>
<para>
With these changes the same command can be written as:
<screen>
<![CDATA[
"C:\PHP Scripts\script" -arg1 -arg2 -arg3
]]>
</screen>
or, if your <literal>"C:\PHP Scripts"</literal> path is in the
<envar>PATH</envar> environment variable:
<screen>
<![CDATA[
script -arg1 -arg2 -arg3
]]>
</screen>
</para>
<note>
<para>
There is a small problem if you intend to use this technique and use your
PHP scripts as a command line filter, like the example below:
<screen>
<![CDATA[
dir | "C:\PHP Scripts\script" -arg1 -arg2 -arg3
]]>
</screen>
or
<screen>
<![CDATA[
dir | script -arg1 -arg2 -arg3
]]>
</screen>
You may find that the script simply hangs and nothing is output.
To get this operational, you need to make another registry change.
<screen>
<![CDATA[
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer]
"InheritConsoleHandles"=dword:00000001
]]>
</screen>
Further information regarding this issue can be found in this <link
xlink:href="http://support.microsoft.com/default.aspx?scid=kb;en-us;321788">Microsoft
Knowledgebase Article : 321788</link>.
As of Windows 10, this setting seems to be reversed, making the default install of
Windows 10 support inherited console handles automatically. This <link
xlink:href="https://social.msdn.microsoft.com/Forums/en-US/f19d740d-21c8-4dc2-a9ab-d5c0527e932b/nasty-file-association-regression-bug-in-windows-10-console?forum=windowssdk">
Microsoft forum post</link> provides the explanation.
</para>
</note>
</sect1>
<!-- 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
-->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

View file

@ -1,98 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<chapter xml:id="install.windows" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Installation on Windows systems</title>
<para>
Installing PHP on modern Microsoft Windows systems and recommended configuration with common web servers.
</para>
<note>
<title>Installation on Windows systems</title>
<para>
Installing PHP on modern Microsoft Windows systems and recommended configuration with common web servers.
</para>
<para>
The Official releases of PHP on Windows are recommended for production use.
However, you are welcome to build PHP from Source.
You will need a Visual Studio environment.
See <link xlink:href="&url.install.windows.stepbystep;">Step by Step Build Instructions</link>.
</para>
<para>
<itemizedlist spacing="compact">
<listitem>
<para>
If you are looking for information about older systems, such as Windows XP, 2003, 98 or Apache 1.x, see the <link linkend="install.windows.legacy.index">Legacy Info</link> section.
<link linkend="install.windows.commandline">Using PHP on Windows Command line</link>
</para>
</note>
</listitem>
<listitem>
<para>
<link linkend="install.cloud.azure">Installing PHP on Azure App Services</link>
(aka Microsoft Azure, Windows Azure, or (Windows) Azure Web Apps).
</para>
</listitem>
</itemizedlist>
</para>
<sect1 xml:id="install.windows.requirements">
<title>Install Requirements</title>
<para>
The Official releases of PHP on Windows are recommended for production use.
However, you are welcome to build PHP from Source. You will need a Visual Studio environment. See <link xlink:href="https://wiki.php.net/internals/windows/stepbystepbuild">Step by Step Build Instructions</link>.
PHP requires at least Windows 2008/Vista.
Either 32-Bit or 64-bit (<acronym>AKA</acronym> X86 or X64. PHP does not run on Windows RT/WOA/ARM).
As of PHP 7.2.0 Windows 2008 and Vista are no longer supported.
</para>
<para>
PHP requires the Visual C runtime (CRT). Many applications require that so it may already be installed.
</para>
<para>
The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable
for all these PHP versions, see
<link xlink:href="https://visualstudio.microsoft.com/downloads/">https://visualstudio.microsoft.com/downloads/</link>.
</para>
<para>
You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds.
</para>
<para>
If CRT is already installed, the installer will tell you that and not change anything.
</para>
<para>
The CRT installer supports the /quiet and /norestart command-line switches, so you can script running it.
</para>
</sect1>
<sect1 xml:id="install.windows.pecl">
<title>PECL</title>
<para>
PECL extensions are pre-built for Windows and available from:
<link xlink:href="http://windows.php.net/downloads/pecl/releases/">http://windows.php.net/downloads/pecl/releases/</link>
</para>
<para>
<itemizedlist spacing="compact">
<listitem>
<para>
<link linkend="install.windows.legacy.commandline">Using PHP on Windows Command line</link>
</para>
</listitem>
<listitem>
<para>
<link linkend="install.cloud.azure">Installing PHP on Azure App Services</link> (aka Microsoft Azure, Windows Azure, or (Windows) Azure Web Apps).
</para>
</listitem>
</itemizedlist>
Some extensions use features specific to some Unix systems and so are not available on Windows.
Otherwise, all extensions are available for Windows.
</para>
</sect1>
<sect1 xml:id="install.windows.requirements">
<title>Install Requirements</title>
<para>
PHP 5.5+ require at least Windows 2008/Vista, or 2008r2, 2012, 2012r2, 2016 or 7, 8, 8.1, 10. Either 32-Bit or 64-bit (aka X86 or X64. PHP does not run on Windows RT/WOA/ARM).
As of PHP 7.2.0 Windows 2008 and Vista are no longer supported.
</para>
<para>
PHP requires the Visual C runtime(CRT). Many applications require that so it may already be installed.
</para>
<para>
PHP 5.5 and 5.6 require VC CRT 11 (Visual Studio 2012). See: <link xlink:href="https://www.microsoft.com/en-us/download/details.aspx?id=30679">https://www.microsoft.com/en-us/download/details.aspx?id=30679</link>
</para>
<para>
PHP 7.0 and 7.1 require VC CRT 14 (Visual Studio 2015).
PHP 7.2, 7.3 and 7.4 require VC CRT 15 (Visual Studio 2017).
The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable
for all these PHP versions, see
<link xlink:href="https://visualstudio.microsoft.com/downloads/">https://visualstudio.microsoft.com/downloads/</link>.
</para>
<para>
You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds.
</para>
<para>
If CRT is already installed, the installer will tell you that and not change anything.
</para>
<para>
The CRT installer supports the /quiet and /norestart command-line switches, so you can script running it.
</para>
<para>
VC11 CRT DLLs can be copied from your local machine to a remote machine(a `Copy Deployment` installation) instead of running the installer on the remote machine (such as a web server you have restricted access to).
</para>
<para>
VC14 CRT does not support a `Copy Deployment` installation. VC14 CRT has many more DLLs(most in files with names starting with api-*). If you can find them all and copy them, it will also work (try a tool like Resource Hacker to get a list of all the DLLs to copy).
</para>
</sect1>
<sect1 xml:id="install.windows.pecl">
<title>PECL</title>
<para>PECL extensions are pre-built for Windows and available from: <link xlink:href="http://windows.php.net/downloads/pecl/releases/">http://windows.php.net/downloads/pecl/releases/</link>
</para>
<para>Some extensions use features specific to some Unix systems and so are not available on Windows. Otherwise, all extensions are available for Windows.
</para>
</sect1>
<!-- Critical: ensure all pages in install/windows and that install/windows/legacy/index are referenced here!
otherwise you will get IDREF attribute errors for all links -->
&install.windows.tools;
&install.windows.recommended;
&install.windows.manual;
&install.windows.troubleshooting;
&install.windows.legacy.index;
&install.windows.tools;
&install.windows.recommended;
&install.windows.manual;
&install.windows.building;
&install.windows.commandline;
&install.windows.apache2;
&install.windows.troubleshooting;
</chapter>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,166 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.apache1" xmlns="http://docbook.org/ns/docbook">
<title>Apache 1.3.x on Microsoft Windows</title>
<para>
This section contains notes and hints specific to Apache 1.3.x installs
of PHP on Microsoft Windows systems. There are also
<!--<link linkend="install.windows.legacy.apache2">instructions and notes
for Apache 2</link> on a separate page.-->
</para>
<note>
<para>
Please read the <link linkend="install.windows.legacy.manual">manual
installation steps</link> first!
</para>
</note>
<simpara>
There are two ways to set up PHP to work with Apache 1.3.x
on Windows. One is to use the CGI binary (<filename>php.exe</filename>
for PHP 4 and <filename>php-cgi.exe</filename> for PHP 5),
the other is to use the Apache Module DLL. In either case
you need to edit your &httpd.conf; to configure Apache to
work with PHP, and then restart the server.
</simpara>
<simpara>
It is worth noting here that now the SAPI module has been
made more stable under Windows, we recommend it's use above
the CGI binary, since it is more transparent and secure.
</simpara>
<simpara>
Although there can be a few variations of configuring PHP
under Apache, these are simple enough to be used by the
newcomer. Please consult the Apache Documentation for further
configuration directives.
</simpara>
<simpara>
After changing the configuration file, remember to restart the server, for
example, <command>NET STOP APACHE</command> followed by
<command>NET START APACHE</command>, if you run Apache as a Windows
Service, or use your regular shortcuts.
</simpara>
&note.apache.slashes;
<sect3 xml:id="install.windows.legacy.apache1.module">
<title>Installing as an Apache module</title>
<para>
You should add the following lines to your Apache &httpd.conf; file:
</para>
<para>
<example>
<title>PHP as an Apache 1.3.x module</title>
<para>
This assumes PHP is installed to <filename>c:\php</filename>. Adjust the
path if this is not the case.
</para>
<para>
For PHP 4:
</para>
<programlisting role="apache-conf">
<![CDATA[
# Add to the end of the LoadModule section
# Don't forget to copy this file from the sapi directory!
LoadModule php4_module "C:/php/php4apache.dll"
# Add to the end of the AddModule section
AddModule mod_php4.c
]]>
</programlisting>
<para>
For PHP 5:
</para>
<programlisting role="apache-conf">
<![CDATA[
# Add to the end of the LoadModule section
LoadModule php5_module "C:/php/php5apache.dll"
# Add to the end of the AddModule section
AddModule mod_php5.c
]]>
</programlisting>
<para>
For both:
</para>
<programlisting role="apache-conf">
<![CDATA[
# Add this line inside the <IfModule mod_mime.c> conditional brace
AddType application/x-httpd-php .php
# For syntax highlighted .phps files, also add
AddType application/x-httpd-php-source .phps
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.apache1.cgi">
<title>Installing as a CGI binary</title>
<para>
If you unzipped the PHP package to <filename>C:\php\</filename> as described
in the <link linkend="install.windows.legacy.manual">Manual
Installation Steps</link> section, you need to insert
these lines to your Apache configuration file to set
up the CGI binary:
<example>
<title>PHP and Apache 1.3.x as CGI</title>
<programlisting role="apache-conf">
<![CDATA[
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
# For PHP 4
Action application/x-httpd-php "/php/php.exe"
# For PHP 5
Action application/x-httpd-php "/php/php-cgi.exe"
# specify the directory where php.ini is
SetEnv PHPRC C:/php
]]>
</programlisting>
</example>
Note that the second line in the list above can be found
in the actual versions of &httpd.conf;, but it is commented out. Remember
also to substitute the <filename>c:/php/</filename> for your actual path to
PHP.
</para>
&warn.install.cgi;
<simpara>
If you would like to present PHP source files syntax highlighted, there
is no such convenient option as with the module version of PHP.
If you chose to configure Apache to use PHP as a CGI binary, you
will need to use the <function>highlight_file</function> function. To
do this simply create a PHP script file and add this code:
<literal>&lt;?php highlight_file('some_php_script.php'); ?&gt;</literal>.
</simpara>
</sect3>
</sect2>
<!-- 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
-->

View file

@ -1,198 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.apache2" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Apache 2.x on Microsoft Windows</title>
<para>
This section contains notes and hints specific to Apache 2.x installs
of PHP on Microsoft Windows systems. We also
<!--have <link linkend="install.windows.legacy.apache1">instructions and notes
for Apache 1.3.x users on a separate page</link>.-->
</para>
<note>
<para>
You should read the <link linkend="install.windows.legacy.manual">manual
installation steps</link> first!
</para>
</note>
<note>
<title>Apache 2.2 Support</title>
<para>
Users of Apache 2.2 should note that the DLL file for Apache 2.2 is
named <filename>php5apache2_2.dll</filename> rather than <filename>php5apache2.dll</filename>
and is available only for PHP 5.2.0 and later.
</para>
</note>
<para>
You are strongly encouraged to consult the
<link xlink:href="&url.apache2.docs;">Apache Documentation</link> to get
a basic understanding of the Apache 2.x Server. Also consider
reading the <link xlink:href="&url.apache2.windows;">Windows specific
notes</link> for Apache 2.x before reading on here.
</para>
<para>
Apache 2.x is designed to run on the Windows version designated as
server platforms, such as Windows NT 4.0, Windows 2000,
Windows XP, or Windows 7. While Apache 2.x works tolerably well on Windows 9x,
support on these platforms is incomplete, and some things will not work
correctly. There is no plan to remedy this situation.
</para>
<para>
Download the most recent version of <link xlink:href= "&url.apache;">
Apache 2.x</link> and a fitting PHP version.
Follow the <link linkend="install.windows.legacy.manual">Manual Installation
Steps</link> and come back to go on with the integration of PHP and Apache.
</para>
<para>
There are three ways to set up PHP to work with Apache 2.x on Windows.
You can run PHP as a handler, as a CGI, or under FastCGI.
</para>
&note.apache.slashes;
<sect3 xml:id="install.windows.apache2.legacy.module">
<title>Installing as an Apache handler</title>
<para>
You need to insert the following lines into your
Apache &httpd.conf; configuration file to load the
PHP module for Apache 2.x:
<example>
<title>PHP and Apache 2.x as handler</title>
<programlisting role="apache-conf">
<![CDATA[
#
LoadModule php5_module "c:/php/php5apache2.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"
]]>
</programlisting>
</example>
</para>
<note>
<simpara>
Remember to substitute your actual path to PHP for the
<filename>C:/php/</filename> in the above examples. Take care to use
either <filename>php5apache2.dll</filename> or
<filename>php5apache2_2.dll</filename> in your LoadModule directive and
verify that the referenced file is in fact located at the file path
that you point to in this directive.
</simpara>
</note>
<para>
The above configuration will enable PHP handling of any file that has a
.php extension, even if there are other file extensions. For example, a
file named <filename>example.php.txt</filename> will be executed by the
PHP handler. To ensure that only files that <emphasis>end in</emphasis>
<filename>.php</filename> are executed, use the following configuration
instead:
</para>
<example>
<programlisting role="apache-conf">
<![CDATA[
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
]]>
</programlisting>
</example>
</sect3>
<sect3 xml:id="install.windows.apache2.legacy.cgi">
<title>Running PHP as CGI</title>
<para>
You should consult the <link xlink:href="&url.apache.cgi;">Apache CGI
documentation</link> for a more complete understanding of running CGI
on Apache.
</para>
<para>
To run PHP as CGI, you'll need to place your php-cgi files in a
directory designated as a CGI directory using the ScriptAlias directive.
</para>
<para>
You will then need to insert a #! line in the PHP files, pointing to the
location of your PHP binary:
<example>
<title>PHP and Apache 2.x as CGI</title>
<programlisting>
<![CDATA[
#!C:/php/php.exe
<?php
phpinfo();
?>
]]>
</programlisting>
</example>
</para>
&warn.install.cgi;
</sect3>
<sect3 xml:id="install.windows.apache2.legacy.fastcgi">
<title>Running PHP under FastCGI</title>
<para>
Running PHP under FastCGI has a number of advantages over running it as a
CGI. Setting it up this way is fairly straightforward:
</para>
<para>
Obtain mod_fcgid from
<link xlink:href="&url.apache.fcgid;">&url.apache.fcgid;</link>. Win32
binaries are available for download from that site. Install the module
according to the instructions that will come with it.
</para>
<para>
Configure your web server as shown below, taking care to adjust any paths
to reflect your how you have installed things on your particular system:
<example>
<title>Configure Apache to run PHP as FastCGI</title>
<programlisting>
<![CDATA[
LoadModule fcgid_module modules/mod_fcgid.so
# Where is your php.ini file?
FcgidInitialEnv PHPRC "c:/php"
AddHandler fcgid-script .php
FcgidWrapper "c:/php/php-cgi.exe" .php
]]>
</programlisting>
</example>
Files with a .php extension will now be executed by the PHP FastCGI
wrapper.
</para>
</sect3>
</sect2>
<!-- 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
-->

View file

@ -1,209 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.commandline" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Command Line PHP on Microsoft Windows</title>
<para>
This section contains notes and hints specific to getting PHP running
from the command line for Windows.
</para>
<note>
<para>
You should read the <link linkend="install.windows.legacy.manual">manual
installation steps</link> first!
</para>
</note>
<para>
Getting PHP to run from the command line can be performed without making
any changes to Windows.
<screen>
<![CDATA[
C:\PHP5\php.exe -f "C:\PHP Scripts\script.php" -- -arg1 -arg2 -arg3
]]>
</screen>
</para>
<para>
But there are some easy steps that can be followed to make this simpler.
Some of these steps should already have been taken, but are repeated here
to be able to provide a complete step-by-step sequence.
<itemizedlist>
<note>
<para>
Both <envar>PATH</envar> and <envar>PATHEXT</envar> are important pre-existing system variables in Windows, and care should be taken to not overwrite either variable, only to add to them.
</para>
</note>
<listitem>
<para>
Append the location of the PHP executable (<filename>php.exe</filename>,
<filename>php-win.exe</filename> or <filename>php-cli.exe</filename>
depending upon your PHP version and display preferences) to the
<envar>PATH</envar> environment variable. Read more about how to
add your PHP directory to <envar>PATH</envar> in the <link
linkend="faq.installation.addtopath">corresponding FAQ entry</link>.
</para>
</listitem>
<listitem>
<para>
Append the <literal>.PHP</literal> extension to the
<varname>PATHEXT</varname> environment variable. This can be done
at the same time as amending the <envar>PATH</envar> environment
variable. Follow the same steps as described in the <link
linkend="faq.installation.addtopath">FAQ</link> but amend the
<varname>PATHEXT</varname> environment variable rather than the
<envar>PATH</envar> environment variable.
<note>
<para>
The position in which you place the <literal>.PHP</literal> will
determine which script or program is executed when there are matching
filenames. For example, placing <literal>.PHP</literal> before
<literal>.BAT</literal> will cause your script to run, rather than
the batch file, if there is a batch file with the same name.
</para>
</note>
</para>
</listitem>
<listitem>
<para>
Associate the <literal>.PHP</literal> extension with a file type. This
is done by running the following command:
<screen>
<![CDATA[
assoc .php=phpfile
]]>
</screen>
</para>
</listitem>
<listitem>
<para>
Associate the <literal>phpfile</literal> file type with the appropriate
PHP executable. This is done by running the following command:
<screen>
<![CDATA[
ftype phpfile="C:\PHP5\php.exe" -f "%1" -- %~2
]]>
</screen>
</para>
</listitem>
</itemizedlist>
</para>
<para>
Following these steps will allow PHP scripts to be run from any directory
without the need to type the PHP executable or the <literal>.PHP</literal>
extension and all parameters will be supplied to the script for processing.
</para>
<para>
The example below details some of the registry changes that can be made manually.
<example>
<title>Registry changes</title>
<screen>
<![CDATA[
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.php]
@="phpfile"
"Content Type"="application/php"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile]
@="PHP Script"
"EditFlags"=dword:00000000
"BrowserFlags"=dword:00000008
"AlwaysShowExt"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\DefaultIcon]
@="C:\\PHP5\\php-win.exe,0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\shell]
@="Open"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\shell\Open]
@="&Open"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\phpfile\shell\Open\command]
@="\"C:\\PHP5\\php.exe\" -f \"%1\" -- %~2"
]]>
</screen>
</example>
</para>
<para>
With these changes the same command can be written as:
<screen>
<![CDATA[
"C:\PHP Scripts\script" -arg1 -arg2 -arg3
]]>
</screen>
or, if your <literal>"C:\PHP Scripts"</literal> path is in the
<envar>PATH</envar> environment variable:
<screen>
<![CDATA[
script -arg1 -arg2 -arg3
]]>
</screen>
</para>
<note>
<para>
There is a small problem if you intend to use this technique and use your
PHP scripts as a command line filter, like the example below:
<screen>
<![CDATA[
dir | "C:\PHP Scripts\script" -arg1 -arg2 -arg3
]]>
</screen>
or
<screen>
<![CDATA[
dir | script -arg1 -arg2 -arg3
]]>
</screen>
You may find that the script simply hangs and nothing is output.
To get this operational, you need to make another registry change.
<screen>
<![CDATA[
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer]
"InheritConsoleHandles"=dword:00000001
]]>
</screen>
Further information regarding this issue can be found in this <link
xlink:href="http://support.microsoft.com/default.aspx?scid=kb;en-us;321788">Microsoft
Knowledgebase Article : 321788</link>.
As of Windows 10, this setting seems to be reversed, making the default install of
Windows 10 support inherited console handles automatically. This <link
xlink:href="https://social.msdn.microsoft.com/Forums/en-US/f19d740d-21c8-4dc2-a9ab-d5c0527e932b/nasty-file-association-regression-bug-in-windows-10-console?forum=windowssdk">
Microsoft forum post</link> provides the explanation.
</para>
</note>
</sect2>
<!-- 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
-->

View file

@ -1,371 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.extensions" xmlns="http://docbook.org/ns/docbook">
<title>Installation of extensions on Windows</title>
<para>
After installing PHP and a web server on Windows, you will probably want to
install some extensions for added functionality. You can choose which
extensions you would like to load when PHP starts by modifying your
&php.ini;. You can also load a module dynamically in your script using
<function>dl</function>.
</para>
<para>
The DLLs for PHP extensions are prefixed with <literal>php_</literal>.
</para>
<para>
Many extensions are <emphasis>built into</emphasis> the Windows version
of PHP. This means additional DLL files, and the
<link linkend="ini.extension">extension</link> directive, are
<emphasis>not</emphasis> used to load these extensions. The Windows
<link linkend ="install.windows.legacy.extensions.overview">PHP Extensions</link>
table lists extensions that require, or used to require, additional PHP
DLL files. Here's a list of built in extensions (updated PHP 5.0.4):
<link linkend="book.bc">BCMath</link>,
<link linkend="book.calendar">Calendar</link>,
<link linkend="book.com">COM</link>,
<link linkend="book.ctype">Ctype</link>,
<link linkend="book.dom">DOM</link>,
<link linkend="book.ftp">FTP</link>,
<link linkend="book.libxml">LibXML</link>,
<link linkend="book.iconv">Iconv</link>,
<link linkend="book.uodbc">ODBC</link>,
<link linkend="book.pcre">PCRE</link>,
<link linkend="book.session">Session</link>,
<link linkend="book.simplexml">SimpleXML</link>,
<link linkend="book.spl">SPL</link>,
<link linkend="book.wddx">WDDX</link>,
<link linkend="book.xml">XML</link>&listendand;
<link linkend="book.zlib">Zlib</link>.
</para>
<para>
The default location PHP searches for extensions is
<filename class="directory">C:\php5</filename>. To change this
setting to reflect your setup of PHP edit your &php.ini; file:
<itemizedlist>
<listitem>
<para>
You will need to change the
<link linkend ="ini.extension-dir">extension_dir</link> setting to
point to the directory where your extensions lives, or where you have
placed your <filename>php_*.dll</filename> files. For example:
<informalexample>
<programlisting role="ini">
<![CDATA[
extension_dir = C:\php\extensions
]]>
</programlisting>
</informalexample>
</para>
</listitem>
<listitem>
<para>
Enable the extension(s) in &php.ini; you want to use by uncommenting the
<literal>extension=php_*.dll</literal> lines in &php.ini;. This is done
by deleting the leading ; from the extension you want to load.
<example>
<title>Enable <link linkend="book.bzip2">Bzip2</link> extension for PHP-Windows</title>
<programlisting role="ini">
<![CDATA[
// change the following line from ...
;extension=php_bz2.dll
// ... to
extension=php_bz2.dll
]]>
</programlisting>
</example>
</para>
</listitem>
<listitem>
<para>
Some of the extensions need extra DLLs to work. Couple of them can be
found in the distribution package, in the main folder, but some, for example Oracle
(<filename>php_oci8.dll</filename>) require DLLs which are not bundled
with the distribution package. Don't forget to include <filename
class="directory">C:\php</filename> in the system
<envar>PATH</envar> (this process is explained in a separate <link
linkend="faq.installation.addtopath">FAQ entry</link>).
</para>
</listitem>
<listitem>
<para>
Some of these DLLs are not bundled with the PHP distribution. See each
extensions documentation page for details. Also, read the manual
section titled <link linkend="install.pecl">Installation of PECL
extensions</link> for details on <acronym>PECL</acronym>. An
increasingly large number of PHP extensions are found in
<acronym>PECL</acronym>, and these extensions require a
<link linkend="install.pecl.downloads">separate download</link>.
</para>
</listitem>
</itemizedlist>
<note>
<simpara>
If you are running a server module version of PHP
remember to restart your web server to reflect your changes to &php.ini;.
</simpara>
</note>
</para>
<para>
The following table describes some of the extensions available and required
additional dlls.
<table xml:id="install.windows.legacy.extensions.overview">
<title>PHP Extensions</title>
<tgroup cols="3">
<thead>
<row>
<entry>Extension</entry>
<entry>Description</entry>
<entry>Notes</entry>
</row>
</thead>
<tbody>
<row>
<entry>php_bz2.dll</entry>
<entry><link linkend="book.bzip2">bzip2</link> compression functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_calendar.dll</entry>
<entry><link linkend="book.calendar">Calendar</link> conversion functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_ctype.dll</entry>
<entry><link linkend="book.ctype">ctype</link> family functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_curl.dll</entry>
<entry><link linkend="book.curl">CURL</link>, Client URL library functions</entry>
<entry>Requires: <filename>libeay32.dll</filename>,
<filename>ssleay32.dll</filename> (bundled), or, as of OpenSSL 1.1
<filename>libcrypto-*.dll</filename> and <filename>libssl-*.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_dba.dll</entry>
<entry><link linkend="book.dba">DBA</link>: DataBase (dbm-style)
Abstraction layer functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_dbase.dll</entry>
<entry><link linkend="book.dbase">dBase</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_exif.dll</entry>
<entry><link linkend="book.exif">EXIF</link> functions</entry>
<entry>
<link linkend="book.mbstring">php_mbstring.dll</link>. And,
<filename>php_exif.dll</filename> must be loaded <literal>after</literal>
<filename>php_mbstring.dll</filename> in &php.ini;.
</entry>
</row>
<row>
<entry>php_fbsql.dll</entry>
<entry><link linkend="book.fbsql">FrontBase</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_fdf.dll</entry>
<entry><link linkend="book.fdf">FDF</link>: Forms Data Format functions.</entry>
<entry>Requires: <filename>fdftk.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_filepro.dll</entry>
<entry><link linkend="book.filepro">filePro</link> functions</entry>
<entry>Read-only access</entry>
</row>
<row>
<entry>php_ftp.dll</entry>
<entry><link linkend="book.ftp">FTP</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_gd2.dll</entry>
<entry><link linkend="book.image">GD</link> library image functions</entry>
<entry>GD2</entry>
</row>
<row>
<entry>php_gettext.dll</entry>
<entry><link linkend="book.gettext">Gettext</link> functions</entry>
<entry>
PHP &lt;= 4.2.0 requires <filename>gnu_gettext.dll</filename> (bundled),
PHP &gt;= 4.2.3 requires <filename>libintl-1.dll</filename>,
<filename>iconv.dll</filename> (bundled).
</entry>
</row>
<row>
<entry>php_hyperwave.dll</entry>
<entry>HyperWave functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_iconv.dll</entry>
<entry><link linkend="book.iconv">ICONV</link> characterset conversion</entry>
<entry>
Requires: <filename>iconv-1.3.dll</filename> (bundled), <filename>iconv.dll</filename>
</entry>
</row>
<row>
<entry>php_iisfunc.dll</entry>
<entry>IIS management functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_imap.dll</entry>
<entry><link linkend="book.imap">IMAP</link> POP3 and NNTP functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_ingres.dll</entry>
<entry><link linkend="book.ingres">Ingres</link> functions</entry>
<entry>Requires: Ingres libraries</entry>
</row>
<row>
<entry>php_interbase.dll</entry>
<entry><link linkend="book.ibase">InterBase</link> functions</entry>
<entry>Requires: <filename>gds32.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_ldap.dll</entry>
<entry><link linkend="book.ldap">LDAP</link> functions</entry>
<entry>
Requires <filename>libeay32.dll</filename>,
<filename>ssleay32.dll</filename> (bundled), or, as of OpenSSL 1.1
<filename>libcrypto-*.dll</filename> and <filename>libssl-*.dll</filename> (bundled)
</entry>
</row>
<row>
<entry>php_mbstring.dll</entry>
<entry><link linkend="book.mbstring">Multi-Byte String</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_mcrypt.dll</entry>
<entry><link linkend="book.mcrypt">Mcrypt Encryption</link> functions</entry>
<entry>Requires: <filename>libmcrypt.dll</filename></entry>
</row>
<row>
<entry>php_mhash.dll</entry>
<entry><link linkend="book.mhash">Mhash</link> functions</entry>
<entry>Requires: <filename>libmhash.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_mysql.dll</entry>
<entry><link linkend="book.mysql">MySQL</link> functions</entry>
<entry>Requires <filename>libmysql.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_mysqli.dll</entry>
<entry><link linkend="book.mysqli">MySQLi</link> functions</entry>
<entry>Requires <filename>libmysql.dll</filename>
(<filename>libmysqli.dll</filename> in PHP &lt;= 5.0.2) (bundled)</entry>
</row>
<row>
<entry>php_oci8.dll</entry>
<entry><link linkend="book.oci8">Oracle 8</link> functions</entry>
<entry>Requires: Oracle 8.1+ client libraries</entry>
</row>
<row>
<entry>php_openssl.dll</entry>
<entry><link linkend="book.openssl">OpenSSL</link> functions</entry>
<entry>Requires: <filename>libeay32.dll</filename> (bundled),
or, as of OpenSSL 1.1, <filename>liblibcrypto-*.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_pgsql.dll</entry>
<entry><link linkend="book.pgsql">PostgreSQL</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_shmop.dll</entry>
<entry><link linkend="book.shmop">Shared Memory</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_snmp.dll</entry>
<entry><link linkend="book.snmp">SNMP</link> get and walk functions</entry>
<entry>NT only!</entry>
</row>
<row>
<entry>php_soap.dll</entry>
<entry><link linkend="book.soap">SOAP</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_sockets.dll</entry>
<entry><link linkend="book.sockets">Socket</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_tidy.dll</entry>
<entry><link linkend="book.tidy">Tidy</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_tokenizer.dll</entry>
<entry><link linkend="book.tokenizer">Tokenizer</link> functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_w32api.dll</entry>
<entry>W32api functions</entry>
<entry>None</entry>
</row>
<row>
<entry>php_xmlrpc.dll</entry>
<entry><link linkend="book.xmlrpc">XML-RPC</link> functions</entry>
<entry>Requires: <filename>iconv.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_xslt.dll</entry>
<entry>XSLT functions</entry>
<entry>
Requires <filename>sablot.dll</filename>, <filename>expat.dll</filename>,
<filename>iconv.dll</filename> (bundled).
</entry>
</row>
<row>
<entry>php_yaz.dll</entry>
<entry><link linkend="book.yaz">YAZ</link> functions</entry>
<entry>Requires: <filename>yaz.dll</filename> (bundled)</entry>
</row>
<row>
<entry>php_zip.dll</entry>
<entry><link linkend="book.zip">Zip File</link> functions</entry>
<entry>Read only access</entry>
</row>
<row>
<entry>php_zlib.dll</entry>
<entry><link linkend="book.zlib">ZLib</link> compression functions</entry>
<entry>None</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</sect2>
<!-- 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
-->

View file

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.iis" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Microsoft IIS</title>
<para>
This section contains PHP installation instructions specific to Microsoft Internet Information Services (IIS).
</para>
<itemizedlist>
<listitem>
<simpara>
<link linkend="install.windows.legacy.iis6">Manually installing PHP on Microsoft IIS 5.1 and IIS 6.0</link>
</simpara>
</listitem>
<listitem>
<simpara>
<link linkend="install.windows.legacy.iis7">Manually installing PHP on Microsoft IIS 7.0 and later</link>
</simpara>
</listitem>
</itemizedlist>
</sect2>
<!-- 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
-->

View file

@ -1,241 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.iis6" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Microsoft IIS 5.1 and IIS 6.0</title>
<para>
This section contains instructions for manually setting up Internet Information
Services (IIS) 5.1 and IIS 6.0 to work with PHP on Microsoft Windows XP and Windows
Server 2003. For instructions on setting up IIS 7.0 and later versions on Windows
Vista, Windows Server 2008, Windows 7 and Windows Server 2008 R2 refer to
<link linkend="install.windows.legacy.iis7">Microsoft IIS 7.0 and later</link>.
</para>
<sect3 xml:id="install.windows.legacy.iis6.fastcgi">
<title>Configuring IIS to process PHP requests</title>
<para>
Download and install PHP in accordance to the instructions described in
<link linkend="install.windows.legacy.manual">manual installation steps</link>
<note>
<para>
Non-thread-safe build of PHP is recommended when using IIS. The non-thread-safe
builds are available at <link xlink:href="&url.php.win.downloads;">PHP for Windows:
Binaries and Sources Releases.</link>
</para>
</note>
</para>
<para>
Configure the CGI- and FastCGI-specific settings in <filename>php.ini</filename> file as shown below:
<example>
<title>CGI and FastCGI settings in <filename>php.ini</filename></title>
<programlisting role="ini">
<![CDATA[
fastcgi.impersonate = 1
fastcgi.logging = 0
cgi.fix_pathinfo=1
cgi.force_redirect = 0
]]>
</programlisting>
</example>
</para>
<para>
Download and install the <link xlink:href="&url.iis.fastcgi.downloads;">Microsoft FastCGI Extension for IIS 5.1 and 6.0</link>.
The extension is available for 32-bit and 64-bit platforms - select the right download package for your platform.
</para>
<para>Configure the FastCGI extension to handle PHP-specific requests by running the command shown below.
Replace the value of the &quot;-path&quot; parameter with the absolute file path to the
<filename>php-cgi.exe</filename> file.
<example>
<title>Configuring FastCGI extension to handle PHP requests</title>
<programlisting>
<![CDATA[
cscript %windir%\system32\inetsrv\fcgiconfig.js -add -section:"PHP" ^
-extension:php -path:"C:\PHP\php-cgi.exe"
]]>
</programlisting>
</example>
</para>
<para>
This command will create an IIS script mapping for *.php file extension, which will result in all URLs
that end with .php being handled by FastCGI extension. Also, it will configure FastCGI extension to
use the executable <filename>php-cgi.exe</filename> to process the PHP requests.
<note>
<para>
At this point the required installation and configuration steps are completed. The remaining
instructions below are optional but highly recommended for achieving optimal functionality
and performance of PHP on IIS.
</para>
</note>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis6.impersonation">
<title>Impersonation and file system access</title>
<para>
It is recommended to enable FastCGI impersonation in PHP when using IIS. This
is controlled by the <varname>fastcgi.impersonate</varname> directive in <filename>php.ini</filename> file. When
impersonation is enabled, PHP will perform all the file system operations on
behalf of the user account that has been determined by IIS authentication. This
ensures that even if the same PHP process is shared across different IIS web
sites, the PHP scripts in those web sites will not be able to access each
others&#39; files as long as different user accounts are used for IIS authentication
on each web site.
</para>
<para>
For example IIS 5.1 and IIS 6.0, in its default configuration, has anonymous authentication enabled
with built-in user account IUSR_&lt;MACHINE_NAME&gt; used as a default identity. This means that in
order for IIS to execute PHP scripts, it is necessary to grant IUSR_&lt;MACHINE_NAME&gt; account
read permission on those scripts. If PHP applications need to perform write operations on certain
files or write files into some folders then IUSR_&lt;MACHINE_NAME&gt; account should have write permission to those.
</para>
<para>
To determine which user account is used by IIS anonymous authentication, follow these steps:
<procedure>
<step>
<simpara>In the Windows Start Menu choose &quot;Run:&quot;, type &quot;inetmgr&quot; and click &quot;Ok&quot;;</simpara>
</step>
<step>
<simpara>Expand the list of web sites under the &quot;Web Sites&quot; node in the tree view, right-click on a web
site that is being used and select &quot;Properties&quot;;
</simpara>
</step>
<step>
<simpara>Click the &quot;Directory Security&quot; tab;</simpara>
</step>
<step>
<simpara>Take note of a &quot;User name:&quot; field in the &quot;Authentication Methods&quot; dialog</simpara>
</step>
</procedure>
<mediaobject>
<alt>Anonymous authenication for IIS 5.1 and IIS 6.0</alt>
<imageobject>
<imagedata fileref="en/install/windows/figures/iis6anonauth.png" width="654" depth="461" />
</imageobject>
</mediaobject>
</para>
<para>
To modify the permissions settings on files and folders, use the Windows Explorer user interface
or <varname>icacls</varname> command.
<example>
<title>Configuring file access permissions</title>
<programlisting>
<![CDATA[
icacls C:\inetpub\wwwroot\upload /grant IUSR:(OI)(CI)(M)
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis6.defaultdoc">
<title>Set <filename>index.php</filename> as a default document in IIS</title>
<para>
The IIS default documents are used for HTTP requests that do not specify a document name. With PHP applications,
<filename>index.php</filename> usually acts as a default document. To add <filename>index.php</filename> to the list of
IIS default documents, follow these steps:
<procedure>
<step>
<simpara>In the Windows Start Menu choose &quot;Run:&quot;, type &quot;inetmgr&quot; and click &quot;Ok&quot;;</simpara>
</step>
<step>
<simpara>Right-click on the &quot;Web Sites&quot; node in the tree view and select &quot;Properties&quot;;</simpara>
</step>
<step>
<simpara>Click the &quot;Documents&quot; tab;</simpara>
</step>
<step>
<simpara>Click the &quot;Add...&quot; button and enter &quot;index.php&quot; for the &quot;Default content page:&quot;.</simpara>
</step>
</procedure>
<mediaobject>
<alt>Setting index.php as default document for IIS</alt>
<imageobject>
<imagedata fileref="en/install/windows/figures/iis6defaultdoc.png" width="659" depth="465" />
</imageobject>
</mediaobject>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis6.recycling">
<title>FastCGI and PHP Recycling configuration</title>
<para>
Configure IIS FastCGI extension settings for recycling of PHP processes by using the commands shown below.
The FastCGI setting <varname>instanceMaxRequests</varname> controls how many requests will be processed by a single
<filename>php-cgi.exe</filename> process before FastCGI extension shuts it down. The PHP environment variable
<varname>PHP_FCGI_MAX_REQUESTS</varname> controls how many requests a single <filename>php-cgi.exe</filename> process
will handle before it recycles itself. Make sure that the value specified for FastCGI <varname>InstanceMaxRequests</varname>
setting is less than or equal to the value specified for <varname>PHP_FCGI_MAX_REQUESTS</varname>.
<example>
<title>Configuring FastCGI and PHP recycling</title>
<programlisting>
<![CDATA[
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^
-InstanceMaxRequests:10000
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^
-EnvironmentVars:PHP_FCGI_MAX_REQUESTS:10000
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis6.timeouts">
<title>Configuring FastCGI timeout settings</title>
<para>
Increase the timeout settings for FastCGI extension if there are applications that have long running PHP scripts.
The two settings that control timeouts are <varname>ActivityTimeout</varname> and <varname>RequestTimeout</varname>.
Refer to <link xlink:href="&url.iis.fastcgi.settings;">Configuring FastCGI Extension for IIS 6.0</link> for more
information about those settings.
<example>
<title>Configuring FastCGI timeout settings</title>
<programlisting>
<![CDATA[
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^
-ActivityTimeout:90
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^
-RequestTimeout:90
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis6.phpinilocation">
<title>Changing the Location of <filename>php.ini</filename> file</title>
<para>
PHP searches for <filename>php.ini</filename> file in
<link linkend="configuration.file">several locations</link> and it is
possible to change the default locations of <filename>php.ini</filename>
file by using <varname>PHPRC</varname> environment variable. To instruct PHP
to load the configuration file from a custom location run the command shown below.
The absolute path to the directory with <filename>php.ini</filename> file should be
specified as a value of <varname>PHPRC</varname> environment variable.
<example>
<title>Changing the location of <filename>php.ini</filename> file</title>
<programlisting>
<![CDATA[
cscript %windir%\system32\inetsrv\fcgiconfig.js -set -section:"PHP" ^
-EnvironmentVars:PHPRC:"C:\Some\Directory\"
]]>
</programlisting>
</example>
</para>
</sect3>
</sect2>
<!-- 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
-->

View file

@ -1,387 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.iis7" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Microsoft IIS 7.0 and later</title>
<para>
This section contains instructions for manually setting up Internet Information
Services (IIS) 7.0 and later to work with PHP on Microsoft Windows Vista SP1,
Windows 7, Windows Server 2008 and Windows Server 2008 R2. For instructions
on setting up IIS 5.1 and IIS 6.0 on Windows XP and Windows Server 2003 refer to
<link linkend="install.windows.legacy.iis6">Microsoft IIS 5.1 and IIS 6.0</link>.
</para>
<sect3 xml:id="install.windows.legacy.iis7.fastcgi.enable">
<title>Enabling FastCGI support in IIS</title>
<para>
FastCGI module is disabled in default installation of IIS. The steps to enable it differ
based on the version of Windows being used.
</para>
<para>
To enable FastCGI support on Windows Vista SP1 and Windows 7:
<procedure>
<step>
<simpara>
In the Windows Start Menu choose &quot;Run:&quot;, type &quot;optionalfeatures.exe&quot;
and click &quot;Ok&quot;;
</simpara>
</step>
<step>
<simpara>
In the &quot;Windows Features&quot; dialog expand &quot;Internet Information
Services&quot;, &quot;World Wide Web Services&quot;, &quot;Application Development
Features&quot; and then enable the &quot;CGI&quot; checkbox;
</simpara>
</step>
<step>
<simpara>
Click OK and wait until the installation is complete.
</simpara>
</step>
</procedure>
<mediaobject>
<alt>Enabling FastCGI support for IIS7 on Windows Vista SP1 and Windows 7</alt>
<imageobject>
<imagedata fileref="en/install/windows/figures/iis7vistacgi.png" />
</imageobject>
</mediaobject>
</para>
<para>
To enable FastCGI support on Windows Server 2008 and Windows Server 2008 R2:
<procedure>
<step>
<simpara>
In the Windows Start Menu choose &quot;Run:&quot;, type &quot;CompMgmtLauncher&quot;
and click &quot;Ok&quot;;
</simpara>
</step>
<step>
<simpara>
If the &quot;Web Server (IIS)&quot; role is not present under the &quot;Roles&quot;
node, then add it by clicking &quot;Add Roles&quot;;
</simpara>
</step>
<step>
<simpara>
If the &quot;Web Server (IIS)&quot; role is present, then click &quot;Add Role Services&quot;
and then enable the &quot;CGI&quot; checkbox under &quot;Application Development&quot; group;
</simpara>
</step>
<step>
<simpara>
Click &quot;Next&quot; and then &quot;Install&quot; and wait for the installation to complete.
</simpara>
</step>
</procedure>
<mediaobject>
<alt>Enabling FastCGI support on Windows Server 2008 and Windows Server 2008 R2</alt>
<imageobject>
<imagedata fileref="en/install/windows/figures/iis7w2k8cgi.png" />
</imageobject>
</mediaobject>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis7.fastcgi.conf">
<title>Configuring IIS to process PHP requests</title>
<para>
Download and install PHP in accordance to the instructions described in
<link linkend="install.windows.legacy.manual">manual installation steps</link>
<note>
<para>
Non-thread-safe build of PHP is recommended when using IIS. The non-thread-safe
builds are available at <link xlink:href="&url.php.win.downloads;">PHP for Windows:
Binaries and Sources Releases.</link>
</para>
</note>
</para>
<para>
Configure the CGI- and FastCGI-specific settings in <filename>php.ini</filename> file as shown below:
<example>
<title>CGI and FastCGI settings in <filename>php.ini</filename></title>
<programlisting role="ini">
<![CDATA[
fastcgi.impersonate = 1
fastcgi.logging = 0
cgi.fix_pathinfo=1
cgi.force_redirect = 0
]]>
</programlisting>
</example>
</para>
<para>
Configure IIS handler mapping for PHP by using either IIS Manager user interface or a command line tool.
</para>
<sect4 xml:id="install.windows.legacy.iis7.fastcgi.conf.ui">
<title>Using IIS Manager user interface to create a handler mapping for PHP</title>
<para>
Follow these steps to create an IIS handler mapping for PHP in IIS Manager user interface:
<procedure>
<step>
<simpara>In the Windows Start Menu choose &quot;Run:&quot;, type &quot;inetmgr&quot; and click &quot;Ok&quot;;</simpara>
</step>
<step>
<simpara>In the IIS Manager user interface select the server node in the &quot;Connections&quot; tree view;</simpara>
</step>
<step>
<para>
In the &quot;Features View&quot; page open the &quot;Handler Mappings&quot; feature;
<mediaobject>
<alt>Create IIS handler mapping for PHP : Locate Handler Mappings</alt>
<imageobject>
<imagedata fileref="en/install/windows/figures/iis7handlericon.png" />
</imageobject>
</mediaobject>
</para>
</step>
<step>
<simpara>In the &quot;Actions&quot; pane click &quot;Add Module Mapping...&quot;;</simpara>
</step>
<step>
<para>
In the &quot;Add Module Mapping&quot; dialog enter the following:
<itemizedlist spacing="compact">
<listitem>
<simpara>Request path: *.php</simpara>
</listitem>
<listitem>
<simpara>Module: FastCgiModule</simpara>
</listitem>
<listitem>
<simpara>Executable: C:\[Path to PHP installation]\php-cgi.exe</simpara>
</listitem>
<listitem>
<simpara>Name: PHP_via_FastCGI</simpara>
</listitem>
</itemizedlist>
</para>
</step>
<step>
<simpara>
Click &quot;Request Restrictions&quot; button and then configure the mapping to invoke handler
only if request is mapped to a file or a folder;
</simpara>
</step>
<step>
<simpara>Click OK on all the dialogs to save the configuration.</simpara>
</step>
</procedure>
<mediaobject>
<alt>Create IIS handler mapping for PHP : Add Handler Mapping</alt>
<imageobject>
<imagedata fileref="en/install/windows/figures/iis7handlermap.png" />
</imageobject>
</mediaobject>
</para>
</sect4>
<sect4 xml:id="install.windows.legacy.iis7.fastcgi.conf.cmd">
<title>Using command line tool to create a handler mapping for PHP</title>
<para>
Use the command shown below to create an IIS FastCGI process pool which will use <filename>php-cgi.exe</filename>
executable for processing PHP requests. Replace the value of the <varname>fullPath</varname> parameter with the
absolute file path to the <filename>php-cgi.exe</filename> file.
<example>
<title>Creating IIS FastCGI process pool</title>
<programlisting>
<![CDATA[
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI ^
/+[fullPath='c:\PHP\php-cgi.exe']
]]>
</programlisting>
</example>
</para>
<para>
Configure IIS to handle PHP specific requests by running the command shown below. Replace the value of the
<varname>scriptProcessor</varname> parameter with the absolute file path to the <filename>php-cgi.exe</filename> file.
<example>
<title>Creating handler mapping for PHP requests</title>
<programlisting>
<![CDATA[
%windir%\system32\inetsrv\appcmd set config /section:system.webServer/handlers ^
/+[name='PHP_via_FastCGI', path='*.php',verb='*',modules='FastCgiModule',^
scriptProcessor='c:\PHP\php-cgi.exe',resourceType='Either']
]]>
</programlisting>
</example>
</para>
<para>
This command creates an IIS handler mapping for *.php file extension, which will result in all URLs that
end with .php being handled by FastCGI module.
<note>
<para>
At this point the required installation and configuration steps are completed. The remaining
instructions below are optional but highly recommended for achieving optimal functionality
and performance of PHP on IIS.
</para>
</note>
</para>
</sect4>
</sect3>
<sect3 xml:id="install.windows.legacy.iis7.impersonation">
<title>Impersonation and file system access</title>
<para>
It is recommended to enable FastCGI impersonation in PHP when using IIS. This
is controlled by the <varname>fastcgi.impersonate</varname> directive in <filename>php.ini</filename>
file. When impersonation is enabled, PHP will perform all the file system operations on behalf of
the user account that has been determined by IIS authentication. This ensures that even if the
same PHP process is shared across different IIS web sites, the PHP scripts in those web sites
will not be able to access each other&#39;s files as long as different user accounts are used
for IIS authentication on each web site.
</para>
<para>
For example IIS 7, in its default configuration, has anonymous authentication enabled with
built-in user account IUSR used as a default identity. This means that in order for IIS to
execute PHP scripts, it is necessary to grant IUSR account read permission on those scripts.
If PHP applications need to perform write operations on certain files or write files into some
folders then IUSR account should have write permission to those.
</para>
<para>
To determine what user account is used as an anonymous identity in IIS 7 use the following command.
Replace the &quot;Default Web Site&quot; with the name of IIS web site that you use. In the output
XML configuration element look for the <varname>userName</varname> attribute.
<example>
<title>Determining the account used as IIS anonymous identity</title>
<programlisting>
<![CDATA[
%windir%\system32\inetsrv\appcmd.exe list config "Default Web Site" ^
/section:anonymousAuthentication
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" userName="IUSR" />
</authentication>
</security>
</system.webServer>
]]>
</programlisting>
</example>
<note>
<para>
If <varname>userName</varname> attribute is not present in the <varname>anonymousAuthentication</varname> element,
or is set to an empty string, then it means that the application pool identity is used as an
anonymous identity for that web site.
</para>
</note>
</para>
<para>
To modify the permissions settings on files and folders, use the Windows Explorer
user interface or <varname>icacls</varname> command.
<example>
<title>Configuring file access permissions</title>
<programlisting>
<![CDATA[
icacls C:\inetpub\wwwroot\upload /grant IUSR:(OI)(CI)(M)
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis7.defaultdoc">
<title>Set <filename>index.php</filename> as a default document in IIS</title>
<para>
The IIS default documents are used for HTTP requests that do not specify a
document name. With PHP applications, <filename>index.php</filename> usually
acts as a default document. To add <filename>index.php</filename> to the list
of IIS default documents, use this command:
<example>
<title>Set <filename>index.php</filename> as a default document in IIS</title>
<programlisting>
<![CDATA[
%windir%\system32\inetsrv\appcmd.exe set config ^
-section:system.webServer/defaultDocument /+"files.[value='index.php']" ^
/commit:apphost
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis7.recycling">
<title>FastCGI and PHP Recycling configuration</title>
<para>
Configure IIS FastCGI settings for recycling of PHP processes by using the commands shown below.
The FastCGI setting <varname>instanceMaxRequests</varname> controls how many requests will be
processed by a single <filename>php-cgi.exe</filename> process before IIS shuts it down.
The PHP environment variable <varname>PHP_FCGI_MAX_REQUESTS</varname> controls how many
requests a single <filename>php-cgi.exe</filename> process will handle before it recycles
itself. Make sure that the value specified for FastCGI <varname>InstanceMaxRequests</varname>
setting is less than or equal to the value specified for <varname>PHP_FCGI_MAX_REQUESTS</varname>.
<example>
<title>Configuring FastCGI and PHP recycling</title>
<programlisting>
<![CDATA[
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi ^
/[fullPath='c:\php\php-cgi.exe'].instanceMaxRequests:10000
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi ^
/+"[fullPath='C:\{php_folder}\php-cgi.exe'].environmentVariables.^
[name='PHP_FCGI_MAX_REQUESTS',value='10000']"
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis7.timeouts">
<title>FastCGI timeout settings</title>
<para>
Increase the timeout settings for FastCGI if it is expected to have long running PHP scripts.
The two settings that control timeouts are <varname>activityTimeout</varname> and
<varname>requestTimeout</varname>. Use the commands below to change the timeout settings.
Make sure to replace the value in the <varname>fullPath</varname> parameter to
contain the absolute path to the <filename>php-cgi.exe</filename> file.
<example>
<title>Configuring FastCGI timeout settings</title>
<programlisting>
<![CDATA[
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi ^
/[fullPath='C:\php\php-cgi.exe',arguments=''].activityTimeout:"90" /commit:apphost
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi ^
/[fullPath='C:\php\php-cgi.exe',arguments=''].requestTimeout:"90" /commit:apphost
]]>
</programlisting>
</example>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.iis7.phpinilocation">
<title>Changing the Location of <filename>php.ini</filename> file</title>
<para>
PHP searches for <filename>php.ini</filename> file in
<link linkend="configuration.file">several locations</link> and it is
possible to change the default locations of <filename>php.ini</filename>
file by using <varname>PHPRC</varname> environment variable. To instruct PHP
to load the configuration file from a custom location run the command shown below.
The absolute path to the directory with <filename>php.ini</filename> file should be
specified as a value of <varname>PHPRC</varname> environment variable.
<example>
<title>Changing the location of <filename>php.ini</filename> file</title>
<programlisting>
<![CDATA[
appcmd.exe set config -section:system.webServer/fastCgi ^
/+"[fullPath='C:\php\php.exe',arguments=''].environmentVariables.^
[name='PHPRC',value='C:\Some\Directory\']" /commit:apphost
]]>
</programlisting>
</example>
</para>
</sect3>
</sect2>
<!-- 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
-->

View file

@ -1,68 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.windows.legacy.index" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Installation on old Windows systems</title>
<para>
This section applies to Windows 98/Me and Windows NT/2000/XP/2003. PHP
will not work on 16 bit platforms such as Windows 3.1 and sometimes
we refer to the supported Windows platforms as Win32.
</para>
<note>
<para>
Windows XP/2003 are no longer supported as of PHP 5.5.0.
</para>
</note>
<note>
<para>
Windows 98/Me/NT4/2000 are no longer supported as of PHP 5.3.0.
</para>
</note>
<note>
<para>
Windows 95 is no longer supported as of PHP 4.3.0.
</para>
</note>
<para>
If you have a development environment such as Microsoft Visual Studio, you can also
<!--<link linkend="install.windows.legacy.building">build</link>-->
build PHP from the original source code.
</para>
<para>
Once you have PHP installed on your Windows system, you may also
want to <link linkend="install.windows.legacy.extensions">load various extensions</link>
for added functionality.
</para>
&install.windows.legacy.manual;
&install.windows.legacy.iis;
&install.windows.legacy.iis6;
&install.windows.legacy.iis7;
&install.windows.legacy.apache1;
&install.windows.legacy.apache2;
&install.windows.legacy.sambar;
&install.windows.legacy.xitami;
&install.windows.legacy.building;
&install.windows.legacy.extensions;
&install.windows.legacy.commandline;
</sect1>
<!-- 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
-->

View file

@ -1,264 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.manual" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Manual Installation Steps</title>
<para>
This section contains instructions for manually installing and configuring
PHP on Microsoft Windows.
</para>
<sect3 xml:id="install.windows.legacy.manual.download">
<title>Selecting and downloading the PHP distribution package</title>
<para>
Download the PHP zip binary distribution from
<link xlink:href="&url.php.win.downloads;">PHP for Windows: Binaries and Sources</link>.
There are several different versions of the zip package - to choose the right version for you,
follow the detailed guide on the <link xlink:href="&url.php.win.downloads;">download page</link>.
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.manual.package">
<title>The PHP package structure and content</title>
<para>
Unpack the content of the zip archive into a directory of your choice, for
example C:\PHP\. The directory and file structure extracted from the zip will
look as below:
<example>
<title>PHP 5 package structure</title>
<programlisting>
<![CDATA[
c:\php
|
+--dev
| |
| |-php5ts.lib -- php5.lib in non thread safe version
|
+--ext -- extension DLLs for PHP
| |
| |-php_bz2.dll
| |
| |-php_cpdf.dll
| |
| |-...
|
+--extras -- empty
|
+--pear -- initial copy of PEAR
|
|
|-go-pear.bat -- PEAR setup script
|
|-...
|
|-php-cgi.exe -- CGI executable
|
|-php-win.exe -- executes scripts without an opened command prompt
|
|-php.exe -- Command line PHP executable (CLI)
|
|-...
|
|-php.ini-development -- default php.ini settings
|
|-php.ini-production -- recommended php.ini settings
|
|-php5apache2_2.dll -- does not exist in non thread safe version
|
|-php5apache2_2_filter.dll -- does not exist in non thread safe version
|
|-...
|
|-php5ts.dll -- core PHP DLL ( php5.dll in non thread safe version)
|
|-...
]]>
</programlisting>
</example>
</para>
<para>
Below is the list of the modules and executables included in the PHP zip
distribution:
<itemizedlist spacing="compact">
<listitem>
<para>
<filename>go-pear.bat</filename> - the PEAR setup script. Refer to <link xlink:href="&url.pear.installation;">Installation (PEAR)</link>
for more details.
</para>
</listitem>
<listitem>
<para>
<filename>php-cgi.exe</filename> - CGI executable that can be used when running PHP on IIS via CGI or FastCGI.
</para>
</listitem>
<listitem>
<para>
<filename>php-win.exe</filename> - the PHP executable for executing PHP scripts without using a command line window
(for example PHP applications that use Windows GUI).
</para>
</listitem>
<listitem>
<para>
<filename>php.exe</filename> - the PHP executable for executing PHP scripts within a command line interface (CLI).
</para>
</listitem>
<listitem>
<para>
<filename>php5apache2_2.dll</filename> - Apache 2.2.X module.
</para>
</listitem>
<listitem>
<para>
<filename>php5apache2_2_filter.dll</filename> - Apache 2.2.X filter.
</para>
</listitem>
</itemizedlist>
</para>
</sect3>
<sect3 xml:id="install.windows.legacy.manual.phpini">
<title>Changing the <filename>php.ini</filename> file</title>
<para>
After the php package content has been extracted, copy the <filename>php.ini-production</filename> into <filename>php.ini</filename>
in the same folder. If necessary, it is also possible to place the <filename>php.ini</filename> into any other location of your choice
but that will require additional configuration steps as described in <link linkend="configuration.file">PHP Configuration</link>.
</para>
<para>
The <filename>php.ini</filename> file tells PHP how to configure itself, and how to work with the
environment that it runs in. Here are a number of settings for the <filename>php.ini</filename> file
that help PHP work better with Windows. Some of these are optional. There are
many other directives that may be relevant to your environment - refer to the
<link linkend="ini.list">list of php.ini directives</link> for more information.
</para>
<para>
Required directives:
<itemizedlist spacing="compact">
<listitem>
<para>
<varname>extension_dir</varname> = <literal>&lt;path to extension directory&gt;</literal> - The <varname>extension_dir</varname> needs
to point to the directory where PHP extensions files are stored. The path can be absolute
(i.e. &quot;C:\PHP\ext&quot;) or relative (i.e. &quot;.\ext&quot;). Extensions that are listed lower in the <filename>php.ini</filename> file need
to be located in the <varname>extension_dir</varname>.
</para>
</listitem>
<listitem>
<para>
<varname>extension</varname> = <literal>xxxxx.dll</literal> - For each extension you wish to enable, you need a corresponding &quot;extension=&quot;
directive that tells PHP which extensions in the <varname>extension_dir</varname> to load at startup time.
</para>
</listitem>
<listitem>
<para>
<varname>log_errors</varname> = <literal>On</literal> - PHP has an error logging facility that can be used to send errors to a file,
or to a service (i.e. syslog) and works in conjunction with the <varname>error_log</varname> directive below. When running under IIS,
the <varname>log_errors</varname> should be enabled, with a valid <varname>error_log</varname>.
</para>
</listitem>
<listitem>
<para>
<varname>error_log</varname> = <literal>&lt;path to the error log file&gt;</literal> - The error_log needs to specify the absolute,
or relative path to the file where PHP errors should be logged. This file needs to be writable for the web server.
The most common places for this file are in various TEMP directories, for example &quot;C:\inetpub\temp\php-errors.log&quot;.
</para>
</listitem>
<listitem>
<para>
<varname>cgi.force_redirect</varname> = <literal>0</literal> - This directive is required for running under IIS.
It is a directory security facility required by many other web servers. However, enabling it under IIS will
cause the PHP engine to fail on Windows.
</para>
</listitem>
<listitem>
<para>
<varname>cgi.fix_pathinfo</varname> = <literal>1</literal> - This lets PHP access real path info following the CGI Spec.
The IIS FastCGI implementation needs this set.
</para>
</listitem>
<listitem>
<para>
<varname>fastcgi.impersonate</varname> = <literal>1</literal> - FastCGI under IIS supports the ability to impersonate
security tokens of the calling client. This allows IIS to define the security context that the request runs under.
</para>
</listitem>
<listitem>
<para>
<varname>fastcgi.logging</varname> = <literal>0</literal> - FastCGI logging should be disabled on IIS. If it is left enabled,
then any messages of any class are treated by FastCGI as error conditions which will cause IIS to generate an HTTP 500 exception.
</para>
</listitem>
</itemizedlist>
</para>
<para>
Optional directives
<itemizedlist spacing="compact">
<listitem>
<para>
<varname>max_execution_time</varname> = <literal>##</literal> - This directive tells PHP the maximum amount of time that it can spend
executing any given script. The default for this is 30 seconds. Increase the value of this directive if PHP application take long time to execute.
</para>
</listitem>
<listitem>
<para>
<varname>memory_limit</varname> = <literal>###M</literal> - The amount of memory available for the PHP process, in Megabytes.
The default is 128, which is fine for most PHP applications. Some of the more complex ones might need more.
</para>
</listitem>
<listitem>
<para>
<varname>display_errors</varname> = <literal>Off</literal> - This directive tells PHP whether to include any error messages in the
stream that it returns to the Web server. If this is set to &quot;On&quot;, then PHP will send whichever classes of errors
that you define with the <varname>error_reporting</varname> directive back to web server as part of the error stream.
For security reasons it is recommended to set it to &quot;Off&quot; on production servers in order not to reveal any
security sensitive information that is often included in the error messages.
</para>
</listitem>
<listitem>
<para>
<varname>open_basedir</varname> = <literal>&lt;paths to directories, separated by semicolon&gt;</literal>, e.g.
openbasedir=&quot;C:\inetpub\wwwroot;C:\inetpub\temp&quot;. This directive specified the directory paths where PHP
is allowed to perform file system operations. Any file operation outside of the specified paths will result in an error.
This directive is especially useful for locking down the PHP installation in shared hosting environments to prevent
PHP scripts from accessing any files outside of the web site's root directory.
</para>
</listitem>
<listitem>
<para>
<varname>upload_max_filesize</varname> = <literal>###M</literal> and <varname>post_max_size</varname> = <literal>###M</literal> -
The maximum allowed size of an uploaded file and post data respectively. The values of these directives should be
increased if PHP applications need to perform large uploads, such as for example photos or video files.
</para>
</listitem>
</itemizedlist>
</para>
<para>
PHP is now setup on your system. The next step is to choose a web
server, and enable it to run PHP. Choose a web server from the table of
contents.
</para>
<para>
In addition to running PHP via a web server, PHP can run from the command
line just like a <literal>.BAT</literal> script. See
<!--<link linkend="install.windows.legacy.commandline">Command Line PHP on Microsoft
Windows</link> for further details.-->
</para>
</sect3>
</sect2>
<!-- 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
-->

View file

@ -1,87 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.sambar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Sambar Server on Microsoft Windows</title>
<para>
This section contains notes and hints specific to the
<link xlink:href="&url.sambar;">Sambar Server</link> for Windows.
</para>
<note>
<para>
You should read the <link linkend="install.windows.legacy.manual">manual
installation steps</link> first!
</para>
</note>
<simpara>
This list describes how to set up the ISAPI module to
work with the Sambar server on Windows.
</simpara>
<para>
<itemizedlist>
<listitem>
<para>
Find the file called <filename>mappings.ini</filename> (in the config
directory) in the Sambar install directory.
</para>
</listitem>
<listitem>
<para>
Open <filename>mappings.ini</filename> and add the following line
under <literal>[ISAPI]</literal>:
<example>
<title>ISAPI configuration of Sambar</title>
<programlisting>
<![CDATA[
#for PHP 4
*.php = c:\php\php4isapi.dll
#for PHP 5
*.php = c:\php\php5isapi.dll
]]>
</programlisting>
</example>
(This line assumes that PHP was installed in
<filename>c:\php</filename>.)
</para>
</listitem>
<listitem>
<para>
Now restart the Sambar server for the changes to take effect.
</para>
</listitem>
</itemizedlist>
</para>
<note>
<para>
If you intend to use PHP to communicate with resources which are held on
a different computer on your network, then you will need to alter the
account used by the Sambar Server Service. The default account used for
the Sambar Server Service is LocalSystem which will not have access to
remote resources. The account can be amended by using the Services
option from within the Windows Control Panel Administration Tools.
</para>
</note>
</sect2>
<!-- 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
-->

View file

@ -1,89 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect2 xml:id="install.windows.legacy.xitami" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Xitami on Microsoft Windows</title>
<para>
This section contains notes and hints specific to
<link xlink:href="&url.xitami;">Xitami</link> on Windows.
</para>
<note>
<para>
You should read the <link linkend="install.windows.legacy.manual">manual
installation steps</link> first!
</para>
</note>
<simpara>
This list describes how to set up the PHP CGI binary
to work with Xitami on Windows.
</simpara>
<note>
<title>Important for CGI users</title>
<para>
Read the <link linkend="faq.installation.forceredirect">faq
on cgi.force_redirect</link> for important details. This
directive needs to be set to <literal>0</literal>.
If you want to use <literal>$_SERVER['PHP_SELF']</literal> you have to
enable the <link linkend="ini.cgi.fix-pathinfo">cgi.fix_pathinfo</link>
directive.
</para>
</note>
&warn.install.cgi;
<para>
<itemizedlist>
<listitem>
<para>
Make sure the web server is running, and point
your browser to xitamis admin console
(usually <literal>http://127.0.0.1/admin</literal>),
and click on Configuration.
</para>
</listitem>
<listitem>
<para>
Navigate to the Filters, and put the
extension which PHP should parse (i.e. .php)
into the field File extensions (.xxx).
</para>
</listitem>
<listitem>
<para>
In Filter command or script put the path and name
of your PHP CGI executable i.e. <filename>C:\php\php.exe</filename>
for PHP 4, or <filename>C:\php\php-cgi.exe</filename> for PHP 5.
</para>
</listitem>
<listitem>
<para>
Press the 'Save' icon.
</para>
</listitem>
<listitem>
<para>
Restart the server to reflect changes.
</para>
</listitem>
</itemizedlist>
</para>
</sect2>
<!-- 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
-->

View file

@ -42,8 +42,6 @@ REM Configure FastCGI Variables
]]>
</programlisting>
</example>
See also the <link linkend="install.windows.legacy.iis7">old IIS installation instructions</link>.
</para>
</sect3>
@ -54,7 +52,6 @@ REM Configure FastCGI Variables
The Apache builds of ApacheLounge are recommended, but other options include XAMPP, WampServer and BitNami, which provide automatic installer tools.
PHP can be used on Apache through mod_php or mod_fastcgi.
mod_php requires a TS build of Apache built with same version of Visual C and same CPU (x86 or x64).
See also the <link linkend="install.windows.legacy.apache2">old Apache installation instructions</link>.
</para>
</sect3>
</sect2>
@ -75,10 +72,10 @@ REM Configure FastCGI Variables
<para>Non-Thread-Safe(NTS) - for IIS and other FastCGI web servers (Apache with mod_fastcgi) and recommended for command-line scripts</para>
</listitem>
<listitem>
<para>x86 - production use of PHP 5.5 and up.</para>
<para>x86 - for 32-bits systems.</para>
</listitem>
<listitem>
<para>x64 - production use of PHP 7 (unless its a 32-bit only version of Windows). PHP 5.5 and 5.6 x64 builds are experimental.</para>
<para>x64 - for 64-bits systems.</para>
</listitem>
</itemizedlist>
</para>
@ -103,4 +100,4 @@ End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
-->

View file

@ -1,87 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.windows.recommended" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Recommended Configuration on Windows systems</title>
<sect2>
<title>Recommended Configuration on Windows systems</title>
<sect2>
<title>OpCache</title>
<para>
Highly Recommended that you enable OpCache. This extension is included with PHP for Windows. It compiles and optimizes PHP scripts and caches them in memory so that they aren't compiled every time the page is loaded.
</para>
<para>
In your php.ini, set
<example>
<title>Recommended OpCache configuration</title>
<screen>
<para>
It is highly recommended to enable OpCache.
This extension is included with PHP for Windows.
It compiles and optimizes PHP scripts and caches them in memory so that
they aren't compiled every time the page is loaded.
</para>
<para>
Set the &php.ini; to:
<example>
<title>Recommended OpCache configuration</title>
<screen>
<![CDATA[
zend_extension=php_opcache.dll
opcache.enable=On
opcache.enable_cli=On
]]>
</screen>
</example>
And restart your web server.
</screen>
</example>
And restart the web server.
For more info, see: <link linkend="opcache.configuration">OpCache Configuration</link>
</para>
</sect2>
<sect2>
For more info, see: <link linkend="opcache.configuration">OpCache Configuration</link>
</para>
</sect2>
<sect2>
<title>WinCache</title>
<para>
It is recommended to use WinCache if using IIS, especially if in a shared
web hosting environment or using networked file storage (NAS).
Note that WinCache is no longer supported as of PHP 8.0.0.
<para>
Recommended that you use WinCache if using IIS, especially if in a shared web hosting environment or using networked file storage (NAS).
All PHP Applications automatically benefit from WinCache's file cache feature. File system operations are cached in memory.
All PHP Applications automatically benefit from WinCache's file cache feature. File system operations are cached in memory.
WinCache also can cache user objects in memory and share them between <varname>php.exe</varname> or <varname>php-cgi.exe</varname> processes (share objects between requests).
WinCache also can cache user objects in memory and share them between <varname>php.exe</varname> or <varname>php-cgi.exe</varname> processes (share objects between requests).
Many major web applications have a plugin or extension or configuration option to make use of the WinCache user object cache.
Many major web applications have a plugin or extension or configuration option to make use of the WinCache user object cache.
If you need high performance, you should use the object cache in your applications.
If you need high performance, you should use the object cache in your applications.
See: <link xlink:href="http://pecl.php.net/package/WinCache">http://pecl.php.net/package/WinCache</link> to download a WinCache DLL (or tgz) to your PHP extensions directory (extensions_dir in your php.ini).
See: <link xlink:href="http://pecl.php.net/package/WinCache">http://pecl.php.net/package/WinCache</link> to download a WinCache DLL (or tgz) to your PHP extensions directory (extensions_dir in your php.ini).
In your php.ini, set
<example>
<title>Recommended WinCache configuration</title>
<screen>
Set the &php.ini; to:
<example>
<title>Recommended WinCache configuration</title>
<screen>
<![CDATA[
extension=php_wincache.dll
wincache.fcenabled=1
wincache.ocenabled=1 ; removed as of wincache 2.0.0.0
]]>
</screen>
</example>
</screen>
</example>
For more info, see:
<link linkend="wincache.configuration">WinCache Configuration</link>
</para>
</sect2>
For more info, see: <link xlink:href="http://php.net/manual/en/wincache.configuration.php">http://php.net/manual/en/wincache.configuration.php</link>
</para>
</sect2>
<sect2>
<title>IIS Configuration</title>
<para>In IIS Manager, Install FastCGI module and add a handler mapping for <varname>`.php`</varname> to the path to <varname>PHP-CGI.exe</varname> (not <varname>PHP.exe</varname>)</para>
<sect2>
<title>IIS Configuration</title>
<para>
You may use the APPCMD command line tool to script IIS configuration.
In IIS Manager, Install FastCGI module and add a handler mapping for
<varname>`.php`</varname> to the path to <varname>PHP-CGI.exe</varname>
(not <varname>PHP.exe</varname>)
</para>
</sect2>
<sect2>
<para>
You may use the APPCMD command line tool to script IIS configuration.
</para>
</sect2>
<sect2>
<title>Database</title>
<para>
You'll probably need a Database Server.
Popular databases provide PHP extensions to use them.
If your web site doesn't get a lot of traffic,
you can run your database server on the same server as your web server.
Many popular database servers run on Windows.
</para>
<para>You'll probably need a Database Server. Popular databases provide PHP extensions to use them. If your web site doesn't get a lot of traffic, you can run your database server on the same server as your web server. Many popular database servers run on Windows.</para>
<para>PHP includes mysqli and pdo_mysql extensions. PHP 5.5 and 5.6 include mysql extension (deprecated in 7.0).</para>
<para>See <link xlink:href="https://dev.mysql.com/downloads/windows/">https://dev.mysql.com/downloads/windows/</link></para>
</sect2>
<para>PHP includes mysqli and pdo_mysql extensions.</para>
<para>
See <link xlink:href="https://dev.mysql.com/downloads/windows/">https://dev.mysql.com/downloads/windows/</link>
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
@ -102,4 +108,4 @@ End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
-->

View file

@ -1,20 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.windows.tools" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>PHP Installer Tools on Windows</title>
<sect2>
<title>PHP Installer Tools on Windows</title>
<sect2>
<title>PHP Install Tools</title>
<para>
If you want to setup PHP and are using IIS, the easiest way is to use <link xlink:href="https://www.microsoft.com/web/downloads/platform.aspx">Microsoft's Web Platform Installer (WebPI)</link>.
</para>
<para>
If you want to setup PHP and are using IIS,
the easiest way is to use <link xlink:href="https://www.microsoft.com/web/downloads/platform.aspx">Microsoft's Web Platform Installer (WebPI)</link>.
</para>
<para><link xlink:href="https://www.apachefriends.org/index.html">XAMPP</link>, WampServer and BitNami will setup PHP applications for use with Apache on Windows.</para>
<para>Setting up and configuring Nginx on Windows requires a bit more configuration. See the <link xlink:href="https://www.nginx.com/resources/wiki/start/topics/examples/phpfastcgionwindows/">Nginx documentation</link> for additional setup help.</para>
</sect2>
<para>
<link xlink:href="https://www.apachefriends.org/index.html">XAMPP</link>,
WampServer and BitNami will setup PHP applications for use with Apache on Windows.
</para>
<para>
Setting up and configuring Nginx on Windows requires a bit more configuration.
See the <link xlink:href="https://www.nginx.com/resources/wiki/start/topics/examples/phpfastcgionwindows/">Nginx documentation</link>
for additional setup help.
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
@ -35,4 +39,4 @@ End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
-->

View file

@ -1,25 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="install.windows.troubleshooting" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Troubleshooting PHP on Windows</title>
<sect2>
<title>Troubleshooting PHP on Windows</title>
<sect2>
<title>Check Temp Directory Permissions</title>
<procedure>
<step>
<para>Right-click temp directory in File Explorer to get the permissions.
</para>
</step>
<step>
<para>For IIS, check that user IIS_User has MODIFY permission. You can get the temporary directory from the configuration or php info.
</para>
</step>
<step>
<para>
Right-click temp directory in File Explorer to get the permissions.
</para>
</step>
<step>
<para>
For IIS, check that user IIS_User has MODIFY permission.
You can get the temporary directory from the configuration or php info.
</para>
</step>
</procedure>
</sect2>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
@ -40,4 +38,4 @@ End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
-->

View file

@ -370,12 +370,6 @@ to several possible vulnerabilities. Please read our
<link linkend="security.cgi-bin">CGI security section</link> to learn how to
defend yourself from such attacks.</para></warning>'>
<!ENTITY note.magicquotes.gpc '<note xmlns="http://docbook.org/ns/docbook"><title>directive note: magic_quotes_gpc
</title><para>The <link linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link>
directive defaults to <literal>on</literal>. It essentially runs
<function>addslashes</function> on all GET, POST, and COOKIE data.
<function>stripslashes</function> may be used to remove them.</para></note>'>
<!ENTITY warn.passwordhashing '
<warning xmlns="http://docbook.org/ns/docbook">
<para>
@ -521,6 +515,8 @@ currently not documented; only its argument list is available.
<!ENTITY example.outputs.71 '<para xmlns="http://docbook.org/ns/docbook">Output of the above example in PHP 7.1:</para>'>
<!ENTITY example.outputs.72 '<para xmlns="http://docbook.org/ns/docbook">Output of the above example in PHP 7.2:</para>'>
<!ENTITY example.outputs.73 '<para xmlns="http://docbook.org/ns/docbook">Output of the above example in PHP 7.3:</para>'>
<!ENTITY example.outputs.8 '<para xmlns="http://docbook.org/ns/docbook">Output of the above example in PHP 8:</para>'>
@ -707,7 +703,7 @@ PHP is compiled with freetype support (<option role="configure">--with-freetype-
<!ENTITY note.gd.interpolation '<note xmlns="http://docbook.org/ns/docbook"><para>This function is affected by the interpolation method set by <function>imagesetinterpolation</function>.</para></note>'>
<!ENTITY gd.image.description '<varlistentry xmlns="http://docbook.org/ns/docbook"><term><parameter>
image</parameter></term><listitem><para>An image resource, returned by one of the image creation functions,
image</parameter></term><listitem><para>A <classname>GdImage</classname> object, returned by one of the image creation functions,
such as <function>imagecreatetruecolor</function>.</para></listitem></varlistentry>'>
<!ENTITY gd.font.description '<varlistentry xmlns="http://docbook.org/ns/docbook"><term><parameter>
@ -716,10 +712,6 @@ fonts in latin2 encoding (where higher numbers corresponding to larger fonts) or
own font identifiers registered with <function>imageloadfont</function>.
</para></listitem></varlistentry>'>
<!ENTITY gd.psfont.description '<varlistentry xmlns="http://docbook.org/ns/docbook"><term><parameter>
font_index</parameter></term><listitem><para>A font resource, returned by <function>imagepsloadfont</function>.
</para></listitem></varlistentry>'>
<!ENTITY gd.ttf.fontfile "
<varlistentry xmlns='http://docbook.org/ns/docbook'>
<term><parameter>fontfile</parameter></term>
@ -766,7 +758,7 @@ $font = 'SomeFont';
</varlistentry>
">
<!ENTITY gd.return.identifier 'Returns an image resource identifier on success, &false; on errors.'>
<!ENTITY gd.return.identifier 'Returns an image object on success, &false; on errors.'>
<!ENTITY gd.return.trueonerror '<caution xmlns="http://docbook.org/ns/docbook"><simpara>However, if libgd fails to output the image, this function returns &true;.</simpara></caution>'>
@ -852,6 +844,14 @@ and GD2 image formats are proprietary image formats of libgd. They have to be re
<emphasis>obsolete</emphasis>, and should only be used for development and testing
purposes.</simpara></warning>'>
<!ENTITY gd.changelog.image-param '<row xmlns="http://docbook.org/ns/docbook">
<entry>8.0.0</entry>
<entry>
<parameter>image</parameter> expects a <classname>GdImage</classname>
instance now; previously, a <type>resource</type> was expected.
</entry>
</row>'>
<!-- DBM notes -->
<!ENTITY dbm.dbm-identifier.description '<varlistentry xmlns="http://docbook.org/ns/docbook"><term><parameter>
@ -1013,6 +1013,10 @@ Passing untrusted data to this parameter is <emphasis>insecure</emphasis>, unles
<!-- LDAP notes -->
<!ENTITY ldap.parameter.ldap 'An LDAP resource, returned by <function xmlns="http://docbook.org/ns/docbook">ldap_connect</function>.'>
<!ENTITY ldap.parameter.result 'An LDAP result resource, returned by <function xmlns="http://docbook.org/ns/docbook">ldap_list</function> or <function xmlns="http://docbook.org/ns/docbook">ldap_search</function>.'>
<!ENTITY ldap.warn.control-paged '<warning xmlns="http://docbook.org/ns/docbook">
<simpara>
This function has been <emphasis>DEPRECATED</emphasis> as of PHP 7.4.0, and <emphasis>REMOVED</emphasis> as of PHP 8.0.0.
@ -1141,6 +1145,7 @@ installed via PECL's <link xlink:href='&url.pecl.package.get;timezonedb' xmlns:x
<!ENTITY date.timezone.bc '<simpara xmlns="http://docbook.org/ns/docbook">Please do not use any of the timezones
listed here (besides UTC), they only exist for backward compatible reasons, and may expose erroneous behavior.
Furthermore, these timezones may be removed from the IANA timezone database at any time.
</simpara>'>
<!ENTITY date.timezone.posix-signs '<simpara xmlns="http://docbook.org/ns/docbook">
@ -1348,7 +1353,7 @@ To use the Easy Connect naming method, PHP must be linked with Oracle
<emphasis>[//]host_name[:port][/service_name]</emphasis>. From Oracle
11<emphasis>g</emphasis>, the syntax is:
<emphasis>[//]host_name[:port][/service_name][:server_type][/instance_name]</emphasis>.
Futher options were introduced with Oracle 19c, including timeout and keep-alive
Further options were introduced with Oracle 19c, including timeout and keep-alive
settings. Refer to Oracle documentation. Service names can be found by running
the Oracle utility <literal>lsnrctl status</literal> on the database server
machine.
@ -1587,7 +1592,7 @@ this extension is still available within <acronym xmlns="http://docbook.org/ns/d
<!ENTITY pecl.windows.download 'A <acronym xmlns="http://docbook.org/ns/docbook">DLL</acronym> for this
<acronym xmlns="http://docbook.org/ns/docbook">PECL</acronym> extension is currently unavailable. See also the
<link xmlns="http://docbook.org/ns/docbook" linkend="install.windows.legacy.building">building on Windows</link>
<link xmlns="http://docbook.org/ns/docbook" linkend="install.windows.building">building on Windows</link>
section.'>
<!ENTITY pecl.windows.download.avail 'Windows binaries (<acronym xmlns="http://docbook.org/ns/docbook">DLL</acronym> files)
@ -1655,15 +1660,15 @@ returned by <function>fbsql_query</function> or
<!-- MySQLi Notes -->
<!ENTITY mysqli.result.description '<varlistentry xmlns="http://docbook.org/ns/docbook"><term><parameter>
result</parameter></term><listitem><para>Procedural style only: A result set
identifier returned by <function>mysqli_query</function>, <function>mysqli_store_result</function>
or <function>mysqli_use_result</function>.</para></listitem></varlistentry>'>
result</parameter></term><listitem><para>Procedural style only: A <classname>mysqli_result</classname>
object returned by <function>mysqli_query</function>, <function>mysqli_store_result</function>,
<function>mysqli_use_result</function> or <function>mysqli_stmt_get_result</function>.</para></listitem></varlistentry>'>
<!ENTITY mysqli.link.description '<varlistentry xmlns="http://docbook.org/ns/docbook"><term><parameter>
link</parameter></term><listitem><para>Procedural style only: A link identifier
mysql</parameter></term><listitem><para>Procedural style only: A <classname>mysqli</classname> object
returned by <function>mysqli_connect</function> or <function>mysqli_init</function>
</para></listitem></varlistentry>'>
<!ENTITY mysqli.stmt.description '<varlistentry xmlns="http://docbook.org/ns/docbook"><term><parameter>
stmt</parameter></term><listitem><para>Procedural style only: A statement identifier
statement</parameter></term><listitem><para>Procedural style only: A <classname>mysqli_stmt</classname> object
returned by <function>mysqli_stmt_init</function>.</para></listitem></varlistentry>'>
<!ENTITY mysqli.available.mysqlnd 'Available only with <link xmlns="http://docbook.org/ns/docbook"
linkend="book.mysqlnd">mysqlnd</link>.'>
@ -1672,6 +1677,13 @@ linkend="book.mysqlnd">mysqlnd</link>.'>
hand-shake/authentication, which mysqlnd will use.</para><para>Libmysqlclient uses the default charset set in the
<filename>my.cnf</filename> or by an explicit call to <function>mysqli_options</function> prior to
calling <function>mysqli_real_connect</function>, but after <function>mysqli_init</function>.</para></note>'>
<!ENTITY mysqli.sqlinjection.warning '<warning xmlns="http://docbook.org/ns/docbook">
<title>Security warning: SQL injection</title><para>If the query contains any variable
input then <link linkend="mysqli.quickstart.prepared-statements">parameterized
prepared statements</link> should be used instead. Alternatively, the
data must be properly formatted and all strings must be escaped using
the <function>mysqli_real_escape_string</function>
function.</para></warning>'>
<!-- Notes for SAPI/Apache -->
<!ENTITY apache.req.module '<simpara xmlns="http://docbook.org/ns/docbook">This function is supported when PHP
@ -2441,10 +2453,10 @@ used.</para>'>
<entry><type>array</type></entry>
<entry>
<para>
A document containing the configuration for one or more KMS providers, which are used to encrypt data keys. Currently <literal>aws</literal> or <literal>local</literal> are supported and at least one must be specified.
A document containing the configuration for one or more KMS providers, which are used to encrypt data keys. Currently <literal>"aws"</literal>, <literal>"azure"</literal>, <literal>"gcp"</literal>, and <literal>"local"</literal> are supported and at least one must be specified.
</para>
<para>
The format for <literal>aws</literal> is as follows:
The format for <literal>"aws"</literal> is as follows:
</para>
<programlisting role="javascript">
<![CDATA[
@ -2455,13 +2467,40 @@ aws: {
]]>
</programlisting>
<para>
The format for <literal>local</literal> is as follows:
The format for <literal>"azure"</literal> is as follows:
</para>
<programlisting role="javascript">
<![CDATA[
azure: {
tenantId: <string>,
clientId: <string>,
clientSecret: <string>,
identityPlatformEndpoint: <optional string> // Defaults to "login.microsoftonline.com"
}
]]>
</programlisting>
<para>
The format for <literal>"gcp"</literal> is as follows:
</para>
<programlisting role="javascript">
<![CDATA[
aws: {
email: <string>,
privateKey: <base64 string>|<MongoDB\BSON\Binary>,
endpoint: <optional string> // Defaults to "oauth2.googleapis.com"
}
]]>
</programlisting>
<para>
The format for <literal>"local"</literal> is as follows:
</para>
<programlisting role="javascript">
<![CDATA[
local: {
// The master key used to encrypt/decrypt data keys
key: <96-byte MongoDB\BSON\Binary with subtype 0>
// 96-byte master key used to encrypt/decrypt data keys
key: <base64 string>|<MongoDB\BSON\Binary>
}
]]>
</programlisting>
@ -2856,7 +2895,8 @@ local: {
</listitem>
<listitem>
<simpara>
For <literal>g</literal> and <literal>G</literal>
For <literal>g</literal>, <literal>G</literal>,
<literal>h</literal> and <literal>H</literal>
specifiers: this is the maximum number of significant
digits to be printed.
</simpara>
@ -2926,9 +2966,6 @@ local: {
<entry><literal>e</literal></entry>
<entry>
The argument is treated as scientific notation (e.g. 1.2e+2).
The precision specifier stands for the number of digits after the
decimal point since PHP 5.2.1. In earlier versions, it was taken as
number of significant digits (one less).
</entry>
</row>
<row>
@ -2950,7 +2987,6 @@ local: {
<entry>
The argument is treated as a float and presented
as a floating-point number (non-locale aware).
Available as of PHP 5.0.3.
</entry>
</row>
<row>
@ -3055,11 +3091,11 @@ local: {
</thead>
<tbody>
<row>
<entry><literal>string</literal></entry>
<entry><type>string</type></entry>
<entry><literal>s</literal></entry>
</row>
<row>
<entry><literal>integer</literal></entry>
<entry><type>int</type></entry>
<entry>
<literal>d</literal>,
<literal>u</literal>,
@ -3071,14 +3107,16 @@ local: {
</entry>
</row>
<row>
<entry><literal>double</literal></entry>
<entry><type>float</type></entry>
<entry>
<literal>g</literal>,
<literal>G</literal>,
<literal>e</literal>,
<literal>E</literal>,
<literal>f</literal>,
<literal>F</literal>
<literal>F</literal>,
<literal>g</literal>,
<literal>G</literal>,
<literal>h</literal>,
<literal>H</literal>
</entry>
</row>
</tbody>

View file

@ -68,7 +68,11 @@ class CopyFile implements ActionHandler
#[SetUp]
public function targetDirectoryExists()
{
mkdir($this->targetDirectory);
if (!file_exists($this->targetDirectory)) {
mkdir($this->targetDirectory);
} elseif (!is_dir($this->targetDirectory)) {
throw new RuntimeException("Target directory $this->targetDirectory is not a directory");
}
}
public function execute()
@ -189,7 +193,7 @@ class AnotherThing
<para>
This separation of reflected attribute representation from actual instance increases control of the programmer
to handle errors regarding missing attribute classes, mistyped or missing arguments. Only after
calling <function>newInstance</function>, objects of the attribute class are instantiated and the correct matching of arguments
calling <function>ReflectionAttribute::newInstance</function>, objects of the attribute class are instantiated and the correct matching of arguments
is validated, not earlier.
</para>

View file

@ -6,7 +6,7 @@
<simpara>
A constant is an identifier (name) for a simple value. As the name
suggests, that value cannot change during the execution of the
script (except for <link linkend="language.constants.predefined">
script (except for <link linkend="language.constants.magic">
magic constants</link>, which aren't actually constants).
Constants are case-sensitive. By convention, constant
identifiers are always uppercase.
@ -76,7 +76,7 @@ define("__FOO__", "something");
<simpara>
As of PHP 7.1.0, class constant may declare a visibility of protected
or private, making them only available in the hierarchical scope of the
class in which it is is defined.
class in which it is defined.
</simpara>
</note>

View file

@ -20,7 +20,6 @@
&language.context.ssl;
&language.context.curl;
&language.context.phar;
&language.context.mongodb;
&language.context.parameters;
&language.context.zip;

View file

@ -1,158 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="context.mongodb" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
<refnamediv>
<refname>MongoDB context options</refname>
<refpurpose>MongoDB context option listing</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<para>
Context options for <literal>mongodb://</literal> transports.
</para>
</refsect1>
<refsect1 role="options"><!-- {{{ -->
&reftitle.options;
<para>
<variablelist>
<varlistentry xml:id="context.mongodb.log-cmd-insert">
<term>
<parameter>log_cmd_insert</parameter>
<type>callable</type>
</term>
<listitem>
<para>
A callback function called when inserting a document, see <function>log_cmd_insert</function>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="context.mongodb.log-cmd-delete">
<term>
<parameter>log_cmd_delete</parameter>
<type>callable</type>
</term>
<listitem>
<para>
A callback function called when deleting a document, see <function>log_cmd_delete</function>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="context.mongodb.log-cmd-update">
<term>
<parameter>log_cmd_update</parameter>
<type>callable</type>
</term>
<listitem>
<para>
A callback function called when updating a document, see <function>log_cmd_update</function>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="context.mongodb.log-write-batch">
<term>
<parameter>log_write_batch</parameter>
<type>callable</type>
</term>
<listitem>
<para>
A callback function called when executing a Write Batch, see <function>log_write_batch</function>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="context.mongodb.log-reply">
<term>
<parameter>log_reply</parameter>
<type>callable</type>
</term>
<listitem>
<para>
A callback function called when reading a reply from MongoDB, see <function>log_reply</function>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="context.mongodb.log-getmore">
<term>
<parameter>log_getmore</parameter>
<type>callable</type>
</term>
<listitem>
<para>
A callback function called when retrieving more results from a MongoDB cursor, see <function>log_getmore</function>.
</para>
</listitem>
</varlistentry>
<varlistentry xml:id="context.mongodb.log-killcursor">
<term>
<parameter>log_killcursor</parameter>
<type>callable</type>
</term>
<listitem>
<para>
A callback function called executing a killcursor opcode, see <function>log_killcursor</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1><!-- }}} -->
<refsect1 role="changelog"><!-- {{{ -->
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>pecl/mongo 1.5.0</entry>
<entry>
Added Write API Context options
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1><!-- }}} -->
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="context.socket" /></member>
<member><xref linkend="context.ssl" /></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
-->

View file

@ -30,6 +30,11 @@ foreach (iterable_expression as $key => $value)
The second form will additionally assign the current element's key to
the <literal>$key</literal> variable on each iteration.
</simpara>
<simpara>
Note that <literal>foreach</literal> does not modify the internal array
pointer, which is used by functions such as <function>current</function>
and <function>key</function>.
</simpara>
<simpara>
It is possible to
<link linkend="language.oop5.iterations">customize object iteration</link>.

View file

@ -60,7 +60,7 @@ $return_value = match (subject_expression) {
</listitem>
<listitem>
<simpara>
<literal>Match</literal> arms do not fall-through to later cases the way
<literal>match</literal> arms do not fall-through to later cases the way
<literal>switch</literal> statements do.
</simpara>
</listitem>
@ -87,7 +87,7 @@ $return_value = match (subject_expression) {
<?php
$result = match ($x) {
foo() => ...,
$this->bar() => ..., // bar() isn't called if foo() === $x
$this->bar() => ..., // $this->bar() isn't called if foo() === $x
$this->baz => beep(), // beep() isn't called unless $x === $this->baz
// etc.
};

View file

@ -15,7 +15,7 @@
<programlisting role="php">
<![CDATA[
<?php
class Exception extends Throwable
class Exception implements Throwable
{
protected $message = 'Unknown exception'; // exception message
private $string; // __toString cache
@ -25,7 +25,7 @@ class Exception extends Throwable
private $trace; // backtrace
private $previous; // previous exception if nested exception
public function __construct($message = null, $code = 0, Throwable $previous = null);
public function __construct($message = '', $code = 0, Throwable $previous = null);
final private function __clone(); // Inhibits cloning of exceptions.

View file

@ -593,6 +593,16 @@ class LineIterator implements Iterator {
means that the same generator can't be iterated over multiple times: the
generator will need to be rebuilt by calling the generator function again.
</para>
<simplesect role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><link linkend="language.oop5.iterations">Object Iteration</link></member>
</simplelist>
</para>
</simplesect>
</sect1>
</chapter>

View file

@ -64,6 +64,9 @@ class ChildClass extends BaseClass {
Properties and constants cannot be declared final, only classes and methods
may be declared as final.
</simpara>
<simpara>
As of PHP 8.0.0, private methods may not be declared final except for the constructor.
</simpara>
</note>
</sect1>
<!-- Keep this comment at the end of the file

View file

@ -18,6 +18,14 @@
implementation of additional functionality in similar objects without the
need to reimplement all of the shared functionality.
</para>
<para>
Private methods of a parent class are not accessible to a child class. As a result,
child classes may reimplement a private method themselves without regard for normal
inheritance rules. Prior to PHP 8.0.0, however, <literal>final</literal> and <literal>static</literal>
restrictions were applied to private methods. As of PHP 8.0.0, the only private method
restriction that is enforced is <literal>private final</literal> constructors, as that
is a common way to "disable" the constructor when using static factory methods instead.
</para>
<para>
The <link linkend="language.oop5.visibility">visibility</link>
of methods, properties and constants can be relaxed, e.g. a

View file

@ -5,7 +5,8 @@
<para>
Object interfaces allow you to create code which specifies which methods a
class must implement, without having to define how these methods are
implemented.
implemented. Interfaces share a namespace with classes and traits, so they may
not use the same name.
</para>
<para>
Interfaces are defined in the same way as a class, but with the <literal>interface</literal>
@ -16,14 +17,34 @@
All methods declared in an interface must be public; this is the nature of an
interface.
</para>
<para>
In practice, interfaces serve two complementary purposes:
</para>
<simplelist>
<member>
To allow developers to create objects of different classes that may be used interchangeably
because they implement the same interface or interfaces. A common example is multiple database access services,
multiple payment gateways, or different caching strategies. Different implementations may
be swapped out without requiring any changes to the code that uses them.
</member>
<member>
To allow a function or method to accept and operate on a parameter that conforms to an
interface, while not caring what else the object may do or how it is implemented. These interfaces
are often named like <literal>Iterable</literal>, <literal>Cacheable</literal>, <literal>Renderable</literal>,
or so on to describe the significance of the behavior.
</member>
</simplelist>
<para>
Interfaces may define
<link linkend="language.oop5.magic">magic methods</link> to require implementing classes to
implement those methods.
</para>
<note>
<para>
It is possible to declare
<link linkend="language.oop5.magic">magic methods</link> such as the
<link linkend="language.oop5.decon.constructor">constructor</link>
in an interface, which can be useful in some contexts,
e.g. for use by factories.
Although they are supported, including <link linkend="language.oop5.decon.constructor">constructors</link>
in interfaces is strongly discouraged. Doing so significantly reduces the flexibility of the object implementing the
interface. Additionally, constructors are not enforced by inheritance rules, which can cause inconsistent
and unexpected behavior.
</para>
</note>
@ -41,6 +62,14 @@
same name, only if the method declaration in both interfaces is identical.
</para>
</warning>
<warning>
<para>
A class that implements an interface may use a different name for its parameters than
the interface. However, as of PHP 8.0 the language supports <link linkend="functions.named-arguments">named arguments</link>, which means
callers may rely on the parameter name in the interface. For that reason, it is strongly
recommended that developers use the same parameter names as the interface being implemented.
</para>
</warning>
<note>
<para>
Interfaces can be extended like classes using the <link linkend="language.oop5.inheritance">extends</link>
@ -49,8 +78,8 @@
</note>
<note>
<para>
The class implementing the interface must declare a method which has a
<link linkend="language.oop.lsp">compatible signature</link>.
The class implementing the interface must declare all methods in the interface
with a <link linkend="language.oop.lsp">compatible signature</link>.
</para>
</note>
</sect2>
@ -71,8 +100,8 @@
<![CDATA[
<?php
// Declare the interface 'iTemplate'
interface iTemplate
// Declare the interface 'Template'
interface Template
{
public function setVariable($name, $var);
public function getHtml($template);
@ -80,9 +109,9 @@ interface iTemplate
// Implement the interface
// This will work
class Template implements iTemplate
class WorkingTemplate implements Template
{
private $vars = array();
private $vars = [];
public function setVariable($name, $var)
{
@ -101,10 +130,10 @@ class Template implements iTemplate
// This will not work
// Fatal error: Class BadTemplate contains 1 abstract methods
// and must therefore be declared abstract (iTemplate::getHtml)
class BadTemplate implements iTemplate
// and must therefore be declared abstract (Template::getHtml)
class BadTemplate implements Template
{
private $vars = array();
private $vars = [];
public function setVariable($name, $var)
{
@ -120,18 +149,18 @@ class BadTemplate implements iTemplate
<programlisting role="php">
<![CDATA[
<?php
interface a
interface A
{
public function foo();
}
interface b extends a
interface B extends A
{
public function baz(Baz $baz);
}
// This will work
class c implements b
class C implements B
{
public function foo()
{
@ -143,7 +172,7 @@ class c implements b
}
// This will not work and result in a fatal error
class d implements b
class D implements B
{
public function foo()
{
@ -162,22 +191,22 @@ class d implements b
<programlisting role="php">
<![CDATA[
<?php
interface a
interface A
{
public function foo();
}
interface b
interface B
{
public function bar();
}
interface c extends a, b
interface C extends A, B
{
public function baz();
}
class d implements c
class D implements C
{
public function foo()
{
@ -200,20 +229,83 @@ class d implements c
<programlisting role="php">
<![CDATA[
<?php
interface a
interface A
{
const b = 'Interface constant';
const B = 'Interface constant';
}
// Prints: Interface constant
echo a::b;
echo A::B;
// This will however not work because it's not allowed to
// override constants.
class b implements a
class B implements A
{
const b = 'Class constant';
const B = 'Class constant';
}
?>
]]>
</programlisting>
</example>
<example xml:id="language.oop5.interfaces.examples.ex5">
<title>Interfaces with abstract classes</title>
<programlisting role="php">
<![CDATA[
<?php
interface A
{
public function foo(string $s): string;
public function bar(int $i): int;
}
// An abstract class may implement only a portion of an interface.
// Classes that extend the abstract class must implement the rest.
abstract class B implements A
{
public function foo(string $s): string
{
return $s . PHP_EOL;
}
}
class C extends B
{
public function bar(int $i): int
{
return $i * 2;
}
}
?>
]]>
</programlisting>
</example>
<example xml:id="language.oop5.interfaces.examples.ex6">
<title>Extending and implementing simultaneously</title>
<programlisting role="php">
<![CDATA[
<?php
class One
{
/* ... */
}
interface Usable
{
/* ... */
}
interface Updatable
{
/* ... */
}
// The keyword order here is important. 'extends' must come first.
class Two extends One implements Usable, Updatable
{
/* ... */
}
?>
]]>

View file

@ -69,187 +69,18 @@ private => private var
<link linkend="language.oop5.visibility">visible</link> properties that could be
accessed.
</para>
<para>
To take it a step further, the <interfacename>Iterator</interfacename>
<link linkend="language.oop5.interfaces">interface</link> may be implemented.
This allows the object to dictate how it will be iterated and what values will
be available on each iteration.
</para>
<example>
<title>Object Iteration implementing Iterator</title>
<programlisting role="php">
<![CDATA[
<?php
class MyIterator implements Iterator
{
private $var = array();
public function __construct($array)
{
if (is_array($array)) {
$this->var = $array;
}
}
public function rewind()
{
echo "rewinding\n";
reset($this->var);
}
public function current()
{
$var = current($this->var);
echo "current: $var\n";
return $var;
}
public function key()
{
$var = key($this->var);
echo "key: $var\n";
return $var;
}
public function next()
{
$var = next($this->var);
echo "next: $var\n";
return $var;
}
public function valid()
{
$key = key($this->var);
$var = ($key !== NULL && $key !== FALSE);
echo "valid: $var\n";
return $var;
}
}
$values = array(1,2,3);
$it = new MyIterator($values);
foreach ($it as $a => $b) {
print "$a: $b\n";
}
?>
]]>
</programlisting>
&example.outputs;
<screen role="php">
<![CDATA[
rewinding
valid: 1
current: 1
key: 0
0: 1
next: 2
valid: 1
current: 2
key: 1
1: 2
next: 3
valid: 1
current: 3
key: 2
2: 3
next:
valid:
]]>
</screen>
</example>
<simplesect role="seealso">
&reftitle.seealso;
<para>
The <interfacename>IteratorAggregate</interfacename>
<link linkend="language.oop5.interfaces">interface</link>
can be used as an alternative to implementing all of the
<interfacename>Iterator</interfacename> methods.
<interfacename>IteratorAggregate</interfacename> only requires the
implementation of a single method,
<methodname>IteratorAggregate::getIterator</methodname>, which should return
an instance of a class implementing <interfacename>Iterator</interfacename>.
<simplelist>
<member><link linkend="language.generators">Generators</link></member>
<member><interfacename>Iterator</interfacename></member>
<member><interfacename>IteratorAggregate</interfacename> </member>
<member><link linkend="spl.iterators">SPL Iterators</link></member>
</simplelist>
</para>
<example>
<title>Object Iteration implementing IteratorAggregate</title>
<programlisting role="php">
<![CDATA[
<?php
class MyCollection implements IteratorAggregate
{
private $items = array();
private $count = 0;
// Required definition of interface IteratorAggregate
public function getIterator() {
return new MyIterator($this->items);
}
public function add($value) {
$this->items[$this->count++] = $value;
}
}
$coll = new MyCollection();
$coll->add('value 1');
$coll->add('value 2');
$coll->add('value 3');
foreach ($coll as $key => $val) {
echo "key/value: [$key -> $val]\n\n";
}
?>
]]>
</programlisting>
&example.outputs;
<screen role="php">
<![CDATA[
rewinding
current: value 1
valid: 1
current: value 1
key: 0
key/value: [0 -> value 1]
next: value 2
current: value 2
valid: 1
current: value 2
key: 1
key/value: [1 -> value 2]
next: value 3
current: value 3
valid: 1
current: value 3
key: 2
key/value: [2 -> value 3]
next:
current:
valid:
]]>
</screen>
</example>
<note>
<para>
For more examples of iterators, see the
<link linkend="spl.iterators">SPL Extension</link>.
</para>
</note>
<note>
<para>
<link linkend="language.generators">Generators</link> provide an
alternative way of defining iterators.
</para>
</note>
</simplesect>
</sect1>
<!-- Keep this comment at the end of the file

View file

@ -267,6 +267,12 @@ class Connection
<link linkend="language.types.declarations.strict">strict typing</link>
is disabled.
</para>
<para>
As of PHP 8.0.0, any class that contains a <link linkend="object.tostring">__toString()</link>
method will also implicitly implement the <interfacename>Stringable</interfacename> interface, and will
thus pass type checks for that interface. Explicitly implementing the interface anyway is
recommended.
</para>
<para>
In PHP 7.4, the returned value <emphasis>must</emphasis> be a
<type>string</type>, otherwise an <classname>Error</classname> is thrown.

View file

@ -127,7 +127,7 @@ Hello Universe!
<sect2 xml:id="language.oop5.traits.multiple">
<title>Multiple Traits</title>
<para>
Multiple Traits can be inserted into a class by listing them in the use
Multiple Traits can be inserted into a class by listing them in the <literal>use</literal>
statement, separated by commas.
</para>
<example xml:id="language.oop5.traits.multiple.ex1">
@ -326,7 +326,7 @@ Hello World!
<para>
Traits support the use of abstract methods in order to impose requirements
upon the exhibiting class. Public, protected, and private methods are supported.
Prior to PHP 8.0.0, only protected and private abstract methods were supported.
Prior to PHP 8.0.0, only public and protected abstract methods were supported.
</para>
<caution>
<simpara>
@ -365,7 +365,7 @@ class MyHelloWorld {
<sect2 xml:id="language.oop5.traits.static">
<title>Static Trait Members</title>
<para>
Traits can define both static members and static methods.
Traits can define static variables, static methods and static properties.
</para>
<example xml:id="language.oop5.traits.static.ex1">
<title>Static Variables</title>
@ -411,6 +411,24 @@ class Example {
Example::doSomething();
?>
]]>
</programlisting>
</example>
<example xml:id="language.oop5.traits.static.ex3">
<title>Static Properties</title>
<programlisting role="php">
<![CDATA[
<?php
trait StaticExample {
public static $static = 'foo';
}
class Example {
use StaticExample;
}
echo Example::$static;
?>
]]>
</programlisting>
</example>

View file

@ -18,7 +18,7 @@
<itemizedlist>
<listitem>
<simpara>
A type is removed from a union type
A type is removed from a <link linkend="language.types.declarations.union">union type</link>
</simpara>
</listitem>
<listitem>
@ -31,6 +31,11 @@
<type>float</type> is changed to <type>int</type>
</simpara>
</listitem>
<listitem>
<simpara>
<type>iterable</type> is changed to <type>array</type> or <classname>Traversable</classname>
</simpara>
</listitem>
</itemizedlist>
A type class is considered less specific if the opposite is true.

View file

@ -54,9 +54,14 @@
Operators of equal precedence that are non-associative cannot be used
next to each other, for example <literal>1 &lt; 2 &gt; 1</literal> is
illegal in PHP. The expression <literal>1 &lt;= 1 == 1</literal> on the
other hand is legal, because the <literal>==</literal> operator has lesser
other hand is legal, because the <literal>==</literal> operator has a lower
precedence than the <literal>&lt;=</literal> operator.
</para>
<para>
Associativity is only meaningful for binary (and ternary) operators.
Unary operators are either prefix or postfix so this notion is not applicable.
For example <literal>!!$a</literal> can only be grouped as <literal>!(!$a)</literal>.
</para>
<para>
Use of parentheses, even when not strictly necessary, can often increase
readability of the code by making grouping explicit rather than relying
@ -93,6 +98,8 @@
<row>
<entry>(n/a)</entry>
<entry>
<literal>+</literal>
<literal>-</literal>
<literal>++</literal>
<literal>--</literal>
<literal>~</literal>
@ -105,14 +112,18 @@
<literal>@</literal>
</entry>
<entry>
<link linkend="language.types">types</link> and <link linkend="language.operators.increment">increment/decrement</link>
<link linkend="language.operators.arithmetic">arithmetic</link> (unary <literal>+</literal> and <literal>-</literal>),
<link linkend="language.operators.increment">increment/decrement</link>,
<link linkend="language.operators.bitwise">bitwise</link>,
<link linkend="language.types.typecasting">type casting</link>&listendand;
<link linkend="language.operators.errorcontrol">error control</link>
</entry>
</row>
<row>
<entry>left</entry>
<entry><literal>instanceof</literal></entry>
<entry>
<link linkend="language.types">types</link>
<link linkend="language.operators.type">type</link>
</entry>
</row>
<row>
@ -141,8 +152,10 @@
<literal>.</literal>
</entry>
<entry>
<link linkend="language.operators.arithmetic">arithmetic</link>&listendand;
<link linkend="language.operators.string">string</link></entry>
<link linkend="language.operators.arithmetic">arithmetic</link> (binary <literal>+</literal> and <literal>-</literal>),
<link linkend="language.operators.array">array</link>&listendand;
<link linkend="language.operators.string">string</link> (<literal>.</literal> prior to PHP 8.0.0)
</entry>
</row>
<row>
<entry>left</entry>
@ -154,6 +167,13 @@
<link linkend="language.operators.bitwise">bitwise</link>
</entry>
</row>
<row>
<entry>left</entry>
<entry><literal>.</literal></entry>
<entry>
<link linkend="language.operators.string">string</link> (as of PHP 8.0.0)
</entry>
</row>
<row>
<entry>non-associative</entry>
<entry>
@ -223,10 +243,11 @@
</entry>
</row>
<row>
<entry>(n/a)</entry>
<entry>non-associative</entry>
<entry><literal>? :</literal></entry>
<entry>
<link linkend="language.operators.comparison.ternary">ternary</link>
(left-associative prior to PHP 8.0.0)
</entry>
</row>
<row>
@ -303,7 +324,7 @@
<?php
$a = 3 * 3 % 5; // (3 * 3) % 5 = 4
// ternary operator associativity differs from C/C++
$a = true ? 0 : true ? 1 : 2; // (true ? 0 : true) ? 1 : 2 = 2
$a = true ? 0 : true ? 1 : 2; // (true ? 0 : true) ? 1 : 2 = 2 (prior to PHP 8.0.0)
$a = 1;
$b = 2;
@ -335,14 +356,14 @@ $array[$i] = $i++; // may set either index 1 or 2
</programlisting>
</example>
<example>
<title><literal>+</literal>, <literal>-</literal> and <literal>.</literal> have the same precedence</title>
<title><literal>+</literal>, <literal>-</literal> and <literal>.</literal> have the same precedence (prior to PHP 8.0.0)</title>
<programlisting role="php">
<![CDATA[
<?php
$x = 4;
// this line might result in unexpected output:
echo "x minus one equals " . $x-1 . ", or so I hope\n";
// because it is evaluated like this line:
// because it is evaluated like this line (prior to PHP 8.0.0):
echo (("x minus one equals " . $x) - 1) . ", or so I hope\n";
// the desired precedence can be enforced by using parentheses:
echo "x minus one equals " . ($x-1) . ", or so I hope\n";
@ -379,6 +400,16 @@ x minus one equals 3, or so I hope
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
String concatenation (<literal>.</literal>) now has a lower precedence than
arithmetic addition/subtraction (<literal>+</literal> and <literal>-</literal>) and
bitwise shift left/right (<literal>&lt;&lt;</literal> and <literal>&gt;&gt;</literal>);
previously it had the same precedence as <literal>+</literal> and <literal>-</literal>
and a higher precedence than <literal>&lt;&lt;</literal> and <literal>&gt;&gt;</literal>.
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>
@ -386,6 +417,15 @@ x minus one equals 3, or so I hope
previously it was left-associative.
</entry>
</row>
<row>
<entry>7.4.0</entry>
<entry>
Relying on the precedence of string concatenation (<literal>.</literal>) relative to
arithmetic addition/subtraction (<literal>+</literal> or <literal>-</literal>) or
bitwise shift left/right (<literal>&lt;&lt;</literal> or <literal>&gt;&gt;</literal>),
i.e. using them together in an unparenthesized expression, is deprecated.
</entry>
</row>
<row>
<entry>7.4.0</entry>
<entry>
@ -469,8 +509,8 @@ x minus one equals 3, or so I hope
integer division, see <function>intdiv</function>.
</simpara>
<simpara>
Operands of modulo are converted to integers (by stripping the decimal
part) before processing. For floating-point modulo, see
Operands of modulo are converted to <type>int</type>
before processing. For floating-point modulo, see
<function>fmod</function>.
</simpara>
<para>
@ -1521,22 +1561,42 @@ Expression: 0 = -4 << 62
<programlisting role="php">
<![CDATA[
<?php
var_dump(0 == "a"); // 0 == 0 -> true
var_dump("1" == "01"); // 1 == 1 -> true
var_dump("10" == "1e1"); // 10 == 10 -> true
var_dump(100 == "1e2"); // 100 == 100 -> true
var_dump(0 == "a");
var_dump("1" == "01");
var_dump("10" == "1e1");
var_dump(100 == "1e2");
switch ("a") {
case 0:
echo "0";
break;
case "a": // never reached because "a" is already matched with 0
case "a":
echo "a";
break;
}
?>
]]>
</programlisting>
&example.outputs.7;
<screen>
<![CDATA[
bool(true)
bool(true)
bool(true)
bool(true)
0
]]>
</screen>
&example.outputs.8;
<screen>
<![CDATA[
bool(false)
bool(true)
bool(true)
bool(true)
a
]]>
</screen>
</informalexample>
</para>
</warning>

View file

@ -26,9 +26,9 @@
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>ArrayAccess</classname>
</ooclass>
<oointerface>
<interfacename>ArrayAccess</interfacename>
</oointerface>
</classsynopsisinfo>
<!-- }}} -->

View file

@ -10,7 +10,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>abstract</modifier> <modifier>public</modifier> <type>bool</type><methodname>ArrayAccess::offsetExists</methodname>
<modifier>public</modifier> <type>bool</type><methodname>ArrayAccess::offsetExists</methodname>
<methodparam><type>mixed</type><parameter>offset</parameter></methodparam>
</methodsynopsis>
<para>

View file

@ -10,7 +10,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>abstract</modifier> <modifier>public</modifier> <type>mixed</type><methodname>ArrayAccess::offsetGet</methodname>
<modifier>public</modifier> <type>mixed</type><methodname>ArrayAccess::offsetGet</methodname>
<methodparam><type>mixed</type><parameter>offset</parameter></methodparam>
</methodsynopsis>
<para>
@ -37,7 +37,14 @@
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Can return all value types.
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
@ -67,13 +74,6 @@
</note>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Can return all value types.
</para>
</refsect1>
<!--
<refsect1 role="examples">
&reftitle.examples;

View file

@ -10,7 +10,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>abstract</modifier> <modifier>public</modifier> <type>void</type><methodname>ArrayAccess::offsetSet</methodname>
<modifier>public</modifier> <type>void</type><methodname>ArrayAccess::offsetSet</methodname>
<methodparam><type>mixed</type><parameter>offset</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
</methodsynopsis>
@ -80,7 +80,7 @@ Array
</informalexample>
</para>
</note>
<note>
<para>
This function is not called in assignments by reference and otherwise

View file

@ -10,7 +10,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>abstract</modifier> <modifier>public</modifier> <type>void</type><methodname>ArrayAccess::offsetUnset</methodname>
<modifier>public</modifier> <type>void</type><methodname>ArrayAccess::offsetUnset</methodname>
<methodparam><type>mixed</type><parameter>offset</parameter></methodparam>
</methodsynopsis>
<para>

View file

@ -48,7 +48,10 @@
<!-- }}} -->
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.closure')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.closure')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])">
<xi:fallback />
</xi:include>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.closure')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])" />
</classsynopsis>
<!-- }}} -->

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="closure.bind" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Closure::bind</refname>
@ -12,11 +11,10 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <modifier>static</modifier> <type class="union"><type>Closure</type><type>false</type></type><methodname>Closure::bind</methodname>
<modifier>public</modifier> <modifier>static</modifier> <type class="union"><type>Closure</type><type>null</type></type><methodname>Closure::bind</methodname>
<methodparam><type>Closure</type><parameter>closure</parameter></methodparam>
<methodparam><type>object</type><parameter>newthis</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>newscope</parameter>
<initializer>"static"</initializer></methodparam>
<methodparam><type class="union"><type>object</type><type>null</type></type><parameter>newThis</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>object</type><type>string</type><type>null</type></type><parameter>newScope</parameter><initializer>"static"</initializer></methodparam>
</methodsynopsis>
<para>
This method is a static version of <methodname>Closure::bindTo</methodname>.
@ -37,7 +35,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>newthis</parameter></term>
<term><parameter>newThis</parameter></term>
<listitem>
<para>
The object to which the given anonymous function should be bound, or
@ -46,7 +44,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>newscope</parameter></term>
<term><parameter>newScope</parameter></term>
<listitem>
<para>
The class scope to which the closure is to be associated, or
@ -63,7 +61,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a new <classname>Closure</classname> object &return.falseforfailure;
Returns a new <classname>Closure</classname> object, or &null; on failure.
</para>
</refsect1>
@ -112,7 +110,6 @@ echo $bcl2(), "\n";
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="closure.bindto" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Closure::bindTo</refname>
@ -13,9 +12,8 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type class="union"><type>Closure</type><type>null</type></type><methodname>Closure::bindTo</methodname>
<methodparam><type>object</type><parameter>newthis</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>newscope</parameter>
<initializer>"static"</initializer></methodparam>
<methodparam><type class="union"><type>object</type><type>null</type></type><parameter>newThis</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>object</type><type>string</type><type>null</type></type><parameter>newScope</parameter><initializer>"static"</initializer></methodparam>
</methodsynopsis>
<para>
Create and return a new <link linkend="functions.anonymous">anonymous
@ -29,13 +27,13 @@
which determines which private and protected members the anonymous
function will be able to access. Namely, the members that will be
visible are the same as if the anonymous function were a method of
the class given as value of the <parameter>newscope</parameter>
the class given as value of the <parameter>newScope</parameter>
parameter.
</para>
<para>
Static closures cannot have any bound object (the value of the parameter
<parameter>newthis</parameter> should be &null;), but this function can
<parameter>newThis</parameter> should be &null;), but this function can
nevertheless be used to change their class scope.
</para>
@ -60,7 +58,7 @@
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>newthis</parameter></term>
<term><parameter>newThis</parameter></term>
<listitem>
<para>
The object to which the given anonymous function should be bound, or
@ -69,7 +67,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>newscope</parameter></term>
<term><parameter>newScope</parameter></term>
<listitem>
<para>
The class scope to which the closure is to be associated, or
@ -139,7 +137,6 @@ echo $cl(), "\n";
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="closure.call" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Closure::call</refname>
@ -10,11 +9,11 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>mixed</type><methodname>Closure::call</methodname>
<methodparam><type>object</type><parameter>newthis</parameter></methodparam>
<methodparam rep="repeat"><type>mixed</type><parameter>values</parameter></methodparam>
<methodparam><type>object</type><parameter>newThis</parameter></methodparam>
<methodparam rep="repeat"><type>mixed</type><parameter>args</parameter></methodparam>
</methodsynopsis>
<para>
Temporarily binds the closure to <parameter>newthis</parameter>, and calls
Temporarily binds the closure to <parameter>newThis</parameter>, and calls
it with any given parameters.
</para>
</refsect1><!-- }}} -->
@ -22,7 +21,7 @@
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>newthis</parameter></term>
<term><parameter>newThis</parameter></term>
<listitem>
<para>
The <type>object</type> to bind the closure to for the duration of the
@ -31,7 +30,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>values</parameter></term>
<term><parameter>args</parameter></term>
<listitem>
<para>
Zero or more parameters, which will be given as parameters to the
@ -85,7 +84,6 @@ int(8)
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="closure.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Closure::__construct</refname>
@ -9,10 +8,10 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<constructorsynopsis>
<modifier>private</modifier> <methodname>Closure::__construct</methodname>
<void />
</methodsynopsis>
<void/>
</constructorsynopsis>
<para>
This method exists only to disallow instantiation of the
<classname>Closure</classname> class. Objects of this class are created
@ -37,7 +36,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="closure.fromcallable" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Closure::fromCallable</refname>
@ -11,12 +10,12 @@
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <modifier>static</modifier> <type>Closure</type><methodname>Closure::fromCallable</methodname>
<methodparam><type>callable</type><parameter>callable</parameter></methodparam>
<methodparam><type>callable</type><parameter>callback</parameter></methodparam>
</methodsynopsis>
<para>
Create and return a new <link linkend="functions.anonymous">anonymous
function</link> from given <parameter>callable</parameter> using the
current scope. This method checks if the <parameter>callable</parameter> is
function</link> from given <parameter>callback</parameter> using the
current scope. This method checks if the <parameter>callback</parameter> is
callable in the current scope and throws a <classname>TypeError</classname>
if it is not.
</para>
@ -26,7 +25,7 @@
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>callable</parameter></term>
<term><parameter>callback</parameter></term>
<listitem>
<para>
The callable to convert.
@ -40,12 +39,11 @@
&reftitle.returnvalues;
<para>
Returns the newly created <classname>Closure</classname> or throws a
<classname>TypeError</classname> if the <parameter>callable</parameter> is
<classname>TypeError</classname> if the <parameter>callback</parameter> is
not callable in the current scope.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@ -66,4 +64,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="error.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Error::__construct</refname>
@ -13,7 +12,7 @@
<modifier>public</modifier> <methodname>Error::__construct</methodname>
<methodparam choice="opt"><type>string</type><parameter>message</parameter><initializer>""</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>code</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>Throwable</type><parameter>previous</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>Throwable</type><type>null</type></type><parameter>previous</parameter><initializer>&null;</initializer></methodparam>
</constructorsynopsis>
<para>
Constructs the Error.
@ -63,7 +62,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@ -84,4 +82,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="error.getcode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Error::getCode</refname>
@ -10,8 +9,8 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <type>mixed</type><methodname>Error::getCode</methodname>
<void />
<modifier>final</modifier> <modifier>public</modifier> <type>int</type><methodname>Error::getCode</methodname>
<void/>
</methodsynopsis>
<para>
Returns the error code.
@ -65,7 +64,6 @@ The Error code is: 30
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@ -86,4 +84,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="errorexception.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ErrorException::__construct</refname>
@ -13,10 +12,10 @@
<modifier>public</modifier> <methodname>ErrorException::__construct</methodname>
<methodparam choice="opt"><type>string</type><parameter>message</parameter><initializer>""</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>code</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>severity</parameter><initializer>E_ERROR</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>filename</parameter><initializer>__FILE__</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>lineno</parameter><initializer>__LINE__</initializer></methodparam>
<methodparam choice="opt"><type>Exception</type><parameter>previous</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>severity</parameter><initializer><constant>E_ERROR</constant></initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>filename</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>line</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>Throwable</type><type>null</type></type><parameter>previous</parameter><initializer>&null;</initializer></methodparam>
</constructorsynopsis>
<para>
Constructs the Exception.
@ -66,7 +65,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>lineno</parameter></term>
<term><parameter>line</parameter></term>
<listitem>
<para>
The line number where the exception is thrown.
@ -85,8 +84,31 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
<parameter>filename</parameter> and <parameter>line</parameter> are nullable now.
Previously, their defaults were <constant>__FILE__</constant> and
<constant>__LINE__</constant>, respectively.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@ -107,4 +129,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="exception.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Exception::__construct</refname>
@ -13,7 +12,7 @@
<modifier>public</modifier> <methodname>Exception::__construct</methodname>
<methodparam choice="opt"><type>string</type><parameter>message</parameter><initializer>""</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>code</parameter><initializer>0</initializer></methodparam>
<methodparam choice="opt"><type>Throwable</type><parameter>previous</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>Throwable</type><type>null</type></type><parameter>previous</parameter><initializer>&null;</initializer></methodparam>
</constructorsynopsis>
<para>
Constructs the Exception.
@ -69,7 +68,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@ -90,4 +88,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="exception.getcode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Exception::getCode</refname>
@ -10,8 +9,8 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <type>mixed</type><methodname>Exception::getCode</methodname>
<void />
<modifier>final</modifier> <modifier>public</modifier> <type>int</type><methodname>Exception::getCode</methodname>
<void/>
</methodsynopsis>
<para>
Returns the Exception code.
@ -68,7 +67,6 @@ The exception code is: 30
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@ -89,4 +87,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -10,7 +10,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier><type class="union"><type>Throwable</type><type>null</type></type><methodname>Exception::getPrevious</methodname>
<modifier>final</modifier> <modifier>public</modifier> <type class="union"><type>Throwable</type><type>null</type></type> <methodname>Exception::getPrevious</methodname>
<void />
</methodsynopsis>
<para>

View file

@ -52,6 +52,11 @@
</section>
<section xml:id="generator.seealso">
&reftitle.seealso;
<para>See also <link linkend="language.oop5.iterations">object iteration</link>.</para>
</section>
</partintro>
&language.predefined.generator.current;

View file

@ -20,6 +20,8 @@
&language.predefined.closure;
&language.predefined.generator;
&language.predefined.weakreference;
&language.predefined.weakmap;
&language.predefined.stringable;
</part>

View file

@ -27,9 +27,9 @@
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>Iterator</classname>
</ooclass>
<oointerface>
<interfacename>Iterator</interfacename>
</oointerface>
<ooclass>
<modifier>extends</modifier>
@ -142,6 +142,10 @@ string(17) "myIterator::valid"
</example><!-- }}} -->
</section>
<section xml:id="iterator.seealso">
&reftitle.seealso;
<para>See also <link linkend="language.oop5.iterations">object iteration</link>.</para>
</section>
</partintro>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="iterator.key" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Iterator::key</refname>
@ -10,8 +9,8 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>abstract</modifier> <modifier>public</modifier> <type>scalar</type><methodname>Iterator::key</methodname>
<void />
<modifier>abstract</modifier> <modifier>public</modifier> <type>mixed</type><methodname>Iterator::key</methodname>
<void/>
</methodsynopsis>
<para>
Returns the key of the current element.
@ -38,7 +37,6 @@
</refsect1><!-- }}} -->
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@ -59,4 +57,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View file

@ -37,9 +37,9 @@
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>Serializable</classname>
</ooclass>
<oointerface>
<interfacename>Serializable</interfacename>
</oointerface>
</classsynopsisinfo>
<!-- }}} -->

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="serializable.unserialize" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Serializable::unserialize</refname>
@ -11,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>abstract</modifier> <modifier>public</modifier> <type>void</type><methodname>Serializable::unserialize</methodname>
<methodparam><type>string</type><parameter>serialized</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<para>
Called during unserialization of the object.
@ -31,7 +30,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>serialized</parameter></term>
<term><parameter>data</parameter></term>
<listitem>
<para>
The string representation of the object.
@ -61,7 +60,6 @@
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<phpdoc:classref xml:id="class.stringable" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>The Stringable interface</title>
<titleabbrev>Stringable</titleabbrev>
<partintro>
<!-- {{{ Stringable intro -->
<section xml:id="stringable.intro">
&reftitle.intro;
<para>
The <interfacename>Stringable</interfacename> interface denotes a class as
having a <function>__toString</function> method. Unlike most interfaces,
<interfacename>Stringable</interfacename> is implicitly present on any class that
has the magic <function>__toString</function> method defined, although it
can and should be declared explicitly.
</para>
<para>
Its primary value is to allow functions to type check against the union
type <literal>string|Stringable</literal> to accept either a string primitive
or an object that can be cast to a string.
</para>
</section>
<!-- }}} -->
<section xml:id="stringable.synopsis">
&reftitle.interfacesynopsis;
<!-- {{{ Synopsis -->
<classsynopsis>
<ooclass><classname>Stringable</classname></ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<oointerface>
<interfacename>Stringable</interfacename>
</oointerface>
</classsynopsisinfo>
<!-- }}} -->
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<!-- Bring back if we add the toString method as its own page later. For now,
just link to the existing description in magic.xml.
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.stringable')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])">
<xi:fallback />
</xi:include>
-->
</classsynopsis>
<!-- }}} -->
</section>
<section xml:id="stringable.examples">
<title>Stringable Examples</title>
<para>
<example xml:id="stringable.basic-example">
<title>Basic Stringable Usage</title>
<programlisting role="php">
<![CDATA[
<?php
class IPv4Address implements Stringable {
private string $oct1;
private string $oct2;
private string $oct3;
private string $oct4;
public function __construct(string $oct1, string $oct2, string $oct3, string $oct4) {
$this->oct1 = $oct1;
$this->oct2 = $oct2;
$this->oct3 = $oct3;
$this->oct4 = $oct4;
}
public function __toString(): string {
return "$this->oct1.$this->oct2.$this->oct3.$this->oct4";
}
}
function showStuff(string|Stringable $value) {
// A Stringable will get converted to a string here by calling
// __toString.
print $value;
}
$ip = new IPv4Address('123', '234', '42', '9');
showStuff($ip);
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
123.234.42.9
]]>
</screen>
</example>
</para>
</section>
</partintro>
</phpdoc:classref>
<!-- 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
-->

View file

@ -35,9 +35,9 @@
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
<ooclass>
<classname>Throwable</classname>
</ooclass>
<oointerface>
<interfacename>Throwable</interfacename>
</oointerface>
</classsynopsisinfo>
<!-- }}} -->

Some files were not shown because too many files have changed in this diff Show more