cvs: livedocs / xml_classes5.php
| From: | Ilia Alshanetsky | Date: | Thu, 27 May 2004 21:31:19 +0000 |
| Subject: | cvs: livedocs / xml_classes5.php | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969361045@lists.php.net to get a copy of this message | ||
iliaa Thu May 27 17:31:19 2004 EDT
Modified files:
/livedocs xml_classes5.php
Log:
Eliminate count() usage. This strips out another 100 function calls for
every generated page.
http://cvs.php.net/diff.php/livedocs/xml_classes5.php?r1=1.7&r2=1.8&ty=u
Index: livedocs/xml_classes5.php
diff -u livedocs/xml_classes5.php:1.7 livedocs/xml_classes5.php:1.8
--- livedocs/xml_classes5.php:1.7 Wed May 26 12:25:42 2004
+++ livedocs/xml_classes5.php Thu May 27 17:31:19 2004
@@ -19,7 +19,7 @@
// | PHP 5 style |
// +----------------------------------------------------------------------+
//
-// $Id: xml_classes5.php,v 1.7 2004/05/26 16:25:42 iliaa Exp $
+// $Id: xml_classes5.php,v 1.8 2004/05/27 21:31:19 iliaa Exp $
class Node { /* {{{ */
@@ -143,7 +143,7 @@
function compress()
{
- if (count($this->children) == 1 && $this->children[0]->tagname == '')
{
+ if ((isset($this->children[0]) && !isset($this->children[1])) &&
$this->children[0]->tagname == '') {
$this->content = $this->children[0]->content;
$this->children = array();
}