<!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>Other Enhancements</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="migration52.errorrep.html">Error Reporting</a></div> <div class="next" style="text-align: right; float: right;"><a href="migration51.html">Migrating from PHP 5.0.x to PHP 5.1.x</a></div> <div class="up"><a href="migration52.html">Migrating from PHP 5.1.x to PHP 5.2.x</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="migration52.other" class="section"> <h2 class="title">Other Enhancements</h2> <ul class="itemizedlist"> <li class="listitem"> <span class="simpara"> Improved memory manager and increased default memory limit. </span> <span class="simpara"> The new memory manager allocates less memory and works faster than the previous incarnation. It allocates memory from the system in large blocks, and then manages the heap by itself. The <em>memory_limit</em> value in <var class="filename">php.ini</var> is checked, not for each <em>emalloc()</em> call (as before), but for actual blocks requested from the system. This means that <em>memory_limit</em> is far more accurate than it used to be, since the old memory manager didn't calculate all the memory overhead used by the <em>malloc</em> library. </span> <span class="simpara"> Thanks to this new-found accuracy memory usage may appear to have increased, although actually it has not. To accommodate this apparent increase, the default <em>memory_limit</em> setting was also increased - from 8 to 16 megabytes. </span> </li> <li class="listitem"> <span class="simpara"> Added support for constructors in interfaces to force constructor signature checks in implementations. </span> <span class="simpara"> Starting with PHP 5.2.0, interfaces can have constructors. However, if you choose to declare a constructor in an interface, each class implementing that interface MUST include a constructor with a signature matching that of the base interface constructor. By 'signature' we mean the parameter and return type definitions, including any type hints and including whether the data is passed by reference or by value. </span> </li> </ul> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="migration52.errorrep.html">Error Reporting</a></div> <div class="next" style="text-align: right; float: right;"><a href="migration51.html">Migrating from PHP 5.0.x to PHP 5.1.x</a></div> <div class="up"><a href="migration52.html">Migrating from PHP 5.1.x to PHP 5.2.x</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>