For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > May 2004 > cvs: livedocs / xml_classes5.php









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: livedocs / xml_classes5.php
Ilia Alshanetsky

2004-05-27, 6:32 pm

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/livedoc...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();
}
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com