> Ok, so I'll use your method.  By the way, there was nothing inherent in the
> two places you used 'inherent', on this topic :)

    php_html_puts is simple, consistent and easy to follow.
    These are its essential characteristics, and thus they are
    inherent.  But I digress.

> Again, I fail to understand the logic behind it.  I'll change the space
> handling code to your method (which is indeed nicer);  Why on earth would
> we need to have a stupid HTML printout function as a function pointer?

    If you would also address the two performance aspects I
    mentioned earlier, I would divert from my current stance that
    php_html_puts should be used further.

    Oh, wait and there is a third issue I did not think of
    earlier.

    Because zend_html_puts does not convert the whole string and
    calls ZEND_PUTC/_PUTS for each token, not only does that
    cause a TSRMLS_FETCH for every token, it also adds a jump
    over an indirect function pointer each time (zend_write).
    Thousands of such calls can easily add up and introduce a
    significant and in this case unnecessary overhead.

    php_html_puts can avoid this, because it knows about
    PHPWRITE and calls it only once per string, instead of
    a few dozen times.

    The last point cannot be easily addressed other than by
    supporting a redefinition of zend_html_puts by the
    application.

    - Sascha                                     Experience IRCG
      http://schumann.cx/                http://schumann.cx/ircg


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to