downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/migration53.incompatible.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/migration53.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'migration53.incompatible.php',
   
1 => 'Backward Incompatible Changes',
  ),
 
'up' =>
  array (
   
0 => 'migration53.php',
   
1 => 'Migrating from PHP 5.2.x to PHP 5.3.x',
  ),
 
'prev' =>
  array (
   
0 => 'migration53.changes.php',
   
1 => 'What has changed in PHP 5.3.x',
  ),
 
'next' =>
  array (
   
0 => 'migration53.new-features.php',
   
1 => 'New features',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="migration53.incompatible" class="section">
  <h2 class="title">Backward Incompatible Changes</h2>
  <p class="simpara">
   Although most existing PHP 5 code should work without changes, please take
   note of some backward incompatible changes:
  </p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     The newer internal parameter parsing API has been applied across all the
     extensions bundled with PHP 5.3.x. This parameter parsing API causes
     functions to return <b><tt class="constant">NULL</tt></b> when passed incompatible parameters. There are
     some exceptions to this rule, such as the <a href="function.get-class.php" class="function">get_class()</a>
     function, which will continue to return <b><tt class="constant">FALSE</tt></b> on error.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="function.clearstatcache.php" class="function">clearstatcache()</a> no longer clears the realpath cache by
     default.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="function.realpath.php" class="function">realpath()</a> is now fully platform-independent.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     The <a href="function.call-user-func.php" class="function">call_user_func()</a> family of functions now propagate
     <i>$this</i> even if the callee is a parent class.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     The array functions <a href="function.natsort.php" class="function">natsort()</a>,
     <a href="function.natcasesort.php" class="function">natcasesort()</a>, <a href="function.usort.php" class="function">usort()</a>,
     <a href="function.uasort.php" class="function">uasort()</a>, <a href="function.uksort.php" class="function">uksort()</a>,
     <a href="function.array-flip.php" class="function">array_flip()</a>, and <a href="function.array-unique.php" class="function">array_unique()</a> no
     longer accept objects passed as arguments. To apply these functions to an
     object, cast the object to an array first.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     The behaviour of functions with by-reference parameters called by value has
     changed. Where previously the function would accept the by-value argument,
     a fatal error is now emitted. Any previous code passing constants or
     literals to functions expecting references, will need altering to assign
     the value to a variable before calling the function.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     The new mysqlnd library necessitates the use of MySQL 4.1&#039;s newer 41-byte
     password format. Continued use of the old 16-byte passwords will cause
     <a href="function.mysql-connect.php" class="function">mysql_connect()</a> and similar functions to emit the error,
     <i>&quot;mysqlnd cannot connect to MySQL 4.1+ using old
     authentication.&quot;</i>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     The new mysqlnd library does not read mysql configuration files
     (my.cnf/my.ini), as the older libmysql library does.  If your code relies on
     settings in the configuration file, you can load it explicitly with the
     <a href="mysqli.options.php" class="function">mysqli_options()</a> function.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     The trailing / has been removed from the <a href="class.splfileinfo.php" class="classname">SplFileInfo</a>
     class and other related directory classes.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     The <a href="language.oop5.magic.php#language.oop5.magic.tostring" class="link">__toString</a> magic
     method can no longer accept arguments.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     The magic methods
     <a href="language.oop5.overloading.php#language.oop5.overloading.members" class="link">__get</a>,
     <a href="language.oop5.overloading.php#language.oop5.overloading.members" class="link">__set</a>,
     <a href="language.oop5.overloading.php#language.oop5.overloading.members" class="link">__isset</a>,
     <a href="language.oop5.overloading.php#language.oop5.overloading.members" class="link">__unset</a>, and
     <a href="language.oop5.overloading.php#language.oop5.overloading.methods" class="link">__call</a> must always
     be public and can no longer be static. Method signatures are now enforced.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     The <a href="language.oop5.overloading.php#language.oop5.overloading.methods" class="link">__call</a>
     magic method is now invoked on access to private and protected methods.
    </span>
   </li>
  </ul>
  <p class="simpara">
   The following keywords are now reserved and may not be used in function,
   class, etc. names.
  </p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <a href="control-structures.goto.php" class="link">goto</a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="language.namespaces.php" class="link">namespace</a>
    </span>
   </li>
  </ul>
 </div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites