Re: Validate package
| From: | Pierre-Alain Joye | Date: | Fri, 05 Nov 2004 17:34:04 +0000 |
| Subject: | Re: Validate package | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-34212@lists.php.net to get a copy of this message | ||
On Fri, 05 Nov 2004 09:05:52 +0100
lsmith@php.net (Lukas Smith) wrote:
> Norbert Mocsnik wrote:
> > Hi devs,
> >
> > Did anyone ever think of splitting the Validate
> > package into multiple files to avoid including
> > 700+ lines of code with 10+ functions when only
> > validating a string or e-mail address?
> >
> > Are there any drawbacks of splitting it
> > (besides a possible BC-break?)
>
> Yes there is the problem if file I/O. Its quite expensive. AFAIK
> its still a significant cost if you use the bytecode cache.
> However the 700 lines are a non-issues if you use a bytecode
> cache.
And the counter part is that you will include 10 files when you will
check more datas...
The only thing I would like to split is the locale validations (DE,
AT, CH,...). That will make the life easier for everyone, and the
main package will remain with what it owns now (text, date, mail,
uri,...).
Regards,
--Pierre