Re: PHP Form (aka:Re: [PHP] Can any one spot the Parse error Here)
| From: | Michael Kimsal | Date: | Sun, 01 Jul 2001 16:22:27 +0000 |
| Subject: | Re: PHP Form (aka:Re: [PHP] Can any one spot the Parse error Here) | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-55857@lists.php.net to get a copy of this message | ||
Andrew Halliday wrote:
Ive coded in both PHP and ASP and in both OO and function oriented. Ultimately, i find functionally oriented PHP to be the best ... what do other people think?As much classes/objects as possible, imo. 'functions' by themselves are OK for smaller stuff, but when you start getting larger projects, and need to make changes - heaven help you, unless you're smart enough to have made most/all of your parameters passed into the functions into one big array. having multiple function calls in various places like $x = calculateFreight($sku,$state) when you then need to add 'weight' as a parameter is a pain. It's more of a pain if I have to remember what order the parameters go in - I have to do $x = calculateFreight($sku,$state,$weight); not $x = calculateFreight($sku,$weight,$state); else my function will be problematic. Being able to do something like $x = new item(); $x->weight= 1; $x->state = 2; $x->sku = 3; $x->calculateFreight(); without worrying about the order of the parameters helps a lot, imo. To each his own tho. ---------------------------------------------------------------------- Michael Kimsal PHP training courses http://www.tapinternet.com/php 734-480-9961