<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/migration80.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'migration80.incompatible.php',
    1 => 'Backward Incompatible Changes',
    2 => 'Backward Incompatible Changes',
  ),
  'up' => 
  array (
    0 => 'migration80.php',
    1 => 'Migrating from PHP 7.4.x to PHP 8.0.x',
  ),
  'prev' => 
  array (
    0 => 'migration80.new-classes.php',
    1 => 'New Classes and Interfaces',
  ),
  'next' => 
  array (
    0 => 'migration80.deprecated.php',
    1 => 'Deprecated Features',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'appendices/migration80/incompatible.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="migration80.incompatible" class="sect1">
 <h2 class="title">Backward Incompatible Changes</h2>

 <div class="sect2" id="migration80.incompatible.core">
  <h3 class="title">PHP Core</h3>

  <div class="sect3" id="migration80.incompatible.core.string-number-comparision">
   <h4 class="title">String to Number Comparison</h4>

   <p class="para">
    Non-strict comparisons between numbers and non-numeric strings now work by casting the number to
    string and comparing the strings. Comparisons between numbers and numeric strings continue to
    work as before. Notably, this means that <code class="code">0 == &quot;not-a-number&quot;</code> is considered false
    now.
    <table class="doctable informaltable">
     
      <thead>
       <tr>
        <th>Comparison</th>
        <th>Before</th>
        <th>After</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td><code class="code">0 == &quot;0&quot;</code></td>
        <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></td>
        <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></td>
       </tr>

       <tr>
        <td><code class="code">0 == &quot;0.0&quot;</code></td>
        <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></td>
        <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></td>
       </tr>

       <tr>
        <td><code class="code">0 == &quot;foo&quot;</code></td>
        <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></td>
        <td><strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></td>
       </tr>

       <tr>
        <td><code class="code">0 == &quot;&quot;</code></td>
        <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></td>
        <td><strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></td>
       </tr>

       <tr>
        <td><code class="code">42 == &quot;   42&quot;</code></td>
        <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></td>
        <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></td>
       </tr>

       <tr>
        <td><code class="code">42 == &quot;42foo&quot;</code></td>
        <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></td>
        <td><strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></td>
       </tr>

      </tbody>
     
    </table>

    
   </p>
  </div>

  <div class="sect3" id="migration80.incompatible.core.other">
   <h4 class="title">Other incompatible Changes</h4>

   <ul class="itemizedlist">
    <li class="listitem">
     <p class="para">
      <code class="literal">match</code> is now a reserved keyword.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <code class="literal">mixed</code> is now a reserved word, so it cannot be used to name a class, interface or trait, and is also prohibited from being used in namespaces.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Assertion failures now throw by default. If the old behavior is desired,
      <code class="code">assert.exception=0</code> can be set in the INI settings.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Methods with the same name as the class are no longer interpreted as constructors. The
      <a href="language.oop5.decon.php#object.construct" class="link">__construct()</a> method should be used instead.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The ability to call non-static methods statically has been removed. Thus
      <span class="function"><a href="function.is-callable.php" class="function">is_callable()</a></span> will fail when checking for a non-static method with a classname
      (must check with an object instance).
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The <code class="code">(real)</code> and <code class="code">(unset)</code> casts have been removed.
     </p>
    </li>
    <li class="listitem">
      <p class="para">
       The <a href="errorfunc.configuration.php#ini.track-errors" class="link">track_errors</a> ini directive has been removed. This
       means that <var class="varname">php_errormsg</var> is no longer available. The
       <span class="function"><a href="function.error-get-last.php" class="function">error_get_last()</a></span> function may be used instead.
      </p>
    </li>
    <li class="listitem">
     <p class="para">
      The ability to define case-insensitive constants has been removed. The third argument to
      <span class="function"><a href="function.define.php" class="function">define()</a></span> may no longer be <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The ability to specify an autoloader using an <span class="function"><a href="function.autoload.php" class="function">__autoload()</a></span> function has been
      removed. <span class="function"><a href="function.spl-autoload-register.php" class="function">spl_autoload_register()</a></span> should be used instead.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The <code class="parameter">errcontext</code> argument will no longer be passed to custom error handlers
      set with <span class="function"><a href="function.set-error-handler.php" class="function">set_error_handler()</a></span>.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <span class="function"><a href="function.create-function.php" class="function">create_function()</a></span> has been removed. Anonymous functions may be used instead.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <span class="function"><a href="function.each.php" class="function">each()</a></span> has been removed. <a href="control-structures.foreach.php" class="link"><code class="literal">foreach</code></a> or <span class="classname"><a href="class.arrayiterator.php" class="classname">ArrayIterator</a></span>
      should be used instead.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The ability to unbind <var class="varname">this</var> from closures that were created from a method,
      using <span class="methodname"><a href="closure.fromcallable.php" class="methodname">Closure::fromCallable()</a></span> or
      <span class="methodname"><a href="reflectionmethod.getclosure.php" class="methodname">ReflectionMethod::getClosure()</a></span>, has been removed.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The ability to unbind <var class="varname">this</var> from proper closures that contain uses of
      <var class="varname">this</var> has also been removed.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The ability to use <span class="function"><a href="function.array-key-exists.php" class="function">array_key_exists()</a></span> with objects has been removed.
      <span class="function"><a href="function.isset.php" class="function">isset()</a></span> or <span class="function"><a href="function.property-exists.php" class="function">property_exists()</a></span> may be used instead.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The behavior of <span class="function"><a href="function.array-key-exists.php" class="function">array_key_exists()</a></span> regarding the type of the
      <code class="parameter">key</code> parameter has been made consistent with <span class="function"><a href="function.isset.php" class="function">isset()</a></span> and
      normal array access. All key types now use the usual coercions and array/object keys throw a
      <span class="classname"><a href="class.typeerror.php" class="classname">TypeError</a></span>.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Any array that has a number <span class="replaceable">n</span> as its first numeric key will use
      <span class="replaceable">n+1</span> for its next implicit key, even if <span class="replaceable">n</span> is
      negative.
      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The default error_reporting level is now <strong><code><a href="errorfunc.constants.php#constant.e-all">E_ALL</a></code></strong>. Previously it excluded
      <strong><code><a href="errorfunc.constants.php#constant.e-notice">E_NOTICE</a></code></strong> and <strong><code><a href="errorfunc.constants.php#constant.e-deprecated">E_DEPRECATED</a></code></strong>.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <a href="errorfunc.configuration.php#ini.display-startup-errors" class="link">display_startup_errors</a> is now enabled by
      default.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Using <span class="type">parent</span> inside a class that has no parent will now result in a fatal
      compile-time error.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The <code class="literal">@</code> operator will no longer silence fatal errors
      (<strong><code><a href="errorfunc.constants.php#constant.e-error">E_ERROR</a></code></strong>, <strong><code><a href="errorfunc.constants.php#constant.e-core-error">E_CORE_ERROR</a></code></strong>,
      <strong><code><a href="errorfunc.constants.php#constant.e-compile-error">E_COMPILE_ERROR</a></code></strong>, <strong><code><a href="errorfunc.constants.php#constant.e-user-error">E_USER_ERROR</a></code></strong>,
      <strong><code><a href="errorfunc.constants.php#constant.e-recoverable-error">E_RECOVERABLE_ERROR</a></code></strong>, <strong><code><a href="errorfunc.constants.php#constant.e-parse">E_PARSE</a></code></strong>). Error handlers that
      expect error_reporting to be <code class="literal">0</code> when <code class="literal">@</code> is used, should be
      adjusted to use a mask check instead:
     </p>
     <p class="para">
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Replace<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">my_error_handler</span><span style="color: #007700">(</span><span style="color: #0000BB">$err_no</span><span style="color: #007700">, </span><span style="color: #0000BB">$err_msg</span><span style="color: #007700">, </span><span style="color: #0000BB">$filename</span><span style="color: #007700">, </span><span style="color: #0000BB">$linenum</span><span style="color: #007700">) {<br />    if (</span><span style="color: #0000BB">error_reporting</span><span style="color: #007700">() == </span><span style="color: #0000BB">0</span><span style="color: #007700">) {<br />        return </span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />    }<br />    </span><span style="color: #FF8000">// ...<br /></span><span style="color: #007700">}<br /><br /></span><span style="color: #FF8000">// With<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">my_error_handler</span><span style="color: #007700">(</span><span style="color: #0000BB">$err_no</span><span style="color: #007700">, </span><span style="color: #0000BB">$err_msg</span><span style="color: #007700">, </span><span style="color: #0000BB">$filename</span><span style="color: #007700">, </span><span style="color: #0000BB">$linenum</span><span style="color: #007700">) {<br />    if (!(</span><span style="color: #0000BB">error_reporting</span><span style="color: #007700">() &amp; </span><span style="color: #0000BB">$err_no</span><span style="color: #007700">)) {<br />        return </span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />    }<br />    </span><span style="color: #FF8000">// ...<br /></span><span style="color: #007700">}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
      </div>

     </p>
     <p class="para">
      Additionally, care should be taken that error messages are not displayed in production
      environments, which can result in information leaks. Please ensure that
      <code class="code">display_errors=Off</code> is used in conjunction with error logging.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <code class="literal">#[</code> is no longer interpreted as the start of a comment,
      as this syntax is now used for attributes.
      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Inheritance errors due to incompatible method signatures (LSP violations) will now always
      generate a fatal error. Previously a warning was generated in some cases.
      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The precedence of the concatenation operator has changed relative to bitshifts and addition as
      well as subtraction.
     </p>
     <p class="para">
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"Sum: " </span><span style="color: #007700">. </span><span style="color: #0000BB">$a </span><span style="color: #007700">+ </span><span style="color: #0000BB">$b</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">// was previously interpreted as:<br /></span><span style="color: #007700">echo (</span><span style="color: #DD0000">"Sum: " </span><span style="color: #007700">. </span><span style="color: #0000BB">$a</span><span style="color: #007700">) + </span><span style="color: #0000BB">$b</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">// is now interpreted as:<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"Sum:" </span><span style="color: #007700">. (</span><span style="color: #0000BB">$a </span><span style="color: #007700">+ </span><span style="color: #0000BB">$b</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
      </div>

      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Arguments with a default value that resolves to <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> at runtime will no longer implicitly mark
      the argument type as nullable. Either an explicit nullable type, or an explicit <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> default
      value has to be used instead.
     </p>
     <p class="para">
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Replace<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">test</span><span style="color: #007700">(</span><span style="color: #0000BB">int $arg </span><span style="color: #007700">= </span><span style="color: #0000BB">CONST_RESOLVING_TO_NULL</span><span style="color: #007700">) {}<br /></span><span style="color: #FF8000">// With<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">test</span><span style="color: #007700">(?</span><span style="color: #0000BB">int $arg </span><span style="color: #007700">= </span><span style="color: #0000BB">CONST_RESOLVING_TO_NULL</span><span style="color: #007700">) {}<br /></span><span style="color: #FF8000">// Or<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">test</span><span style="color: #007700">(</span><span style="color: #0000BB">int $arg </span><span style="color: #007700">= </span><span style="color: #0000BB">null</span><span style="color: #007700">) {}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
      </div>

     </p>
    </li>
    <li class="listitem">
     <p class="para">
      A number of warnings have been converted into <span class="classname"><a href="class.error.php" class="classname">Error</a></span> exceptions:
     </p>
     <p class="para">
      <ul class="simplelist">
       <li>
        Attempting to write to a property of a non-object. Previously this
        implicitly created an stdClass object for null, false and empty strings.
       </li>
       <li>
        Attempting to append an element to an array for which the PHP_INT_MAX key
        is already used.
       </li>
       <li>
        Attempting to use an invalid type (array or object) as an array key or
        string offset.
       </li>
       <li>Attempting to write to an array index of a scalar value.</li>
       <li>Attempting to unpack a non-array/Traversable.</li>
       <li>
        Attempting to access unqualified constants which are undefined.
        Previously, unqualified constant accesses resulted in a warning and were interpreted as strings.
       </li>
       <li>
        Passing the wrong number of arguments to a non-variadic built-in
        function will throw an <span class="classname"><a href="class.argumentcounterror.php" class="classname">ArgumentCountError</a></span>.
       </li>
       <li>
        Passing invalid countable types to <span class="function"><a href="function.count.php" class="function">count()</a></span> will throw
        a <span class="classname"><a href="class.typeerror.php" class="classname">TypeError</a></span>.
       </li>
      </ul>
     </p>
     <p class="para">
      A number of notices have been converted into warnings:
     </p>
     <p class="para">
      <ul class="simplelist">
       <li>Attempting to read an undefined variable.</li>
       <li>Attempting to read an undefined property.</li>
       <li>Attempting to read an undefined array key.</li>
       <li>Attempting to read a property of a non-object.</li>
       <li>Attempting to access an array index of a non-array.</li>
       <li>Attempting to convert an array to string.</li>
       <li>Attempting to use a resource as an array key.</li>
       <li>Attempting to use null, a boolean, or a float as a string offset.</li>
       <li>Attempting to read an out-of-bounds string offset.</li>
       <li>Attempting to assign an empty string to a string offset.</li>
      </ul>
      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Attempting to assign multiple bytes to a string offset will now emit a warning.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Unexpected characters in source files (such as NUL bytes outside of strings) will now result in a
      <span class="classname"><a href="class.parseerror.php" class="classname">ParseError</a></span> exception instead of a compile warning.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Uncaught exceptions now go through &quot;clean shutdown&quot;, which means that destructors will be called
      after an uncaught exception.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The compile time fatal error &quot;Only variables can be passed by reference&quot; has been delayed until
      runtime, and converted into an &quot;Argument cannot be passed by reference&quot;
      <span class="classname"><a href="class.error.php" class="classname">Error</a></span> exception.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Some &quot;Only variables should be passed by reference&quot; notices have been converted to &quot;Argument
      cannot be passed by reference&quot; exception.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The generated name for anonymous classes has changed. It will now include the name of the first
      parent or interface:
     </p>
     <p class="para">
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">new class extends </span><span style="color: #0000BB">ParentClass </span><span style="color: #007700">{};<br /></span><span style="color: #FF8000">// -&gt; ParentClass@anonymous<br /></span><span style="color: #007700">new class implements </span><span style="color: #0000BB">FirstInterface</span><span style="color: #007700">, </span><span style="color: #0000BB">SecondInterface </span><span style="color: #007700">{};<br /></span><span style="color: #FF8000">// -&gt; FirstInterface@anonymous<br /></span><span style="color: #007700">new class {};<br /></span><span style="color: #FF8000">// -&gt; class@anonymous<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
      </div>

     </p>
     <p class="para">
      The name shown above is still followed by a NUL byte and a unique suffix.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Non-absolute trait method references in trait alias adaptations are now required to be
      unambiguous:
     </p>
     <p class="para">
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">class </span><span style="color: #0000BB">X </span><span style="color: #007700">{<br />    use </span><span style="color: #0000BB">T1</span><span style="color: #007700">, </span><span style="color: #0000BB">T2 </span><span style="color: #007700">{<br />        </span><span style="color: #0000BB">func </span><span style="color: #007700">as </span><span style="color: #0000BB">otherFunc</span><span style="color: #007700">;<br />    }<br />    function </span><span style="color: #0000BB">func</span><span style="color: #007700">() {}<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
      </div>

     </p>
     <p class="para">
      If both <code class="code">T1::func()</code> and <code class="code">T2::func()</code> exist, this code was previously
      silently accepted, and func was assumed to refer to <code class="code">T1::func</code>. Now it will generate a
      fatal error instead, and either <code class="code">T1::func</code> or <code class="code">T2::func</code> needs to be
      written explicitly.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The signature of abstract methods defined in traits is now checked against the implementing class
      method:
     </p>
     <p class="para">
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">trait </span><span style="color: #0000BB">MyTrait </span><span style="color: #007700">{<br />    abstract private function </span><span style="color: #0000BB">neededByTrait</span><span style="color: #007700">(): </span><span style="color: #0000BB">string</span><span style="color: #007700">;<br />}<br /><br />class </span><span style="color: #0000BB">MyClass </span><span style="color: #007700">{<br />    use </span><span style="color: #0000BB">MyTrait</span><span style="color: #007700">;<br /><br />    </span><span style="color: #FF8000">// Error, because of return type mismatch.<br />    </span><span style="color: #007700">private function </span><span style="color: #0000BB">neededByTrait</span><span style="color: #007700">(): </span><span style="color: #0000BB">int </span><span style="color: #007700">{ return </span><span style="color: #0000BB">42</span><span style="color: #007700">; }<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
      </div>

      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Disabled functions are now treated exactly like non-existent functions. Calling a disabled
      function will report it as unknown, and redefining a disabled function is now possible.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <code class="literal">data://</code> stream wrappers are no longer writable, which matches the documented
      behavior.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      The arithmetic and bitwise operators <code class="literal">+</code>, <code class="literal">-</code>,
      <code class="literal">*</code>, <code class="literal">/</code>, <code class="literal">**</code>, <code class="literal">%</code>,
      <code class="literal">&lt;&lt;</code>, <code class="literal">&gt;&gt;</code>, <code class="literal">&amp;</code>,
      <code class="literal">|</code>, <code class="literal">^</code>, <code class="literal">~</code>, <code class="literal">++</code>,
      <code class="literal">--</code> will now consistently throw a <span class="classname"><a href="class.typeerror.php" class="classname">TypeError</a></span> when one of
      the operands is an <span class="type"><a href="language.types.array.php" class="type array">array</a></span>, <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> or non-overloaded <span class="type"><a href="language.types.object.php" class="type object">object</a></span>. The only exception to this is
      the array <code class="literal">+</code> array merge operation, which remains supported.
      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Float to string casting will now always behave locale-independently.
     </p>
     <p class="para">
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />setlocale</span><span style="color: #007700">(</span><span style="color: #0000BB">LC_ALL</span><span style="color: #007700">, </span><span style="color: #DD0000">"de_DE"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$f </span><span style="color: #007700">= </span><span style="color: #0000BB">3.14</span><span style="color: #007700">;<br />echo </span><span style="color: #0000BB">$f</span><span style="color: #007700">, </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">// Previously: 3,14<br />// Now:        3.14<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
      </div>

     </p>
     <p class="para">
      See <span class="function"><a href="function.printf.php" class="function">printf()</a></span>, <span class="function"><a href="function.number-format.php" class="function">number_format()</a></span> and
      <span class="methodname"><strong>NumberFormatter()</strong></span> for ways to customize number formatting.
      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Support for deprecated curly braces for offset access has been removed.
     </p>
     <p class="para">
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Instead of:<br /></span><span style="color: #0000BB">$array</span><span style="color: #007700">{</span><span style="color: #0000BB">0</span><span style="color: #007700">};<br /></span><span style="color: #0000BB">$array</span><span style="color: #007700">{</span><span style="color: #DD0000">"key"</span><span style="color: #007700">};<br /></span><span style="color: #FF8000">// Write:<br /></span><span style="color: #0000BB">$array</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">$array</span><span style="color: #007700">[</span><span style="color: #DD0000">"key"</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
      </div>

      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Applying the final modifier on a private method will now produce a warning unless that method is
      the constructor.
      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      If an object constructor <span class="function"><a href="function.exit.php" class="function">exit()</a></span>s, the object destructor will no longer be
      called. This matches the behavior when the constructor throws.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Namespaced names can no longer contain whitespace: While <code class="code">Foo\Bar</code> will be recognized
      as a namespaced name, <code class="code">Foo \ Bar</code> will not. Conversely, reserved keywords are now
      permitted as namespace segments, which may also change the interpretation of code:
      <code class="code">new\x</code> is now the same as <code class="code">constant(&#039;new\x&#039;)</code>, not
      <code class="code">new \x()</code>.
      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Nested ternaries now require explicit parentheses.
      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <span class="function"><a href="function.debug-backtrace.php" class="function">debug_backtrace()</a></span> and <span class="methodname"><a href="exception.gettrace.php" class="methodname">Exception::getTrace()</a></span> will no
      longer provide references to arguments. It will not be possible to change function arguments
      through the backtrace.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Numeric string handling has been altered to be more intuitive and less error-prone. Trailing
      whitespace is now allowed in numeric strings for consistency with how leading whitespace is
      treated. This mostly affects:
     </p>
     <p class="para">
      <ul class="simplelist">
       <li>The <span class="function"><a href="function.is-numeric.php" class="function">is_numeric()</a></span> function</li>
       <li>String-to-string comparisons</li>
       <li>Type declarations</li>
       <li>Increment and decrement operations</li>
      </ul>
     </p>
     <p class="para">
      The concept of a &quot;leading-numeric string&quot; has been mostly dropped; the cases where this remains
      exist in order to ease migration. Strings which emitted an <strong><code><a href="errorfunc.constants.php#constant.e-notice">E_NOTICE</a></code></strong> &quot;A non
      well-formed numeric value encountered&quot; will now emit an <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> &quot;A
      non-numeric value encountered&quot; and all strings which emitted an <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> &quot;A
      non-numeric value encountered&quot; will now throw a
      <span class="classname"><a href="class.typeerror.php" class="classname">TypeError</a></span>. This mostly affects:
     </p>
     <p class="para">
      <ul class="simplelist">
       <li>Arithmetic operations</li>
       <li>Bitwise operations</li>
      </ul>
     </p>
     <p class="para">
      This <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> to <span class="classname"><a href="class.typeerror.php" class="classname">TypeError</a></span> change also affects the
      <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> &quot;Illegal string offset &#039;string&#039;&quot; for illegal string offsets. The
      behavior of explicit casts to int/float from strings has not been changed.
      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Magic Methods will now have their arguments and return types checked if they have them declared.
      The signatures should match the following list:
     </p>
     <p class="para">
      <ul class="simplelist">
       <li><code class="code">__call(string $name, array $arguments): mixed</code></li>
       <li><code class="code">__callStatic(string $name, array $arguments): mixed</code></li>
       <li><code class="code">__clone(): void</code></li>
       <li><code class="code">__debugInfo(): ?array</code></li>
       <li><code class="code">__get(string $name): mixed</code></li>
       <li><code class="code">__invoke(mixed $arguments): mixed</code></li>
       <li><code class="code">__isset(string $name): bool</code></li>
       <li><code class="code">__serialize(): array</code></li>
       <li><code class="code">__set(string $name, mixed $value): void</code></li>
       <li><code class="code">__set_state(array $properties): object</code></li>
       <li><code class="code">__sleep(): array</code></li>
       <li><code class="code">__unserialize(array $data): void</code></li>
       <li><code class="code">__unset(string $name): void</code></li>
       <li><code class="code">__wakeup(): void</code></li>
      </ul>
      
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <span class="function"><a href="function.call-user-func-array.php" class="function">call_user_func_array()</a></span> array keys will now be interpreted as parameter names,
      instead of being silently ignored.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Declaring a function called <code class="literal">assert()</code> inside a namespace is
      no longer allowed, and issues <strong><code><a href="errorfunc.constants.php#constant.e-compile-error">E_COMPILE_ERROR</a></code></strong>.
      The <span class="function"><a href="function.assert.php" class="function">assert()</a></span> function is subject to special handling by the engine,
      which may lead to inconsistent behavior when defining a namespaced function with the same name.
     </p>
    </li>
   </ul>
  </div>
 </div>

 <div class="sect2" id="migration80.incompatible.resource2object">
  <h3 class="title">Resource to Object Migration</h3>

  <p class="para">
   Several <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>s have been migrated to <span class="type"><a href="language.types.object.php" class="type object">object</a></span>s.
   Return value checks using <span class="function"><a href="function.is-resource.php" class="function">is_resource()</a></span> should be replaced with checks for <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
  <ul class="itemizedlist">
    <li class="listitem">
     <p class="para">
      <span class="function"><a href="function.curl-init.php" class="function">curl_init()</a></span> will now return a <span class="classname"><a href="class.curlhandle.php" class="classname">CurlHandle</a></span> object rather
      than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>. The <span class="function"><a href="function.curl-close.php" class="function">curl_close()</a></span> function no longer has an effect,
      instead the <span class="classname"><a href="class.curlhandle.php" class="classname">CurlHandle</a></span> instance is automatically destroyed if it is no
      longer referenced.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <span class="function"><a href="function.curl-multi-init.php" class="function">curl_multi_init()</a></span> will now return a <span class="classname"><a href="class.curlmultihandle.php" class="classname">CurlMultiHandle</a></span>
      object rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>. The <span class="function"><a href="function.curl-multi-close.php" class="function">curl_multi_close()</a></span> function no
      longer has an effect, instead the <span class="classname"><a href="class.curlmultihandle.php" class="classname">CurlMultiHandle</a></span> instance is
      automatically destroyed if it is no longer referenced.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <span class="function"><a href="function.curl-share-init.php" class="function">curl_share_init()</a></span> will now return a <span class="classname"><a href="class.curlsharehandle.php" class="classname">CurlShareHandle</a></span>
      object rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>. The <span class="function"><a href="function.curl-share-close.php" class="function">curl_share_close()</a></span> function no
      longer has an effect, instead the <span class="classname"><a href="class.curlsharehandle.php" class="classname">CurlShareHandle</a></span> instance is
      automatically destroyed if it is no longer referenced.
     </p>
    </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.enchant-broker-init.php" class="function">enchant_broker_init()</a></span> will now return an <span class="classname"><a href="class.enchantbroker.php" class="classname">EnchantBroker</a></span>
     object rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.enchant-broker-request-dict.php" class="function">enchant_broker_request_dict()</a></span> and
     <span class="function"><a href="function.enchant-broker-request-pwl-dict.php" class="function">enchant_broker_request_pwl_dict()</a></span> will now return an
     <span class="classname"><a href="class.enchantdictionary.php" class="classname">EnchantDictionary</a></span> object rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The GD extension now uses <span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span> objects as the underlying data structure
     for images, rather than <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>s.
     The <span class="function"><a href="function.imagedestroy.php" class="function">imagedestroy()</a></span> function no longer has an effect; instead the
     <span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span> instance is automatically destroyed if it is no longer referenced.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.openssl-x509-read.php" class="function">openssl_x509_read()</a></span> and <span class="function"><a href="function.openssl-csr-sign.php" class="function">openssl_csr_sign()</a></span> will now return
     an <span class="classname"><a href="class.opensslcertificate.php" class="classname">OpenSSLCertificate</a></span> object rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
     The <span class="function"><a href="function.openssl-x509-free.php" class="function">openssl_x509_free()</a></span> function is deprecated and no longer has an effect,
     instead the <span class="classname"><a href="class.opensslcertificate.php" class="classname">OpenSSLCertificate</a></span> instance is automatically destroyed if it
     is no longer referenced.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.openssl-csr-new.php" class="function">openssl_csr_new()</a></span> will now return an
     <span class="classname"><a href="class.opensslcertificatesigningrequest.php" class="classname">OpenSSLCertificateSigningRequest</a></span> object rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.openssl-pkey-new.php" class="function">openssl_pkey_new()</a></span> will now return an
     <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span> object rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
     The <span class="function"><a href="function.openssl-pkey-free.php" class="function">openssl_pkey_free()</a></span> function is deprecated and no longer has an effect,
     instead the <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span> instance is automatically destroyed if it
     is no longer referenced.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.shmop-open.php" class="function">shmop_open()</a></span> will now return a <span class="classname"><a href="class.shmop.php" class="classname">Shmop</a></span> object rather than
     a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>. The <span class="function"><a href="function.shmop-close.php" class="function">shmop_close()</a></span> function no longer has an effect, and is
     deprecated; instead the <span class="classname"><a href="class.shmop.php" class="classname">Shmop</a></span> instance is automatically destroyed if it is
     no longer referenced.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.socket-create.php" class="function">socket_create()</a></span>, <span class="function"><a href="function.socket-create-listen.php" class="function">socket_create_listen()</a></span>,
     <span class="function"><a href="function.socket-accept.php" class="function">socket_accept()</a></span>, <span class="function"><a href="function.socket-import-stream.php" class="function">socket_import_stream()</a></span>,
     <span class="function"><a href="function.socket-addrinfo-connect.php" class="function">socket_addrinfo_connect()</a></span>, <span class="function"><a href="function.socket-addrinfo-bind.php" class="function">socket_addrinfo_bind()</a></span>, and
     <span class="function"><a href="function.socket-wsaprotocol-info-import.php" class="function">socket_wsaprotocol_info_import()</a></span> will now return a
     <span class="classname"><a href="class.socket.php" class="classname">Socket</a></span> object rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
     <span class="function"><a href="function.socket-addrinfo-lookup.php" class="function">socket_addrinfo_lookup()</a></span> will now return an array of
     <span class="classname"><a href="class.addressinfo.php" class="classname">AddressInfo</a></span> objects rather than <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>s.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.msg-get-queue.php" class="function">msg_get_queue()</a></span> will now return an <span class="classname"><a href="class.sysvmessagequeue.php" class="classname">SysvMessageQueue</a></span>
     object rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.sem-get.php" class="function">sem_get()</a></span> will now return an <span class="classname"><a href="class.sysvsemaphore.php" class="classname">SysvSemaphore</a></span> object
     rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.shm-attach.php" class="function">shm_attach()</a></span> will now return an <span class="classname"><a href="class.sysvsharedmemory.php" class="classname">SysvSharedMemory</a></span> object
     rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.xml-parser-create.php" class="function">xml_parser_create()</a></span> and <span class="function"><a href="function.xml-parser-create-ns.php" class="function">xml_parser_create_ns()</a></span> will now
     return an <span class="classname"><a href="class.xmlparser.php" class="classname">XMLParser</a></span> object rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>. The
     <span class="function"><a href="function.xml-parser-free.php" class="function">xml_parser_free()</a></span> function no longer has an effect, instead the XMLParser
     instance is automatically destroyed if it is no longer referenced.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <a href="book.xmlwriter.php" class="link">XMLWriter</a> functions now accept and return, respectively,
     <span class="classname"><a href="class.xmlwriter.php" class="classname">XMLWriter</a></span> objects instead of <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>s.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.inflate-init.php" class="function">inflate_init()</a></span> will now return an <span class="classname"><a href="class.inflatecontext.php" class="classname">InflateContext</a></span> object
     rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.deflate-init.php" class="function">deflate_init()</a></span> will now return a <span class="classname"><a href="class.deflatecontext.php" class="classname">DeflateContext</a></span> object
     rather than a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.com">
  <h3 class="title">COM and .Net (Windows)</h3>

  <p class="para">
   The ability to import case-insensitive constants from type libraries has been removed.
   The second argument to <span class="function"><a href="function.com-load-typelib.php" class="function">com_load_typelib()</a></span> may no longer be false;
   <a href="com.configuration.php#ini.com.autoregister-casesensitive" class="link">com.autoregister_casesensitive</a>
   may no longer be disabled; case-insensitive markers in
   <a href="com.configuration.php#ini.com.typelib-file" class="link">com.typelib_file</a> are ignored.
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.curl">
  <h3 class="title">CURL</h3>

  <p class="para">
   <strong><code><a href="curl.constants.php#constant.curlopt-postfields">CURLOPT_POSTFIELDS</a></code></strong> no longer accepts objects as arrays. To
   interpret an object as an array, perform an explicit <code class="code">(array)</code> cast. The
   same applies to other options accepting arrays as well.
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.datetime">
  <h3 class="title">Date and Time</h3>

  <p class="para">
   <span class="function"><a href="function.mktime.php" class="function">mktime()</a></span> and <span class="function"><a href="function.gmmktime.php" class="function">gmmktime()</a></span> now require at least one
   argument. <span class="function"><a href="function.time.php" class="function">time()</a></span> can be used to get the current timestamp.
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.dom">
  <h3 class="title">DOM</h3>

  <p class="para">
   Unimplemented classes from the DOM extension that had no behavior and contained test
   data have been removed. These classes have also been removed in the latest version of
   the DOM standard:
  </p>
  <p class="para">
   <ul class="simplelist">
    <li><span class="classname"><strong class="classname">DOMNameList</strong></span></li>
    <li><span class="classname"><strong class="classname">DomImplementationList</strong></span></li>
    <li><span class="classname"><strong class="classname">DOMConfiguration</strong></span></li>
    <li><span class="classname"><strong class="classname">DomError</strong></span></li>
    <li><span class="classname"><strong class="classname">DomErrorHandler</strong></span></li>
    <li><span class="classname"><strong class="classname">DOMImplementationSource</strong></span></li>
    <li><span class="classname"><strong class="classname">DOMLocator</strong></span></li>
    <li><span class="classname"><strong class="classname">DOMUserDataHandler</strong></span></li>
    <li><span class="classname"><strong class="classname">DOMTypeInfo</strong></span></li>
    <li><span class="classname"><strong class="classname">DOMStringExtend</strong></span></li>
   </ul>
  </p>
  <p class="para">
   Unimplemented methods from the DOM extension that had no behavior have been removed:
  </p>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><strong>DOMNamedNodeMap::setNamedItem()</strong></span></li>
    <li><span class="methodname"><strong>DOMNamedNodeMap::removeNamedItem()</strong></span></li>
    <li><span class="methodname"><strong>DOMNamedNodeMap::setNamedItemNS()</strong></span></li>
    <li><span class="methodname"><strong>DOMNamedNodeMap::removeNamedItemNS()</strong></span></li>
    <li><span class="methodname"><strong>DOMText::replaceWholeText()</strong></span></li>
    <li><span class="methodname"><a href="domnode.comparedocumentposition.php" class="methodname">DOMNode::compareDocumentPosition()</a></span></li>
    <li><span class="methodname"><a href="domnode.isequalnode.php" class="methodname">DOMNode::isEqualNode()</a></span></li>
    <li><span class="methodname"><strong>DOMNode::getFeature()</strong></span></li>
    <li><span class="methodname"><strong>DOMNode::setUserData()</strong></span></li>
    <li><span class="methodname"><strong>DOMNode::getUserData()</strong></span></li>
    <li><span class="methodname"><strong>DOMDocument::renameNode()</strong></span></li>
   </ul>
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.enchant">
  <h3 class="title">Enchant</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.enchant-broker-list-dicts.php" class="function">enchant_broker_list_dicts()</a></span>, <span class="function"><a href="function.enchant-broker-describe.php" class="function">enchant_broker_describe()</a></span> and
     <span class="function"><a href="function.enchant-dict-suggest.php" class="function">enchant_dict_suggest()</a></span> will now return an empty array instead of <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.exif">
  <h3 class="title">Exif</h3>

  <p class="para">
   <span class="function"><a href="function.read-exif-data.php" class="function">read_exif_data()</a></span> has been removed; <span class="function"><a href="function.exif-read-data.php" class="function">exif_read_data()</a></span>
   should be used instead.
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.filter">
  <h3 class="title">Filter</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The <strong><code><a href="filter.constants.php#constant.filter-flag-scheme-required">FILTER_FLAG_SCHEME_REQUIRED</a></code></strong> and
     <strong><code><a href="filter.constants.php#constant.filter-flag-host-required">FILTER_FLAG_HOST_REQUIRED</a></code></strong> flags for the
     <strong><code><a href="filter.constants.php#constant.filter-validate-url">FILTER_VALIDATE_URL</a></code></strong> filter have been removed. The <code class="literal">scheme</code>
     and <code class="literal">host</code> are (and have been) always required.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <strong><code><a href="filter.constants.php#constant.input-request">INPUT_REQUEST</a></code></strong> and <strong><code><a href="filter.constants.php#constant.input-session">INPUT_SESSION</a></code></strong> source for
     <span class="function"><a href="function.filter-input.php" class="function">filter_input()</a></span> etc. have been removed. These were never implemented and their
     use always generated a warning.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.gd">
  <h3 class="title">GD</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The deprecated function <span class="function"><a href="function.image2wbmp.php" class="function">image2wbmp()</a></span> has been removed.
     
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The deprecated functions <span class="function"><a href="function.png2wbmp.php" class="function">png2wbmp()</a></span> and <span class="function"><a href="function.jpeg2wbmp.php" class="function">jpeg2wbmp()</a></span> have
     been removed.
     
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The default <code class="parameter">mode</code> parameter of <span class="function"><a href="function.imagecropauto.php" class="function">imagecropauto()</a></span> no longer
     accepts <code class="literal">-1</code>. <strong><code><a href="image.constants.php#constant.img-crop-default">IMG_CROP_DEFAULT</a></code></strong> should be used instead.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     On Windows, <var class="filename">php_gd2.dll</var> has been renamed to <var class="filename">php_gd.dll</var>.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.gmp">
  <h3 class="title">GMP</h3>

  <p class="para">
   <span class="function"><a href="function.gmp-random.php" class="function">gmp_random()</a></span> has been removed. One of <span class="function"><a href="function.gmp-random-range.php" class="function">gmp_random_range()</a></span> or
   <span class="function"><a href="function.gmp-random-bits.php" class="function">gmp_random_bits()</a></span> should be used instead.
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.iconv">
  <h3 class="title">Iconv</h3>

  <p class="para">
   iconv implementations which do not properly set <var class="varname">errno</var> in case of errors are no
   longer supported.
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.imap">
  <h3 class="title">IMAP</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The unused <code class="parameter">default_host</code> argument of <span class="function"><a href="function.imap-headerinfo.php" class="function">imap_headerinfo()</a></span>
     has been removed.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <span class="function"><a href="function.imap-header.php" class="function">imap_header()</a></span> function which is an alias of
     <span class="function"><a href="function.imap-headerinfo.php" class="function">imap_headerinfo()</a></span> has been removed.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.intl">
  <h3 class="title">Internationalization Functions</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The deprecated constant <strong><code><a href="intl.constants.php#constant.intl-idna-variant-2003">INTL_IDNA_VARIANT_2003</a></code></strong> has been removed.
     
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The deprecated <strong><code>Normalizer::NONE</code></strong> constant has been removed.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.ldap">
  <h3 class="title">LDAP</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The deprecated functions <span class="function"><a href="function.ldap-sort.php" class="function">ldap_sort()</a></span>,
     <span class="function"><a href="function.ldap-control-paged-result.php" class="function">ldap_control_paged_result()</a></span> and
     <span class="function"><a href="function.ldap-control-paged-result-response.php" class="function">ldap_control_paged_result_response()</a></span> have been removed.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The interface of <span class="function"><a href="function.ldap-set-rebind-proc.php" class="function">ldap_set_rebind_proc()</a></span> has changed; the
     <code class="parameter">callback</code> parameter does not accept empty strings anymore; <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> should be
     used instead.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.mbstring">
  <h3 class="title">MBString</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The <a href="mbstring.configuration.php#ini.mbstring.func-overload" class="link">mbstring.func_overload</a> directive has been
     removed. The related <strong><code><a href="mbstring.constants.php#constant.mb-overload-mail">MB_OVERLOAD_MAIL</a></code></strong>,
     <strong><code><a href="mbstring.constants.php#constant.mb-overload-string">MB_OVERLOAD_STRING</a></code></strong>, and <strong><code><a href="mbstring.constants.php#constant.mb-overload-regex">MB_OVERLOAD_REGEX</a></code></strong> constants
     have also been removed. Finally, the <code class="literal">&quot;func_overload&quot;</code> and
     <code class="literal">&quot;func_overload_list&quot;</code> entries in <span class="function"><a href="function.mb-get-info.php" class="function">mb_get_info()</a></span> have been
     removed.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.mb-parse-str.php" class="function">mb_parse_str()</a></span> can no longer be used without specifying a result array.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     A number of deprecated mbregex aliases have been removed. See the following
     list for which functions should be used instead:
    </p>
    <p class="para">
     <ul class="simplelist">
      <li><span class="function"><strong>mbregex_encoding()</strong></span> → <span class="function"><a href="function.mb-regex-encoding.php" class="function">mb_regex_encoding()</a></span></li>
      <li><span class="function"><strong>mbereg()</strong></span> → <span class="function"><a href="function.mb-ereg.php" class="function">mb_ereg()</a></span></li>
      <li><span class="function"><strong>mberegi()</strong></span> → <span class="function"><a href="function.mb-eregi.php" class="function">mb_eregi()</a></span></li>
      <li><span class="function"><strong>mbereg_replace()</strong></span> → <span class="function"><a href="function.mb-ereg-replace.php" class="function">mb_ereg_replace()</a></span></li>
      <li><span class="function"><strong>mberegi_replace()</strong></span> → <span class="function"><a href="function.mb-eregi-replace.php" class="function">mb_eregi_replace()</a></span></li>
      <li><span class="function"><strong>mbsplit()</strong></span> → <span class="function"><a href="function.mb-split.php" class="function">mb_split()</a></span></li>
      <li><span class="function"><strong>mbereg_match()</strong></span> → <span class="function"><a href="function.mb-ereg-match.php" class="function">mb_ereg_match()</a></span></li>
      <li><span class="function"><strong>mbereg_search()</strong></span> → <span class="function"><a href="function.mb-ereg-search.php" class="function">mb_ereg_search()</a></span></li>
      <li><span class="function"><strong>mbereg_search_pos()</strong></span> → <span class="function"><a href="function.mb-ereg-search-pos.php" class="function">mb_ereg_search_pos()</a></span></li>
      <li><span class="function"><strong>mbereg_search_regs()</strong></span> → <span class="function"><a href="function.mb-ereg-search-regs.php" class="function">mb_ereg_search_regs()</a></span></li>
      <li><span class="function"><strong>mbereg_search_init()</strong></span> → <span class="function"><a href="function.mb-ereg-search-init.php" class="function">mb_ereg_search_init()</a></span></li>
      <li><span class="function"><strong>mbereg_search_getregs()</strong></span> → <span class="function"><a href="function.mb-ereg-search-getregs.php" class="function">mb_ereg_search_getregs()</a></span></li>
      <li><span class="function"><strong>mbereg_search_getpos()</strong></span> → <span class="function"><a href="function.mb-ereg-search-getpos.php" class="function">mb_ereg_search_getpos()</a></span></li>
      <li><span class="function"><strong>mbereg_search_setpos()</strong></span> → <span class="function"><a href="function.mb-ereg-search-setpos.php" class="function">mb_ereg_search_setpos()</a></span></li>
     </ul>
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <code class="literal">e</code> modifier for <span class="function"><a href="function.mb-ereg-replace.php" class="function">mb_ereg_replace()</a></span> has been removed.
     <span class="function"><a href="function.mb-ereg-replace-callback.php" class="function">mb_ereg_replace_callback()</a></span> should be used instead.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     A non-string pattern argument to <span class="function"><a href="function.mb-ereg-replace.php" class="function">mb_ereg_replace()</a></span> will now be interpreted as
     a string instead of an ASCII codepoint. The previous behavior may be restored with an explicit
     call to <span class="function"><a href="function.chr.php" class="function">chr()</a></span>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <code class="parameter">needle</code> argument for <span class="function"><a href="function.mb-strpos.php" class="function">mb_strpos()</a></span>,
     <span class="function"><a href="function.mb-strrpos.php" class="function">mb_strrpos()</a></span>, <span class="function"><a href="function.mb-stripos.php" class="function">mb_stripos()</a></span>,
     <span class="function"><a href="function.mb-strripos.php" class="function">mb_strripos()</a></span>, <span class="function"><a href="function.mb-strstr.php" class="function">mb_strstr()</a></span>,
     <span class="function"><a href="function.mb-stristr.php" class="function">mb_stristr()</a></span>, <span class="function"><a href="function.mb-strrchr.php" class="function">mb_strrchr()</a></span> and
     <span class="function"><a href="function.mb-strrichr.php" class="function">mb_strrichr()</a></span> can now be empty.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <code class="parameter">is_hex</code> parameter, which was not used internally, has been removed from
     <span class="function"><a href="function.mb-decode-numericentity.php" class="function">mb_decode_numericentity()</a></span>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The legacy behavior of passing the encoding as the third argument instead of an offset for the
     <span class="function"><a href="function.mb-strrpos.php" class="function">mb_strrpos()</a></span> function has been removed; an explicit <code class="literal">0</code>
     offset with the encoding should be provided as the fourth argument instead.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <code class="literal">ISO_8859-*</code> character encoding aliases have been replaced by
     <code class="literal">ISO8859-*</code> aliases for better interoperability with the iconv extension. The
     mbregex ISO 8859 aliases with underscores (<code class="literal">ISO_8859_*</code> and
     <code class="literal">ISO8859_*</code>) have also been removed.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.mb-ereg.php" class="function">mb_ereg()</a></span> and <span class="function"><a href="function.mb-eregi.php" class="function">mb_eregi()</a></span> will now return boolean <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> on
     a successful match. Previously they returned integer <code class="literal">1</code> if
     <code class="parameter">matches</code> was not passed, or <code class="code">max(1, strlen($matches[0]))</code> if
     <code class="parameter">matches</code> was passed.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.oci8">
  <h3 class="title">OCI8</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The <span class="classname"><strong class="classname">OCI-Lob</strong></span> class is now called <span class="classname"><a href="class.ocilob.php" class="classname">OCILob</a></span>, and the
     <span class="classname"><strong class="classname">OCI-Collection</strong></span> class is now called <span class="classname"><a href="class.ocicollection.php" class="classname">OCICollection</a></span>
     for name compliance enforced by PHP 8 arginfo type annotation tooling.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     Several alias functions have been marked as deprecated.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.oci-internal-debug.php" class="function">oci_internal_debug()</a></span> and its alias <span class="function"><a href="function.ociinternaldebug.php" class="function">ociinternaldebug()</a></span> have
     been removed.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.odbc">
  <h3 class="title">ODBC</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.odbc-connect.php" class="function">odbc_connect()</a></span> no longer reuses connections.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The unused <code class="parameter">flags</code> parameter of <span class="function"><a href="function.odbc-exec.php" class="function">odbc_exec()</a></span> has been
     removed.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.openssl">
  <h3 class="title">OpenSSL</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.openssl-seal.php" class="function">openssl_seal()</a></span> and <span class="function"><a href="function.openssl-open.php" class="function">openssl_open()</a></span> now require
     <code class="parameter">method</code> to be passed, as the previous default of <code class="literal">&quot;RC4&quot;</code>
     is considered insecure.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.pcre">
  <h3 class="title">Regular Expressions (Perl-Compatible)</h3>

  <p class="para">
   When passing invalid escape sequences they are no longer interpreted as literals. This behavior
   previously required the <code class="literal">X</code> modifier – which is now ignored.
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.pdo">
  <h3 class="title">PHP Data Objects</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The default error handling mode has been changed from &quot;silent&quot; to &quot;exceptions&quot;. See
     <a href="pdo.error-handling.php" class="link">Errors and error handling</a> for details.
     
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The signatures of some PDO methods have changed:
    </p>
    <p class="para">
     <ul class="simplelist">
      <li><code class="code">PDO::query(string $query, ?int $fetchMode  = null, mixed  ...$fetchModeArgs)</code></li>
      <li><code class="code">PDOStatement::setFetchMode(int $mode, mixed ...$args)</code></li>
     </ul>
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.pdo-odbc">
  <h3 class="title">PDO ODBC</h3>

  <p class="para">
   The <var class="filename">php.ini</var> directive
   <a href="ref.pdo-odbc.php#ini.pdo-odbc.db2-instance-name" class="link">pdo_odbc.db2_instance_name</a> has been
   removed.
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.pdo-mysql">
  <h3 class="title">PDO MySQL</h3>

  <p class="para">
   <span class="methodname"><a href="pdo.intransaction.php" class="methodname">PDO::inTransaction()</a></span> now reports the actual transaction state of
   the connection, rather than an approximation maintained by PDO. If a query that is
   subject to &quot;implicit commit&quot; is executed, <span class="methodname"><a href="pdo.intransaction.php" class="methodname">PDO::inTransaction()</a></span>
   will subsequently return <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, as a transaction is no longer active.
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.pgsql">
  <h3 class="title">PostgreSQL</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The deprecated <span class="function"><a href="function.pg-connect.php" class="function">pg_connect()</a></span> syntax using multiple parameters instead of a
     connection string is no longer supported.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The deprecated <span class="function"><a href="function.pg-lo-import.php" class="function">pg_lo_import()</a></span> and <span class="function"><a href="function.pg-lo-export.php" class="function">pg_lo_export()</a></span> signature
     that passes the connection as the last argument is no longer supported. The connection should be
     passed as first argument instead.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.pg-fetch-all.php" class="function">pg_fetch_all()</a></span> will now return an empty array instead of <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> for result
     sets with zero rows.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.phar">
  <h3 class="title">Phar</h3>

  <p class="para">
   Metadata associated with a phar will no longer be automatically unserialized, to fix potential
   security vulnerabilities due to object instantiation, autoloading, etc.
   
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.reflection">
  <h3 class="title">Reflection</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The method signatures
    </p>
    <p class="para">
     <ul class="simplelist">
      <li><code class="code">ReflectionClass::newInstance($args)</code></li>
      <li><code class="code">ReflectionFunction::invoke($args)</code></li>
      <li><code class="code">ReflectionMethod::invoke($object, $args)</code></li>
     </ul>
    </p>
    <p class="para">
     have been changed to:
    </p>
    <p class="para">
     <ul class="simplelist">
      <li><code class="code">ReflectionClass::newInstance(...$args)</code></li>
      <li><code class="code">ReflectionFunction::invoke(...$args)</code></li>
      <li><code class="code">ReflectionMethod::invoke($object, ...$args)</code></li>
     </ul>
    </p>
    <p class="para">
     Code that must be compatible with both PHP 7 and PHP 8 can use the following
     signatures to be compatible with both versions:
    </p>
    <p class="para">
     <ul class="simplelist">
      <li><code class="code">ReflectionClass::newInstance($arg = null, ...$args)</code></li>
      <li><code class="code">ReflectionFunction::invoke($arg = null, ...$args)</code></li>
      <li><code class="code">ReflectionMethod::invoke($object, $arg = null, ...$args)</code></li>
     </ul>
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <span class="methodname"><a href="reflectiontype.tostring.php" class="methodname">ReflectionType::__toString()</a></span> method will now return a complete debug
     representation of the type, and is no longer deprecated. In particular the result will include a
     nullability indicator for nullable types. The format of the return value is not stable and may
     change between PHP versions.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     Reflection export() methods have been removed.
     Instead reflection objects can be cast to string.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="methodname"><a href="reflectionmethod.isconstructor.php" class="methodname">ReflectionMethod::isConstructor()</a></span> and
     <span class="methodname"><a href="reflectionmethod.isdestructor.php" class="methodname">ReflectionMethod::isDestructor()</a></span> now also return <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> for
     <a href="language.oop5.decon.php#object.construct" class="link">__construct()</a> and
     <a href="language.oop5.decon.php#object.destruct" class="link">__destruct()</a> methods of interfaces.
     Previously, this would only be true for methods of classes and traits.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="methodname"><strong>ReflectionType::isBuiltin()</strong></span> method has been moved to
     <span class="classname"><a href="class.reflectionnamedtype.php" class="classname">ReflectionNamedType</a></span>. <span class="classname"><a href="class.reflectionuniontype.php" class="classname">ReflectionUnionType</a></span> does not
     have it.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.sockets">
  <h3 class="title">Sockets</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The deprecated <strong><code>AI_IDN_ALLOW_UNASSIGNED</code></strong> and
     <strong><code>AI_IDN_USE_STD3_ASCII_RULES</code></strong> <code class="parameter">flags</code> for
     <span class="function"><a href="function.socket-addrinfo-lookup.php" class="function">socket_addrinfo_lookup()</a></span> have been removed.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.spl">
  <h3 class="title">Standard PHP Library (SPL)</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     <span class="methodname"><a href="splfileobject.fgetss.php" class="methodname">SplFileObject::fgetss()</a></span> has been removed.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="methodname"><a href="splfileobject.seek.php" class="methodname">SplFileObject::seek()</a></span> now always seeks to the beginning of the line.
     Previously, positions <code class="literal">&gt;=1</code> sought to the beginning of the next line.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="methodname"><a href="splheap.compare.php" class="methodname">SplHeap::compare()</a></span> now specifies a method signature. Inheriting classes
     implementing this method will now have to use a compatible method signature.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="methodname"><a href="spldoublylinkedlist.push.php" class="methodname">SplDoublyLinkedList::push()</a></span>,
     <span class="methodname"><a href="spldoublylinkedlist.unshift.php" class="methodname">SplDoublyLinkedList::unshift()</a></span> and
     <span class="methodname"><a href="splqueue.enqueue.php" class="methodname">SplQueue::enqueue()</a></span> now return <span class="type"><span class="type"><a href="language.types.void.php" class="type void">void</a></span></span> instead of <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.spl-autoload-register.php" class="function">spl_autoload_register()</a></span> will now always throw a
     <span class="classname"><a href="class.typeerror.php" class="classname">TypeError</a></span> on invalid arguments, therefore the second argument
     <code class="parameter">do_throw</code> is ignored and a notice will be emitted if it is set to <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="classname"><a href="class.splfixedarray.php" class="classname">SplFixedArray</a></span> is now an <span class="interfacename"><a href="class.iteratoraggregate.php" class="interfacename">IteratorAggregate</a></span>
     and not an <span class="interfacename"><a href="class.iterator.php" class="interfacename">Iterator</a></span>.
     <span class="methodname"><a href="splfixedarray.rewind.php" class="methodname">SplFixedArray::rewind()</a></span>, <span class="methodname"><a href="splfixedarray.current.php" class="methodname">SplFixedArray::current()</a></span>,
     <span class="methodname"><a href="splfixedarray.key.php" class="methodname">SplFixedArray::key()</a></span>, <span class="methodname"><a href="splfixedarray.next.php" class="methodname">SplFixedArray::next()</a></span>, and
     <span class="methodname"><a href="splfixedarray.valid.php" class="methodname">SplFixedArray::valid()</a></span> have been removed. In their place,
     <span class="methodname"><a href="splfixedarray.getiterator.php" class="methodname">SplFixedArray::getIterator()</a></span> has been added. Any code which uses explicit
     iteration over SplFixedArray must now obtain an
     <span class="interfacename"><a href="class.iterator.php" class="interfacename">Iterator</a></span> through
     <span class="methodname"><a href="splfixedarray.getiterator.php" class="methodname">SplFixedArray::getIterator()</a></span>. This means that
     <span class="classname"><a href="class.splfixedarray.php" class="classname">SplFixedArray</a></span> is now safe to use in nested loops.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.standard">
  <h3 class="title">Standard Library</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.assert.php" class="function">assert()</a></span> will no longer evaluate string arguments, instead they will be
     treated like any other argument. <code class="code">assert($a == $b)</code> should be used instead of
     <code class="code">assert(&#039;$a == $b&#039;)</code>. The <a href="info.configuration.php#ini.assert.quiet-eval" class="link">assert.quiet_eval</a> ini directive and the
     <strong><code><a href="info.constants.php#constant.assert-quiet-eval">ASSERT_QUIET_EVAL</a></code></strong> constant have also been removed, as they would no longer
     have any effect.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.parse-str.php" class="function">parse_str()</a></span> can no longer be used without specifying a result array.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <a href="filters.string.php#filters.string.strip_tags" class="link">string.strip_tags</a> filter has been removed.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <code class="parameter">needle</code> argument of <span class="function"><a href="function.strpos.php" class="function">strpos()</a></span>,
     <span class="function"><a href="function.strrpos.php" class="function">strrpos()</a></span>, <span class="function"><a href="function.stripos.php" class="function">stripos()</a></span>, <span class="function"><a href="function.strripos.php" class="function">strripos()</a></span>,
     <span class="function"><a href="function.strstr.php" class="function">strstr()</a></span>, <span class="function"><a href="function.strchr.php" class="function">strchr()</a></span>, <span class="function"><a href="function.strrchr.php" class="function">strrchr()</a></span>, and
     <span class="function"><a href="function.stristr.php" class="function">stristr()</a></span> will now always be interpreted as a string. Previously non-string
     needles were interpreted as an ASCII code point. An explicit call to <span class="function"><a href="function.chr.php" class="function">chr()</a></span> can
     be used to restore the previous behavior.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <code class="parameter">needle</code> argument for <span class="function"><a href="function.strpos.php" class="function">strpos()</a></span>,
     <span class="function"><a href="function.strrpos.php" class="function">strrpos()</a></span>, <span class="function"><a href="function.stripos.php" class="function">stripos()</a></span>, <span class="function"><a href="function.strripos.php" class="function">strripos()</a></span>,
     <span class="function"><a href="function.strstr.php" class="function">strstr()</a></span>, <span class="function"><a href="function.stristr.php" class="function">stristr()</a></span> and <span class="function"><a href="function.strrchr.php" class="function">strrchr()</a></span> can
     now be empty.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <code class="parameter">length</code> argument for <span class="function"><a href="function.substr.php" class="function">substr()</a></span>,
     <span class="function"><a href="function.substr-count.php" class="function">substr_count()</a></span>, <span class="function"><a href="function.substr-compare.php" class="function">substr_compare()</a></span>, and
     <span class="function"><a href="function.iconv-substr.php" class="function">iconv_substr()</a></span> can now be <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>. <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> values will behave as if no length
     argument was provided and will therefore return the remainder of the string instead of an empty
     string.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <code class="parameter">length</code> argument for <span class="function"><a href="function.array-splice.php" class="function">array_splice()</a></span> can now be
     <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>. <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> values will behave identically to omitting the argument, thus removing everything
     from the <code class="parameter">offset</code> to the end of the array.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <code class="parameter">args</code> argument of <span class="function"><a href="function.vsprintf.php" class="function">vsprintf()</a></span>,
     <span class="function"><a href="function.vfprintf.php" class="function">vfprintf()</a></span>, and <span class="function"><a href="function.vprintf.php" class="function">vprintf()</a></span> must now be an array. Previously
     any type was accepted.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <code class="literal">&#039;salt&#039;</code> option of <span class="function"><a href="function.password-hash.php" class="function">password_hash()</a></span> is no longer
     supported. If the <code class="literal">&#039;salt&#039;</code> option is used a warning is generated, the provided
     salt is ignored, and a generated salt is used instead.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The <span class="function"><a href="function.quotemeta.php" class="function">quotemeta()</a></span> function will now return an empty string if an empty string
     was passed. Previously <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> was returned.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The following functions have been removed:
    </p>
    <p class="para">
     <ul class="simplelist">
      <li><span class="function"><a href="function.hebrevc.php" class="function">hebrevc()</a></span></li>
      <li><span class="function"><a href="function.convert-cyr-string.php" class="function">convert_cyr_string()</a></span></li>
      <li><span class="function"><a href="function.money-format.php" class="function">money_format()</a></span></li>
      <li><span class="function"><a href="function.ezmlm-hash.php" class="function">ezmlm_hash()</a></span></li>
      <li><span class="function"><a href="function.restore-include-path.php" class="function">restore_include_path()</a></span></li>
      <li><span class="function"><a href="function.get-magic-quotes-gpc.php" class="function">get_magic_quotes_gpc()</a></span></li>
      <li><span class="function"><a href="function.get-magic-quotes-runtime.php" class="function">get_magic_quotes_runtime()</a></span></li>
      <li><span class="function"><a href="function.fgetss.php" class="function">fgetss()</a></span></li>
     </ul>
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <strong><code><a href="filter.constants.php#constant.filter-sanitize-magic-quotes">FILTER_SANITIZE_MAGIC_QUOTES</a></code></strong> has been removed.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     Calling <span class="function"><a href="function.implode.php" class="function">implode()</a></span> with parameters in a reverse order <code class="code">($pieces,
     $glue)</code> is no longer supported.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.parse-url.php" class="function">parse_url()</a></span> will now distinguish absent and empty queries and fragments:
    </p>
    <p class="para">
     <ul class="simplelist">
      <li><code class="code">http://example.com/foo → query = null, fragment = null</code></li>
      <li><code class="code">http://example.com/foo? → query = &quot;&quot;,   fragment = null</code></li>
      <li><code class="code">http://example.com/foo# → query = null, fragment = &quot;&quot;</code></li>
      <li><code class="code">http://example.com/foo?# → query = &quot;&quot;,   fragment = &quot;&quot;</code></li>
     </ul>
      Previously all cases resulted in query and fragment being <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.var-dump.php" class="function">var_dump()</a></span> and <span class="function"><a href="function.debug-zval-dump.php" class="function">debug_zval_dump()</a></span> will now print
     floating-point numbers using <a href="ini.core.php#ini.serialize-precision" class="link">serialize_precision</a>
     rather than <a href="ini.core.php#ini.precision" class="link">precision</a>. In a default configuration, this
     means that floating-point numbers are now printed with full accuracy by these debugging
     functions.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     If the array returned by <a href="language.oop5.magic.php#object.sleep" class="link">__sleep()</a> contains non-existing
     properties, these are now silently ignored. Previously, such properties would have been
     serialized as if they had the value <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The default locale on startup is now always <code class="literal">&quot;C&quot;</code>. No locales are inherited from
     the environment by default. Previously, <strong><code><a href="string.constants.php#constant.lc-all">LC_ALL</a></code></strong> was set to
     <code class="literal">&quot;C&quot;</code>, while <strong><code><a href="string.constants.php#constant.lc-ctype">LC_CTYPE</a></code></strong> was inherited from the environment.
     However, some functions did not respect the inherited locale without an explicit
     <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span> call. An explicit <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span> call is now
     always required if a locale component should be changed from the default.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The deprecated DES fallback in <span class="function"><a href="function.crypt.php" class="function">crypt()</a></span> has been removed. If an unknown salt
     format is passed to <span class="function"><a href="function.crypt.php" class="function">crypt()</a></span>, the function will fail with <code class="literal">*0</code>
     instead of falling back to a weak DES hash now.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     Specifying out of range rounds for SHA256/SHA512 <span class="function"><a href="function.crypt.php" class="function">crypt()</a></span> will now fail with
     <code class="literal">*0</code> instead of clamping to the closest limit. This matches glibc behavior.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The result of sorting functions may have changed, if the array contains elements that compare as
     equal.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     Any functions accepting callbacks that are not explicitly specified to accept parameters by
     reference will now warn if a callback with reference parameters is used. Examples include
     <span class="function"><a href="function.array-filter.php" class="function">array_filter()</a></span> and <span class="function"><a href="function.array-reduce.php" class="function">array_reduce()</a></span>. This was already the
     case for most, but not all, functions previously.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     The HTTP stream wrapper as used by functions like <span class="function"><a href="function.file-get-contents.php" class="function">file_get_contents()</a></span>
     now advertises HTTP/1.1 rather than HTTP/1.0 by default. This does not change the behavior of the
     client, but may cause servers to respond differently. To retain the old behavior, set the
     <code class="literal">&#039;protocol_version&#039;</code> stream context option, e.g.
    </p>
    <p class="para">
     <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$ctx </span><span style="color: #007700">= </span><span style="color: #0000BB">stream_context_create</span><span style="color: #007700">([</span><span style="color: #DD0000">'http' </span><span style="color: #007700">=&gt; [</span><span style="color: #DD0000">'protocol_version' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'1.0'</span><span style="color: #007700">]]);<br />echo </span><span style="color: #0000BB">file_get_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">'http://example.org'</span><span style="color: #007700">, </span><span style="color: #0000BB">false</span><span style="color: #007700">, </span><span style="color: #0000BB">$ctx</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
     </div>

    </p>
   </li>
   <li class="listitem">
    <p class="para">
     Calling <span class="function"><a href="function.crypt.php" class="function">crypt()</a></span> without an explicit salt is no longer supported. If you would
     like to produce a strong hash with an auto-generated salt, use
     <span class="function"><a href="function.password-hash.php" class="function">password_hash()</a></span> instead.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
    <span class="function"><a href="function.substr.php" class="function">substr()</a></span>, <span class="function"><a href="function.mb-substr.php" class="function">mb_substr()</a></span>, <span class="function"><a href="function.iconv-substr.php" class="function">iconv_substr()</a></span> and
    <span class="function"><a href="function.grapheme-substr.php" class="function">grapheme_substr()</a></span> now consistently clamp out-of-bounds offsets to the string
    boundary. Previously, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> was returned instead of the empty string in some cases.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     On Windows, the program execution functions (<span class="function"><a href="function.proc-open.php" class="function">proc_open()</a></span>, <span class="function"><a href="function.exec.php" class="function">exec()</a></span>,
     <span class="function"><a href="function.popen.php" class="function">popen()</a></span> etc.) using the shell, now consistently execute <strong class="command">%comspec% /s
     /c &quot;$commandline&quot;</strong>, which has the same effect as executing
     <strong class="command">$commandline</strong> (without additional quotes).
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.sysvsem">
  <h3 class="title">Sysvsem</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The <code class="parameter">auto_release</code> parameter of <span class="function"><a href="function.sem-get.php" class="function">sem_get()</a></span> was changed to
     accept bool values rather than int.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.tidy">
  <h3 class="title">Tidy</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     The <code class="parameter">use_include_path</code> parameter, which was not used internally, has been
     removed from <span class="function"><a href="tidy.repairstring.php" class="function">tidy_repair_string()</a></span>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="methodname"><a href="tidy.repairstring.php" class="methodname">tidy::repairString()</a></span> and <span class="methodname"><a href="tidy.repairfile.php" class="methodname">tidy::repairFile()</a></span> became
     static methods.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.tokenizer">
  <h3 class="title">Tokenizer</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     <strong><code><a href="tokens.php#constant.t-comment">T_COMMENT</a></code></strong> tokens will no longer include a trailing newline. The newline will
     instead be part of a following <strong><code><a href="tokens.php#constant.t-whitespace">T_WHITESPACE</a></code></strong> token. It should be noted that
     <strong><code><a href="tokens.php#constant.t-comment">T_COMMENT</a></code></strong> is not always followed by whitespace, it may also be followed by
     <strong><code><a href="tokens.php#constant.t-close-tag">T_CLOSE_TAG</a></code></strong> or end-of-file.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     Namespaced names are now represented using the <strong><code><a href="tokens.php#constant.t-name-qualified">T_NAME_QUALIFIED</a></code></strong>
     (<code class="code">Foo\Bar</code>), <strong><code><a href="tokens.php#constant.t-name-fully-qualified">T_NAME_FULLY_QUALIFIED</a></code></strong> (<code class="code">\Foo\Bar</code>) and
     <strong><code><a href="tokens.php#constant.t-name-relative">T_NAME_RELATIVE</a></code></strong> (<code class="code">namespace\Foo\Bar</code>) tokens.
     <strong><code><a href="tokens.php#constant.t-ns-separator">T_NS_SEPARATOR</a></code></strong> is only used for standalone namespace separators, and only
     syntactially valid in conjunction with group use declarations.
     
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.xmlreader">
  <h3 class="title">XMLReader</h3>

  <p class="para">
   <span class="methodname"><a href="xmlreader.open.php" class="methodname">XMLReader::open()</a></span> and <span class="methodname"><a href="xmlreader.xml.php" class="methodname">XMLReader::XML()</a></span> are now
   static methods. They can still be called as instance methods, but inheriting classes need to declare them
   as static if they override these methods.
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.xmlrpc">
  <h3 class="title">XML-RPC</h3>

  <p class="para">
   The XML-RPC extension has been moved to PECL and is no longer part of the PHP
   distribution.
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.zip">
  <h3 class="title">Zip</h3>

  <p class="para">
   <strong><code>ZipArchive::OPSYS_Z_CPM</code></strong> has been removed (this name was a typo). Use
   <strong><code><a href="zip.constants.php#ziparchive.constants.opsys-cpm">ZipArchive::OPSYS_CPM</a></code></strong> instead.
  </p>
 </div>

 <div class="sect2" id="migration80.incompatible.zlib">
  <h3 class="title">Zlib</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.gzgetss.php" class="function">gzgetss()</a></span> has been removed.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <a href="zlib.configuration.php#ini.zlib.output-compression" class="link">zlib.output_compression</a> is no longer
     automatically disabled for <code class="literal">Content-Type: image/*</code>.
    </p>
   </li>
  </ul>
 </div>

 <div class="sect2" id="migration80.incompatible.php-test-packs">
  <h3 class="title">Windows PHP Test Packs</h3>

  <p class="para">
   The test runner has been renamed from <var class="filename">run-test.php</var> to
   <var class="filename">run-tests.php</var>, to match its name in php-src.
  </p>
 </div>
</div><?php manual_footer($setup); ?>