Re: [PHP] PHP4 vs PHP5 overrides

2011-03-16 Thread Tom Robinson
It's funny how talking or writing about something uncovers things you didn't see before. In an effort to tidy up the code I heeded the original implementors comments and made the methods private (they were previously undeclared). Making them public seems to have fixed the problem. On 17/03/11 13:

Re: [PHP] PHP4 vs PHP5 overrides

2011-03-16 Thread Tom Robinson
My apologies. I've not seen something I should have earlier. Also the instance that is behind all of this is and instance of ActiveRecordFormClass. So, in PHP4, the correct overridden method is called: ActiveRecordFormClass::_dispatchSave(). In PHP5, the FormClass::_dispatchSave() is called...???

Re: [PHP] PHP4 vs PHP5 classes

2008-07-29 Thread Robert Cummings
On Wed, 2008-07-30 at 01:16 -0500, Larry Garfield wrote: > On Wednesday 30 July 2008 12:44:46 am Robert Cummings wrote: > > > It's unfortunate that PHP5 decided to throw a Strict Standards exception > > when you include both style constructors. For instance, I'm certain at > > one point the follow

Re: [PHP] PHP4 vs PHP5 classes

2008-07-29 Thread Larry Garfield
On Wednesday 30 July 2008 12:44:46 am Robert Cummings wrote: > It's unfortunate that PHP5 decided to throw a Strict Standards exception > when you include both style constructors. For instance, I'm certain at > one point the following was recommended: > > class Foo > { > function __construct(

Re: [PHP] PHP4 vs PHP5 classes

2008-07-29 Thread Robert Cummings
On Tue, 2008-07-29 at 22:26 -0700, Jim Lucas wrote: > Chris wrote: > >> Don't forget that in PHP5, the constructor named has changed. In PHP4 > >> it called a method with the same name as the class. But, in PHP5, it > >> looks for __construct() instead. > > > > If __construct doesn't exist then

Re: [PHP] PHP4 vs PHP5 classes

2008-07-29 Thread Jim Lucas
Chris wrote: Don't forget that in PHP5, the constructor named has changed. In PHP4 it called a method with the same name as the class. But, in PHP5, it looks for __construct() instead. If __construct doesn't exist then it falls back to the php4 way - makes it backwards compatible :) But, i

Re: [PHP] PHP4 vs PHP5 classes

2008-07-29 Thread Chris
> Don't forget that in PHP5, the constructor named has changed. In PHP4 > it called a method with the same name as the class. But, in PHP5, it > looks for __construct() instead. If __construct doesn't exist then it falls back to the php4 way - makes it backwards compatible :) -- Postgresql &

Re: [PHP] PHP4 vs PHP5 classes

2008-07-29 Thread Jim Lucas
[EMAIL PROTECTED] wrote: Maybe setting $this->max should be done in fetchSelectData since that's what is causing/creating your loop. Thanks Chris, I copied the code into the fetchSelectData function and it seems to be working fine now! Just need to test removing the code from the constructor

Re: [PHP] PHP4 vs PHP5 classes

2008-07-29 Thread Chris
[EMAIL PROTECTED] wrote: >>> The $players object is created before the loop: >>> $players = new Players($lid); >> >> >> Which means the code is only executed once since it's in the >> constructor. It's not changing per loop because you're not calling the >> code. >> >> Maybe setting $this->max sho

Re: [PHP] PHP4 vs PHP5 classes

2008-07-29 Thread jeff . mills
> Maybe setting $this->max should be done in > > fetchSelectData > > since that's what is causing/creating your loop. > Thanks Chris, I copied the code into the fetchSelectData function and it seems to be working fine now! Just need to test removing the code from the constructor to make sure its

Re: [PHP] PHP4 vs PHP5 classes

2008-07-28 Thread jeff . mills
>> >> The $players object is created before the loop: >> $players = new Players($lid); > > > > Which means the code is only executed once since it's in the > constructor. It's not changing per loop because you're not calling the > code. > > Maybe setting $this->max should be done in > > fetchSele

Re: [PHP] PHP4 vs PHP5 classes

2008-07-28 Thread Chris
[EMAIL PROTECTED] wrote: >> Since the Players method is a constructor, it's more about how you set >> the object(s) up. >> >> What does the loop look like before you create a new object? >> > > Well see here is where it gets messy! This is not my code - I've ported a > phpnuke module over to drago

Re: [PHP] PHP4 vs PHP5 classes

2008-07-28 Thread jeff . mills
> > Since the Players method is a constructor, it's more about how you set > the object(s) up. > > What does the loop look like before you create a new object? > Well see here is where it gets messy! This is not my code - I've ported a phpnuke module over to dragonflycms. The $players object is

Re: [PHP] PHP4 vs PHP5 classes

2008-07-28 Thread Chris
> I have run through the script with a debugger, and sure > enough, we only enter function Players once. > > Is this normal behaviour for PHP5 vs PHP4? > Is there a way for me to force $this->max to be calculated each time > function max is called? Since the Players method is a constructor, it's

Re: [PHP] PHP4 vs PHP5 Memcache compatibility issue

2008-06-26 Thread Richard Heyes
Bob Fisher wrote: I am running a hybrid environment. Box A: PHP 4.3.9 Box B: PHP 5.1.6 Box C: Memcached 1.2.2 When I set a key in memcache(Box C) from Box A, I am unable to read it from Box B and vice versa. I did not see any such issues mentioned in the PHP documentation. Has anyone seen s

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-27 Thread Nathan Nobbe
Stut wrote: > Just wanted to pick you up on this. PHP is the only language you've > listed that only has a single implementation. There are implementations > of C++ compilers that are writting in other languages. I can't speak for > Java since I have little experience but I'd be surprised if all >

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-26 Thread Richard Lynch
On Sat, August 25, 2007 11:56 am, Nathan Nobbe wrote: > so we would really have to > dig deeper for a definition of 'basic oop' / 'true oop' etc. I'll consider PHP true OOP when PECL has a Lisp extension for me to write REAL oop code :-) Actually, that could be a kind of fun extension to write...

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-26 Thread Richard Lynch
On Sat, August 25, 2007 9:45 am, Robert Cummings wrote: > PHP4 AND PHP5 developers don't even use OOP. Tell me what is > compelling > in PHP5 that doesn't rely on you being an OOP developer? The XML stuff, if you need to parse XML a lot, which is not exactly a niche market, but not everybody needs

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-26 Thread Richard Lynch
On Fri, August 24, 2007 10:11 am, Steve Brown wrote: > > > PHP Web Server Test > > > > > phpinfo(), which should never be called in a production setting, is quite possibly the worst benchmark function you could choose. :-) :-) :-) > I ran ab in a loop 12 times with 10,000 connections an

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-26 Thread Stut
Nathan Nobbe wrote: look at C++, Java, and PHP. these languages are all written in C; Just wanted to pick you up on this. PHP is the only language you've listed that only has a single implementation. There are implementations of C++ compilers that are writting in other languages. I can't spe

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Robert Cummings
On Sat, 2007-08-25 at 14:26 -0500, Larry Garfield wrote: > On Saturday 25 August 2007, Nathan Nobbe wrote: > > i dont know what all this goPHP5 stuff is about. > > all i know is there was an announcment on php.net a few weeks back saying > > php4 is deprecated and it soon will be made obsolete. > >

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Larry Garfield
On Saturday 25 August 2007, Nathan Nobbe wrote: > i dont know what all this goPHP5 stuff is about. > all i know is there was an announcment on php.net a few weeks back saying > php4 is deprecated and it soon will be made obsolete. > > -nathan That announcement came a week after this site launched:

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Nathan Nobbe
i dont know what all this goPHP5 stuff is about. all i know is there was an announcment on php.net a few weeks back saying php4 is deprecated and it soon will be made obsolete. -nathan On 8/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Sat, 2007-08-25 at 12:28 -0500, Larry Garfield wro

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Robert Cummings
On Sat, 2007-08-25 at 12:28 -0500, Larry Garfield wrote: > Robert and everyone: PLEASE do not reply to list AND the sender, at least not > when I'm the sender. I don't need double copies of every message in every > thread I participate in. Thanks. Sorry I've been hitting reply-all since I firs

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Larry Garfield
Robert and everyone: PLEASE do not reply to list AND the sender, at least not when I'm the sender. I don't need double copies of every message in every thread I participate in. Thanks. On Saturday 25 August 2007, Robert Cummings wrote: > > There is no way to respond to the above request, beca

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Nathan Nobbe
i know this thread started off about a performance comparison, but it is already grown into much more. suffice it to say that i consider the oop capacity of php4 nothing more than a stepping stone on the way to php5. i dont know of all the oop languages out there. mostly i have worked w/ c++ and

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Robert Cummings
On Sat, 2007-08-25 at 11:09 -0500, Larry Garfield wrote: > On Saturday 25 August 2007, Robert Cummings wrote: > > > Rewriting? You're assuming developers of PHP4 are using all of the > > features in PHP5 but written using PHP4 code. That's not a very valid > > assumption. You're also assuming they

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Larry Garfield
On Saturday 25 August 2007, Robert Cummings wrote: > Rewriting? You're assuming developers of PHP4 are using all of the > features in PHP5 but written using PHP4 code. That's not a very valid > assumption. You're also assuming they didn't already have code written > in PHP4 that was then duplicate

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Nathan Nobbe
agreed :) On 8/25/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Sat, 2007-08-25 at 10:57 -0400, Nathan Nobbe wrote: > > Robert, > > > > C is a low-level language whereas php is a high level language. > > ill admit it openly, i am biased toward oop / design patterns. > > and i think what i

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Robert Cummings
On Sat, 2007-08-25 at 10:57 -0400, Nathan Nobbe wrote: > Robert, > > C is a low-level language whereas php is a high level language. > ill admit it openly, i am biased toward oop / design patterns. > and i think what i boils down to is what you view as 'icing' > i view as 'bread-and-butter' ;) I'

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Nathan Nobbe
Robert, C is a low-level language whereas php is a high level language. ill admit it openly, i am biased toward oop / design patterns. and i think what i boils down to is what you view as 'icing' i view as 'bread-and-butter' ;) personally i shudder when i see a big pile of usntructured code, or a

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Robert Cummings
On Sat, 2007-08-25 at 10:33 -0400, Nathan Nobbe wrote: > yes, i agree, people wont be all-of-a-sudden ignoring php4, but the > notice on php.net says to migrate apps to 5 through the rest of the > yaer. id say thats ample time to move away from it. Migrate doesn't necessarily mean ditching PHP4 c

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Nathan Nobbe
yes, i agree, people wont be all-of-a-sudden ignoring php4, but the notice on php.net says to migrate apps to 5 through the rest of the yaer. id say thats ample time to move away from it. pretty much all of my applications rely on php5 features except those where the system was running on php4 whe

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Robert Cummings
On Sat, 2007-08-25 at 09:38 -0400, Nathan Nobbe wrote: > i dont know Robert; i think it depends upon the structure of ones > business. > for instance; i work for a company full time, and have a start up of > my own. > in both of those situations there is no impact on the client in the > act of > e

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-25 Thread Nathan Nobbe
i dont know Robert; i think it depends upon the structure of ones business. for instance; i work for a company full time, and have a start up of my own. in both of those situations there is no impact on the client in the act of eliminating php4 from the product implementation. the clients never us

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-24 Thread Robert Cummings
On Sat, 2007-08-25 at 00:28 -0500, Larry Garfield wrote: > On Friday 24 August 2007, Lester Caine wrote: > > > What would be interesting is if a group picked up PHP4 and kept going > > > with it in spite of the end of life announcement a few weeks back. I > > > wonder if the PHP license would allo

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-24 Thread Larry Garfield
On Friday 24 August 2007, Lester Caine wrote: > > What would be interesting is if a group picked up PHP4 and kept going > > with it in spite of the end of life announcement a few weeks back. I > > wonder if the PHP license would allow such a thing. How open is it > > exactly? > > The PROBLEM is t

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-24 Thread Lester Caine
Greg Donald wrote: On 8/24/07, Steve Brown <[EMAIL PROTECTED]> wrote: The only difference I can figure is that PHP5 was the packaged version that comes with Ubuntu and I had to compile PHP4 from source since there is no package for it in Feisty. But I wouldn't expect a 50% increase as a result o

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-24 Thread Robert Cummings
On Fri, 2007-08-24 at 12:24 -0500, Greg Donald wrote: > On 8/24/07, Steve Brown <[EMAIL PROTECTED]> wrote: > > The only difference I can figure is that PHP5 was the packaged version > > that comes with Ubuntu and I had to compile PHP4 from source since > > there is no package for it in Feisty. But

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-24 Thread Greg Donald
On 8/24/07, Steve Brown <[EMAIL PROTECTED]> wrote: > The only difference I can figure is that PHP5 was the packaged version > that comes with Ubuntu and I had to compile PHP4 from source since > there is no package for it in Feisty. But I wouldn't expect a 50% > increase as a result of that. Any t

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-24 Thread Robert Cummings
PHP5 being faster than PHP4 is greatly dependent on what features you use. I've consistently found PHP4 to be faster for my purposes also. Cheers, Rob. On Fri, 2007-08-24 at 11:38 -0400, Nathan Nobbe wrote: > what are the changes that supposedly make php5 faster than php4? > > when java went fr

Re: [PHP] PHP4 vs PHP5 Performance?

2007-08-24 Thread Nathan Nobbe
what are the changes that supposedly make php5 faster than php4? when java went from the 1.4 series to the 5 series it became much faster. this is because of enhancements to the jitter mechanism for sure. i dont know what else they changed, but i know that had a great impact on the performance.

Re: [PHP] PHP4 vs PHP5

2007-04-07 Thread Travis Doherty
Myron Turner wrote: > Travis Doherty wrote: > >>> >> >> What about the argument that PHP4 is dead. It's done. It's over. >> There is no reason anyone should be using it, less perhaps a lack of >> time to tweak scripts for an upgrade from 4 to 5. Even if that is the >> case, get to work :p

Re: [PHP] PHP4 vs PHP5

2007-04-07 Thread Myron Turner
Travis Doherty wrote: What about the argument that PHP4 is dead. It's done. It's over. There is no reason anyone should be using it, less perhaps a lack of time to tweak scripts for an upgrade from 4 to 5. Even if that is the case, get to work :p "Support for PHP 4 will be dropped at th

Re: [PHP] PHP4 vs PHP5

2007-04-07 Thread Travis Doherty
Fernando Cosso wrote: > Hi > I know this topic has to be discussed several times but I have a > situation I > need some advices. > > I am working in a small company. The company does everything you need. > Computer service, sell computers, install servers, web page, etc. I am in > the web departme

Re: [PHP] php4 vs. php5

2006-02-02 Thread Richard Lynch
On Thu, February 2, 2006 1:18 pm, Grae Wolfe - PHP wrote: > Hey there... I am setting up a new test server for one of my clients > to > use, and I am curious if there is a reason to go with php4.xx over > php5.xx, > or the other way around. I would think that I would want to go with > the > newes

RE: [PHP] php4 vs. php5

2006-02-02 Thread Programmer
The only complaint I have with 5 is that the mysql libraries are not bundled with the new version. However, there are a lot of third party bundles such as apache friends. Jeremy Schreckhise -Original Message- From: Grae Wolfe - PHP [mailto:[EMAIL PROTECTED] Sent: Thursday, February 02,

RE: [PHP] php4 vs. php5

2006-02-02 Thread Jim Moseby
> Hey there... I am setting up a new test server for one of my > clients to > use, and I am curious if there is a reason to go with php4.xx > over php5.xx, > or the other way around. I would think that I would want to > go with the > newest one, but my client requested that 4.xx be installe

Re: [PHP] PHP4 vs PHP5

2006-01-07 Thread Drew Butler
A simplified version of this would be: $glb_http_ref = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : ""; or just: $glb_http_ref = @$_SERVER['HTTP_REFERER']; The latter will suppress the error message and return a null (or a blank as far as PHP is concerned. Not the cleanest route

Re: [PHP] PHP4 vs PHP5

2006-01-07 Thread Gerry Danen
On 1/7/06, Kevin Waterson <[EMAIL PROTECTED]> wrote: > > This one time, at band camp, Gerry Danen <[EMAIL PROTECTED]> wrote: > > > I'm wondering if $_SERVER['HTTP_REFERER'] is no longer supported, or > perhaps > > has a new name? > > still there, same name. > > print_r($_SERVER); Ah, yes. It's th

Re: [PHP] PHP4 vs PHP5

2006-01-07 Thread Gerry Danen
Kevin, [client 192.168.0.2] PHP Notice: Undefined index: HTTP_REFERER in /home/arls_lilies_test/html/include_db/db_connect.php on line 67 is what shows in the error log... The actual code is $glb_http_ref = $_SERVER['HTTP_REFERER']; Gerry On 1/7/06, Kevin Waterson <[EMAIL PROTECTED]> wro

Re: [PHP] PHP4 vs PHP5

2006-01-07 Thread Kevin Waterson
This one time, at band camp, Gerry Danen <[EMAIL PROTECTED]> wrote: > I'm wondering if $_SERVER['HTTP_REFERER'] is no longer supported, or perhaps > has a new name? still there, same name. print_r($_SERVER); Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Lib

Re: [PHP] PHP4 vs. PHP5 test case for objects question.....

2004-02-17 Thread Adam Bregenzer
Richard, On Tue, 2004-02-17 at 19:25, Richard Gintz wrote: > Using the exact same code, I created 50 objects. It took twice as > long in php5 as it did in the older php4. >From what I remember the speed improvement with objects in PHP 5 was that they would be passed by reference, which I under

RE: [PHP] php4 vs php5

2003-07-24 Thread Edward Peloke
some more good php5 info... http://www.phparch.com/news/343 -Original Message- From: Robert Janeczek [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 7:16 AM To: [EMAIL PROTECTED] Subject: [PHP] php4 vs php5 hi, i`m working on presentation of php5 features and i would like to add

Re: [PHP] php4 vs php5

2003-07-24 Thread Curt Zirzow
* Thus wrote Robert Janeczek ([EMAIL PROTECTED]): > hi, i`m working on presentation of php5 features and i would like to add > some comparison between php4 and php5. new coding features are of course > available in doc on php.net, but i`m wondering where can i find benchmarks > that show speed diff