mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 08:28:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337986 c90b9560-bf6c-de11-be94-00142212c4b1
70 lines
2.1 KiB
XML
70 lines
2.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<sect1 xml:id="migration70.other-changes" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<title>Other Changes</title>
|
|
|
|
<sect2 xml:id="migration70.other-changes.loosening-reserved-words">
|
|
<title>Loosening Reserved Word Restrictions</title>
|
|
|
|
<para>
|
|
Globally reserved words as property, constant, and method names within classes,
|
|
interfaces, and traits are now allowed. This reduces the surface of BC breaks
|
|
when new keywords are introduced and avoids naming restrictions on APIs.
|
|
</para>
|
|
|
|
<para>
|
|
This is particularly useful when creating internal DSLs with fluent interfaces:
|
|
</para>
|
|
<informalexample>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// 'new', 'private', and 'for' were previously unusable
|
|
Project::new('Project Name')->private()->for('purpose here')->with('username here');
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</informalexample>
|
|
|
|
<para>
|
|
The only limitation is that the <literal>class</literal> keyword still
|
|
cannot be used as a constant name, otherwise it would conflict with the
|
|
class name resolution syntax (<literal>ClassName::class</literal>).
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 xml:id="migration70.other-changes.remove-date-timezone-warning">
|
|
<title>Removal of date.timezone Warning</title>
|
|
|
|
<para>
|
|
Previously, a warning was emitted if the
|
|
<systemitem role="directive">date.timezone</systemitem> INI setting had not
|
|
been set prior to using any date- or time-based functions. Now, this warning
|
|
has been removed (with
|
|
<systemitem role="directive">date.timezone</systemitem> still defaulting to
|
|
UTC).
|
|
</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
|
|
-->
|