nlopess Sun Mar 7 04:40:16 2004 EDT
Modified files:
/phpdoc/en/appendices migration5.xml
Log:
adding derick's comment
http://cvs.php.net/diff.php/phpdoc/en/appendices/migration5.xml?r1=1.10&r2=1.11&ty=u
Index: phpdoc/en/appendices/migration5.xml
diff -u phpdoc/en/appendices/migration5.xml:1.10
phpdoc/en/appendices/migration5.xml:1.11
--- phpdoc/en/appendices/migration5.xml:1.10 Mon Mar 1 11:12:02 2004
+++ phpdoc/en/appendices/migration5.xml Sun Mar 7 04:40:13 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<appendix id="migration5">
<title>Migrating from PHP 4 to PHP 5</title>
@@ -67,6 +67,9 @@
variables.
</simpara></listitem>
<listitem><simpara>
+ An object with no properties is no longer considered "empty".
+ </simpara></listitem>
+ <listitem><simpara>
Classes must be declared before used.
</simpara></listitem>
</itemizedlist>
@@ -87,6 +90,26 @@
</example>
</para>
<para>
+ <example>
+ <title>An object with no properties is no longer considered "empty"</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+class test { }
+$t = new test();
+
+var_dump(empty($t)); // echo bool(false)
+
+if (!$t) {
+ // Will be executed
+}
+?>
+
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
The following example was valid in PHP 4, although it will produce a fatal
error in PHP 5.
</para>
@@ -536,6 +559,13 @@
PostgreSQL). The SQLite library reads and writes directly to and from the
database files on disk.
</para>
+
+ <note>
+ <para>
+ The <link linkend="ref.tidy">Tidy</link> extension has also changed its
+ API completly.
+ </para>
+ </note>
</section>
<section id='migration5.oop'>