Re: [PHP] should basic data validation go outside a function or inside?

2004-11-11 Thread Sebastian Mendel
Brad Pauly wrote: should basic data validation come before a function call or be performed within the function? I would do the validation inside the function. This avoids repeating the validation everywhere the function is called. It also makes the function more self-contained. It expects a

[PHP] should basic data validation go outside a function or inside?

2004-11-10 Thread Chris W. Parker
hi. call me stupid but i can't decide which option is better (actually don't call me stupid because it will hurt my feelings and i might cry). and having said that, maybe neither option is better than the other? whatever the answer, i just want some outside input on this because for some reason

Re: [PHP] should basic data validation go outside a function or inside?

2004-11-10 Thread Greg Donald
On Wed, 10 Nov 2004 11:00:12 -0800, Chris W. Parker [EMAIL PROTECTED] wrote: should basic data validation come before a function call or be performed within the function? advice type=record status=b0rken value=Benchmark them both and see which way is faster. then post back and tell us. :) /

Re: [PHP] should basic data validation go outside a function or inside?

2004-11-10 Thread Brad Pauly
On Wed, 10 Nov 2004 11:00:12 -0800, Chris W. Parker [EMAIL PROTECTED] wrote: hi. call me stupid but i can't decide which option is better (actually don't call me stupid because it will hurt my feelings and i might cry). and having said that, maybe neither option is better than the other?