RE: [PHP] Exceptions and builtin functions in PHP5

2004-04-08 Thread Hundiak, Arthur
Builtin functions in php5 will not throw exceptions.  The basic idea is that
exceptions are part of the OOP portion of PHP.  What you will need to do is
to wrap these functions into classes.  Fortunately, many existing class
libraries such as PEAR can be tweaked to throw exceptions with little or no
effort.

I want to write:
...
$res = some_builtin_func(); // func raises exception on error
...

So will PHP5 (or future versions) work as in my 2nd example?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] smarty

2004-04-08 Thread Hundiak, Arthur

 From: John W. Holmes
Smarty has two benefits to using a PHP templating solution (imo)

1. Smarty forces you to keep the presentation layer separate from your
code/business layer.
2. Caching

IMHO, a critical reason for choosing a template language over PHP is
security.  Do you really want to give your template designers complete
access to your databases?  Especially if customers have the ability to
modify the templates themselves.

I personally feel Smarty is too powerful but fortunately there are dozens of
php template systems out there.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] xml_set_default_handler under php5

2004-04-06 Thread Hundiak, Arthur
I can't seem to get xml_set_default_handler to work under php5RC1.

I made a very simple test case but the handler just does not seemed to be
getting called.  It works under 4.3.4.

I gather the xml_ routines now use libxml2 instead of expat.  I have libxml2
2.6.5 which is pretty recent.

Anyone else having problems with xml_set_default_handler?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php