[PHP] functions classes

2006-08-25 Thread Bigmark
Can anyone tell me if it is relatively an easy process for an experienced coder (not me) to convert a php script to mainly functions/classes. I have my own script that i would like to make more streamlined as it is becoming very difficult to work with. -- PHP General Mailing List (http://www.php.

RE: [PHP] functions classes

2006-08-25 Thread Peter Lauri
: php-general@lists.php.net Subject: [PHP] functions classes Can anyone tell me if it is relatively an easy process for an experienced coder (not me) to convert a php script to mainly functions/classes. I have my own script that i would like to make more streamlined as it is becoming very difficult to

Re: [PHP] functions classes

2006-08-25 Thread Dave Goodchild
On 25/08/06, Peter Lauri <[EMAIL PROTECTED]> wrote: It should not be to big of a problem if you can set your mind into thinking about functions and objects instead of a step by step script. Then just cut it in pieces and your are done :) Agreed. If it puts you on the good foot, send an extrac

Re: [PHP] functions classes

2006-08-25 Thread Larry Garfield
On Friday 25 August 2006 04:39, Bigmark wrote: > Can anyone tell me if it is relatively an easy process for an experienced > coder (not me) to convert a php script to mainly functions/classes. > I have my own script that i would like to make more streamlined as it is > becoming very difficult to wo

Re: [PHP] functions classes

2006-08-26 Thread Alex Turner
Larry, I have hit similar global names space issues in the past and it is a pain in the behind! One remedial method that can get it stable enough to start to work on is to stick the whole messy lot into classes (NOT OBJECTS!) and then the global name space becomes the local namespace (ie $My

[PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Alex Turner
I don't know what I was on when I wrote the previous post! In php you cannot create static class variables in this way (doh) or at least I never have managed. So when faced the this problem I replace what in C++ would be a class variable with a class function comme ca: class MyClass { f

Re: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Robert Cummings
On Sat, 2006-08-26 at 12:49 +0100, Alex Turner wrote: > I don't know what I was on when I wrote the previous post! > > In php you cannot create static class variables in this way (doh) or at > least I never have managed. So when faced the this problem I replace > what in C++ would be a class va

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Robert Cummings
On Sat, 2006-08-26 at 16:51 +0100, Alex Turner wrote: > Rob, > > I'd go along with the setting a var to null issue (in the cases > I have worked so far on, there has not been a need to set variables > to null). Maybe so, but if a variable ever happens to contain null and you're not aware of it,

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Alex Turner
ge- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: 26 August 2006 17:25 To: Alex Turner Cc: php-general@lists.php.net Subject: RE: [PHP] Brain Death - [PHP] functions classes On Sat, 2006-08-26 at 16:51 +0100, Alex Turner wrote: > Rob, > > I'd go along with the setting a v

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Alex Turner
6 August 2006 16:42 To: Alex Turner Cc: php-general@lists.php.net Subject: Re: [PHP] Brain Death - [PHP] functions classes On Sat, 2006-08-26 at 12:49 +0100, Alex Turner wrote: > I don't know what I was on when I wrote the previous post! > > In php you cannot create static class variable

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread tedd
At 4:51 PM +0100 8/26/06, Alex Turner wrote: And to be very pedantic - as null does not have a type then actually 'x === null' should evaluate to absurdity, but PHP is more pragmatic than that ;-) That's a very good point. While one NULL variable in php can be compared to another NULL variab

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Robert Cummings
On Sat, 2006-08-26 at 12:41 -0400, tedd wrote: > At 4:51 PM +0100 8/26/06, Alex Turner wrote: > >And to be very pedantic - as null does not have a type then actually > >'x === null' should evaluate to absurdity, but PHP is more pragmatic > >than that ;-) > > That's a very good point. > > While

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread tedd
At 2:30 PM -0400 8/26/06, Robert Cummings wrote: On Sat, 2006-08-26 at 12:41 -0400, tedd wrote: > At 4:51 PM +0100 8/26/06, Alex Turner wrote: >And to be very pedantic - as null does not have a type then actually > >'x === null' should evaluate to absurdity, but PHP is more pragmatic >than

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Robert Cummings
On Sat, 2006-08-26 at 14:23 -0400, tedd wrote: > At 2:30 PM -0400 8/26/06, Robert Cummings wrote: > >On Sat, 2006-08-26 at 12:41 -0400, tedd wrote: > > > At 4:51 PM +0100 8/26/06, Alex Turner wrote: > >> >And to be very pedantic - as null does not have a type then actually > > > >'x === null' sh

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Alex Turner
26 August 2006 19:24 To: Robert Cummings; tedd Cc: Alex Turner; php-general@lists.php.net Subject: RE: [PHP] Brain Death - [PHP] functions classes At 2:30 PM -0400 8/26/06, Robert Cummings wrote: >On Sat, 2006-08-26 at 12:41 -0400, tedd wrote: > > At 4:51 PM +0100 8/26/06, Alex Turner wro

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread Robert Cummings
On Sat, 2006-08-26 at 15:38 -0400, tedd wrote: > At 3:04 PM -0400 8/26/06, Robert Cummings wrote: > >On Sat, 2006-08-26 at 14:23 -0400, tedd wrote: > > > > > Besides, what Alex Turner said about NULL is correct -- it's absurd > >> to have NULL evaluate to anything. Just because one language allow

RE: [PHP] Brain Death - [PHP] functions classes

2006-08-26 Thread tedd
At 3:04 PM -0400 8/26/06, Robert Cummings wrote: On Sat, 2006-08-26 at 14:23 -0400, tedd wrote: > Besides, what Alex Turner said about NULL is correct -- it's absurd to have NULL evaluate to anything. Just because one language allows absurdity doesn't mean you have to practice it. One lang