Hi,
Andreas Korthaus wrote:
Lukas Smith wrote:
I dont see a pressing need for an OO API and I also dont think that
PHP internal API's should one by one be moved over to an OO interface
either.
IMO date is a very good example where a nice OO API is very useful -
particularly for people with advanced needs of date/timezone support.
an example:
$date_obj = date date_create();
date_timezone_set($date_obj, $timezone_obj);
vs.:
$date = new date;
$date->setTimezone($timezone_obj);
From my side it also about flexibility. The OO-Version is more flexible
because you can derive your own class based on the internal date-class
and provide additional features; not possible without it.
- Markus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php