2015-08-07 13:52:37 +00:00
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id= "migration70.deprecated" >
<title > Deprecated features in PHP 7.0.x</title>
<!-- password_hash() salt option, PHP4 - style constructors etc -->
<!-- skeleton
<sect2 xml:id= "migration70.deprecated.id" >
<title > Title</title>
<para >
Content
</para>
</sect2>
-->
<sect2 xml:id= "migration70.deprecated.php4-constructors" >
2015-09-21 12:17:30 +00:00
<title > PHP 4 style constructors</title>
2015-08-07 13:52:37 +00:00
<para >
2015-09-21 12:17:30 +00:00
PHP 4 style constructors (methods that have the same name as the class they
2015-09-21 12:17:38 +00:00
are defined in) are deprecated, and will be removed in the future. PHP 7
2015-09-21 12:17:30 +00:00
will emit <constant > E_DEPRECATED</constant> if a PHP 4 constructor is the
only constructor defined within a class. Classes that implement a
<function > __construct</function> method are unaffected.
2015-08-07 13:52:37 +00:00
</para>
<informalexample >
<programlisting role= "php" >
< ![CDATA[
< ?php
class foo {
function foo() {
echo 'I am the constructor';
}
}
?>
]]>
</programlisting>
&example.outputs;
<screen >
< ![CDATA[
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; foo has a deprecated constructor in example.php on line 3
]]>
</screen>
</informalexample>
</sect2>
2015-09-21 12:17:30 +00:00
<sect2 xml:id= "migration70.deprecated.static-calls" >
<title > Static calls to non-static methods</title>
<para >
<link linkend= "language.oop5.static" > Static</link> calls to methods that
are not declared <command > static</command> are deprecated, and may be
removed in the future.
</para>
<informalexample >
<programlisting role= "php" >
< ![CDATA[
< ?php
class foo {
function bar() {
echo 'I am not static!';
}
}
foo::bar();
?>
]]>
</programlisting>
&example.outputs;
<screen >
< ![CDATA[
Deprecated: Non-static method foo::bar() should not be called statically in - on line 8
I am not static!
]]>
</screen>
</informalexample>
</sect2>
2015-08-07 13:52:37 +00:00
<sect2 xml:id= "migration70.deprecated.pwshash-salt-option" >
<title > <function > password_hash</function> salt option</title>
<para >
The salt option for the <function > password_hash</function> function has been
deprecated to prevent developers from generating their own (usually insecure)
salts. The function itself generates a cryptographically secure salt when no
salt is provided by the developer - therefore custom salt generation should not
be needed.
</para>
</sect2>
2015-09-21 12:17:34 +00:00
<sect2 xml:id= "migration70.deprecated.capture-session-meta" >
<title > <literal > capture_session_meta</literal> SSL context option</title>
<para >
The <literal > capture_session_meta</literal> SSL context option has been
deprecated. SSL metadata is now available through the
<function > stream_get_meta_data</function> function.
</para>
</sect2>
2016-06-16 10:55:45 +00:00
<sect2 xml:id= "migration70.deprecated.ldap" >
<title > <link linkend= "book.ldap" > LDAP</link> deprecations</title>
<simpara >
The following function has been deprecated:
</simpara>
<itemizedlist >
<listitem >
<simpara >
<function > ldap_sort</function>
</simpara>
</listitem>
</itemizedlist>
</sect2>
2015-08-07 13:52:37 +00:00
</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
-->