Re: Re: Compatibility problems with PHP 5

From: Date: Thu, 27 Nov 2003 11:52:51 +0000
Subject: Re: Re: Compatibility problems with PHP 5
References: 1 2  Groups: php.internals php.qa 
Request: Send a blank email to internals+get-5752@lists.php.net to get a copy of this message
Hello Derick, Thursday, November 27, 2003, 11:54:07 AM, you wrote: > Hey, > On Wed, 26 Nov 2003, Andi Gutmans wrote: >> Now that we're at a very advanced stage and the code freeze is coming up, I >> think it'd be a good idea to start running some PHP 4 applications on PHP 5 >> and see how easy things go. I'm sure we'll bump into some issues and many >> of them might be solvable (using the already existing compatibility mode >> for object cloning or by other means). > There is one major problem that I see at this moment, and that is the > problem with shutdown order and destructors. > Problem 1: > extension=mysql.so [...] Since about three month i have a patch to fix this. The latest update can be found here: http://marcus-boerger.de/php/ext/ze2/ze2-shutdown-20031002.diff.txt Tell me if it doesn't apply then i'll update it. What it basically does is destructing the zval's in correct order. The old algorythm had a magnitude of O(n) while the new one has a magnitude of O(n*log(n)) while it should have a normal runtime of N(n) in most cases too. Maybe it is a little bit slower so that runtime could be written as N(n*c) with 1 < c < 1.1. Since we never cared about shutdown time this should be ok anyways. Also the inner loop breaks at a mximum of 64 where its minimum depends on the outer loop. That means that in worst case scenarios that the algorythmn can't solve a few variables take more time then the rest but at least they are freed anyway. -- Best regards, Marcus mailto:helly@php.net

« previous php.internals (#5752) next »