Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 9808

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Deprecated features in PHP 5.6.x</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration56.new-features.html">New features</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration56.changed-functions.html">Changed functions</a></div>
 <div class="up"><a href="migration56.html">Migrating from PHP 5.5.x to PHP 5.6.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="migration56.deprecated" class="sect1">
 <h2 class="title">Deprecated features in PHP 5.6.x</h2>

 <div class="sect2" id="migration56.deprecated.incompatible-context">
  <h3 class="title">Calls from incompatible context</h3>

  <p class="para">
   Methods called from an incompatible context are now deprecated, and will
   generate <strong><code>E_DEPRECATED</code></strong> errors when invoked instead of
   <strong><code>E_STRICT</code></strong>. Support for these calls will be removed in
   a future version of PHP.
  </p>

  <p class="para">
   An example of such a call is:
  </p>

  <div class="informalexample">
   <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&nbsp;</span><span style="color: #0000BB">A&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;</span><span style="color: #0000BB">f</span><span style="color: #007700">()&nbsp;{&nbsp;echo&nbsp;</span><span style="color: #0000BB">get_class</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">);&nbsp;}<br />}<br /><br />class&nbsp;</span><span style="color: #0000BB">B&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;</span><span style="color: #0000BB">f</span><span style="color: #007700">()&nbsp;{&nbsp;</span><span style="color: #0000BB">A</span><span style="color: #007700">::</span><span style="color: #0000BB">f</span><span style="color: #007700">();&nbsp;}<br />}<br /><br />(new&nbsp;</span><span style="color: #0000BB">B</span><span style="color: #007700">)-&gt;</span><span style="color: #0000BB">f</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

   <p class="para">The above example will output:</p>
   <div class="example-contents screen">
<div class="cdata"><pre>
Deprecated: Non-static method A::f() should not be called statically, assuming $this from incompatible context in - on line 7
B
</pre></div>
   </div>
  </div>
 </div>

 <div class="sect2" id="migration56.deprecated.raw-post-data">
  <h3 class="title"><var class="varname"><var class="varname"><a href="reserved.variables.httprawpostdata.html" class="classname">$HTTP_RAW_POST_DATA</a></var></var> and <a href="ini.core.html#ini.always-populate-raw-post-data" class="link">always_populate_raw_post_data</a></h3>

  <p class="para">
   <a href="ini.core.html#ini.always-populate-raw-post-data" class="link">always_populate_raw_post_data</a>
   will now generate an <strong><code>E_DEPRECATED</code></strong> error when
   <var class="varname"><var class="varname"><a href="reserved.variables.httprawpostdata.html" class="classname">$HTTP_RAW_POST_DATA</a></var></var> is populated.
   New code should use
   <a href="wrappers.php.html#wrappers.php.input" class="link"><em>php://input</em></a>
   instead of <var class="varname"><var class="varname"><a href="reserved.variables.httprawpostdata.html" class="classname">$HTTP_RAW_POST_DATA</a></var></var>, which will be removed
   in a future release. You can opt in for the new behaviour (in which
   <var class="varname"><var class="varname"><a href="reserved.variables.httprawpostdata.html" class="classname">$HTTP_RAW_POST_DATA</a></var></var> is never defined hence no
   <strong><code>E_DEPRECATED</code></strong> error will be generated) by setting
   <a href="ini.core.html#ini.always-populate-raw-post-data" class="link">always_populate_raw_post_data</a>
   to <em>-1</em>.
  </p>
 </div>

 <div class="sect2" id="migration56.deprecated.iconv-mbstring-encoding">
  <h3 class="title"><a href="book.iconv.html" class="link">iconv</a> and <a href="book.mbstring.html" class="link">mbstring</a> encoding settings</h3>

  <p class="para">
   The <a href="book.iconv.html" class="link">iconv</a> and
   <a href="book.mbstring.html" class="link">mbstring</a> configuration options related
   to encoding have been deprecated in favour of
   <a href="ini.core.html#ini.default-charset" class="link"><code class="parameter">default_charset</code></a>.
   The deprecated options are:
  </p>

  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <a href="iconv.configuration.html#ini.iconv.input-encoding" class="link"><code class="parameter">iconv.input_encoding</code></a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="iconv.configuration.html#ini.iconv.output-encoding" class="link"><code class="parameter">iconv.output_encoding</code></a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="iconv.configuration.html#ini.iconv.internal-encoding" class="link"><code class="parameter">iconv.internal_encoding</code></a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="mbstring.configuration.html#ini.mbstring.http-input" class="link"><code class="parameter">mbstring.http_input</code></a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="mbstring.configuration.html#ini.mbstring.http-output" class="link"><code class="parameter">mbstring.http_output</code></a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="mbstring.configuration.html#ini.mbstring.internal-encoding" class="link"><code class="parameter">mbstring.internal_encoding</code></a>
    </span>
   </li>
  </ul>
 </div>
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration56.new-features.html">New features</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration56.changed-functions.html">Changed functions</a></div>
 <div class="up"><a href="migration56.html">Migrating from PHP 5.5.x to PHP 5.6.x</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>