<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>OOP Changelog</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="language.oop5.serialization.html">Object Serialization</a></div> <div class="next" style="text-align: right; float: right;"><a href="language.namespaces.html">Namespaces</a></div> <div class="up"><a href="language.oop5.html">Classes and Objects</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="language.oop5.changelog" class="sect1"> <h2 class="title">OOP Changelog</h2> <p class="para"> Changes to the PHP 5 OOP model are logged here. Descriptions and other notes regarding these features are documented within the OOP 5 documentation. </p> <p class="para"> <table class="doctable informaltable"> <thead> <tr> <th>Version</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>5.4.0</td> <td> Added: <a href="language.oop5.traits.html" class="link">traits</a>. </td> </tr> <tr> <td>5.4.0</td> <td> Changed: If an <a href="language.oop5.abstract.html" class="link">abstract</a> class defines a signature for the constructor it will now be enforced. </td> </tr> <tr> <td>5.3.3</td> <td> Changed: Methods with the same name as the last element of a <a href="language.namespaces.html" class="link">namespaced</a> class name will no longer be treated as <a href="language.oop5.decon.html" class="link">constructor</a>. This change doesn't affect non-namespaced classes. </td> </tr> <tr> <td>5.3.0</td> <td> Changed: Classes that implement interfaces with methods that have default values in the prototype are no longer required to match the interface's default value. </td> </tr> <tr> <td>5.3.0</td> <td> Changed: It's now possible to reference the class using a variable (e.g., <em>echo $classname::constant;</em>). The variable's value can not be a keyword (e.g., <em>self</em>, <em>parent</em> or <em>static</em>). </td> </tr> <tr> <td>5.3.0</td> <td> Changed: An <strong><code>E_WARNING</code></strong> level error is issued if the magic <a href="language.oop5.overloading.html" class="link">overloading</a> methods are declared <a href="language.oop5.static.html" class="link">static</a>. It also enforces the public visibility requirement. </td> </tr> <tr> <td>5.3.0</td> <td> Changed: Prior to 5.3.0, exceptions thrown in the <span class="function"><a href="function.autoload.html" class="function">__autoload()</a></span> function could not be caught in the <a href="language.exceptions.html" class="link">catch</a> block, and would result in a fatal error. Exceptions now thrown in the __autoload function can be caught in the <a href="language.exceptions.html" class="link">catch</a> block, with one provison. If throwing a custom exception, then the custom exception class must be available. The __autoload function may be used recursively to autoload the custom exception class. </td> </tr> <tr> <td>5.3.0</td> <td> Added: The <a href="language.oop5.overloading.html" class="link">__callStatic</a> method. </td> </tr> <tr> <td>5.3.0</td> <td> Added: <a href="language.types.string.html#language.types.string.syntax.heredoc" class="link">heredoc</a> and <a href="language.types.string.html#language.types.string.syntax.heredoc" class="link">nowdoc</a> support for class <em class="emphasis">const</em> and property definitions. Note: heredoc values must follow the same rules as double-quoted strings, (e.g., no variables within). </td> </tr> <tr> <td>5.3.0</td> <td> Added: <a href="language.oop5.late-static-bindings.html" class="link">Late Static Bindings</a>. </td> </tr> <tr> <td>5.3.0</td> <td> Added: The <a href="language.oop5.magic.html#object.invoke" class="link">__invoke()</a> method. </td> </tr> <tr> <td>5.2.0</td> <td> Changed: The <a href="language.oop5.magic.html#object.tostring" class="link">__toString()</a> method was only called when it was directly combined with <span class="function"><a href="function.echo.html" class="function">echo</a></span> or <span class="function"><a href="function.print.html" class="function">print</a></span>. But now, it is called in any string context (e.g. in <span class="function"><a href="function.printf.html" class="function">printf()</a></span> with <em>%s</em> modifier) but not in other types contexts (e.g. with <em>%d</em> modifier). Since PHP 5.2.0, converting objects without a <em>__toString</em> method to string emits a <strong><code>E_RECOVERABLE_ERROR</code></strong> level error. </td> </tr> <tr> <td>5.1.3</td> <td> Changed: In previous versions of PHP 5, the use of <em>var</em> was considered deprecated and would issue an <strong><code>E_STRICT</code></strong> level error. It's no longer deprecated, therefore does not emit the error. </td> </tr> <tr> <td>5.1.0</td> <td> Changed: The <a href="language.oop5.magic.html#object.set-state" class="link">__set_state()</a> static method is now called for classes exported by <span class="function"><a href="function.var-export.html" class="function">var_export()</a></span>. </td> </tr> <tr> <td>5.1.0</td> <td> Added: The <a href="language.oop5.overloading.html#object.isset" class="link">__isset()</a> and <a href="language.oop5.overloading.html#object.unset" class="link">__unset()</a> methods. </td> </tr> </tbody> </table> </p> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="language.oop5.serialization.html">Object Serialization</a></div> <div class="next" style="text-align: right; float: right;"><a href="language.namespaces.html">Namespaces</a></div> <div class="up"><a href="language.oop5.html">Classes and Objects</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>