php-doc-en/appendices/migration71/changed-functions.xml
2018-02-11 13:36:30 +00:00

179 lines
4.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="migration71.changed-functions">
<title>Changed functions</title>
<sect2 xml:id="migration71.changed-functions.core">
<title>PHP Core</title>
<!--
Let's assume that functions from extensions bundled by default with PHP are 'core functions',
like in PHP 5.6.x migration guide.
-->
<itemizedlist>
<listitem>
<simpara>
<function>getopt</function> has an optional third parameter that exposes
the index of the next element in the argument vector list to be processed.
This is done via a by-ref parameter.
</simpara>
</listitem>
<listitem>
<simpara>
<function>getenv</function> no longer requires its parameter. If the
parameter is omitted, then the current environment variables will be
returned as an associative array.
</simpara>
</listitem>
<listitem>
<simpara>
<function>get_headers</function> now has an additional parameter to enable
for the passing of custom stream contexts.
</simpara>
</listitem>
<listitem>
<simpara>
<function>output_reset_rewrite_vars</function> no longer resets session
URL rewrite variables.
</simpara>
</listitem>
<listitem>
<simpara>
<function>parse_url</function> is now more restrictive and supports
RFC3986.
</simpara>
</listitem>
<listitem>
<simpara>
<function>unpack</function> now accepts an optional third parameter to
specify the offset to begin unpacking from.
</simpara>
</listitem>
</itemizedlist>
</sect2>
<sect2 xml:id="migration71.changed-functions.filesystem">
<title>File System</title>
<itemizedlist>
<listitem>
<simpara>
<function>file_get_contents</function> now accepts a negative seek offset
if the stream is seekable.
</simpara>
</listitem>
<listitem>
<simpara>
<function>tempnam</function> now emits a notice when falling back to the
system's temp directory.
</simpara>
</listitem>
</itemizedlist>
</sect2>
<sect2 xml:id="migration71.changed-functions.json">
<title>JSON</title>
<itemizedlist>
<listitem>
<simpara>
<function>json_encode</function> now accepts a new option,
<constant>JSON_UNESCAPED_LINE_TERMINATORS</constant>, to disable the
escaping of U+2028 and U+2029 characters when
<constant>JSON_UNESCAPED_UNICODE</constant> is supplied.
</simpara>
</listitem>
</itemizedlist>
</sect2>
<sect2 xml:id="migration71.changed-functions.mbstring">
<title>Multibyte String</title>
<itemizedlist>
<listitem>
<simpara>
<function>mb_ereg</function> now rejects illegal byte sequences.
</simpara>
</listitem>
<listitem>
<simpara>
<function>mb_ereg_replace</function> now rejects illegal byte sequences.
</simpara>
</listitem>
</itemizedlist>
</sect2>
<sect2 xml:id="migration71.changed-functions.pdo">
<title>PDO</title>
<itemizedlist>
<listitem>
<simpara>
<methodname>PDO::lastInsertId</methodname> for PostgreSQL will now trigger an error
when <literal>nextval</literal> has not been called for the current
session (the postgres connection).
</simpara>
</listitem>
</itemizedlist>
</sect2>
<sect2 xml:id="migration71.changed-functions.pgsql">
<title>PostgreSQL</title>
<itemizedlist>
<listitem>
<simpara>
<function>pg_last_notice</function> now accepts an optional parameter to
specify an operation. This can be done with one of the following new
constants: <constant>PGSQL_NOTICE_LAST</constant>,
<constant>PGSQL_NOTICE_ALL</constant>, or
<constant>PGSQL_NOTICE_CLEAR</constant>.
</simpara>
</listitem>
<listitem>
<simpara>
<function>pg_fetch_all</function> now accepts an optional second parameter
to specify the result type (similar to the third parameter of
<function>pg_fetch_array</function>).
</simpara>
</listitem>
<listitem>
<simpara>
<function>pg_select</function> now accepts an optional fourth parameter to
specify the result type (similar to the third parameter of
<function>pg_fetch_array</function>).
</simpara>
</listitem>
</itemizedlist>
</sect2>
<sect2 xml:id="migration71.changed-functions.session">
<title>Session</title>
<itemizedlist>
<listitem>
<simpara>
<function>session_start</function> now returns &false; and no longer
initializes <varname>$_SESSION</varname> when it failed to start the
session.
</simpara>
</listitem>
</itemizedlist>
</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
-->