Re: [PHP-DEV] Re: isset and unset behaviour

2004-06-18 Thread Curt Zirzow
* Thus wrote Sara Golemon:
> > Although a double value isn't a valid array index, it doesn't seem
> > to be consistent.  I'm thinking that the code should yeild one of
> > two results:
> >
> >   1. Issue warning as with using objects or arrays as keys
> >   2. unset uses the str.val to retrieve the proper index.
> >
> > Any thoughts on the proper behaviour?
> >
> There was a typo in Zend/zend_execute.c.
> 
> doubles used as indexes were being converted from the lval property of the
> zval rather than the dval property.
> This is similar to a bug that got patched about a month ago:   $a[3.0]  = 1;
> acts like $a[0] = 1;just in a different spot.
> 
> Fixed now.

so I'm taking that as double's are allowed, so the documentation
need's to reflect that, since it currently says integers or strings
are only allowed.

correct?

And if so is this a php5 thing only or php4 also?

Thanks for fixing that!

Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] The open letter to Derick Rethans

2004-06-18 Thread Andi Gutmans
At 12:43 PM 6/18/2004 -0700, Andrei Zmievski wrote:
On Fri, 18 Jun 2004, Andi Gutmans wrote:
> Don't think that's a good idea. I suggest to wait for another 2 weeks or
> so, then release 5.0.0 and create a 5_0 branch for bug fix releases and 
5_1
> for bigger changes.
> BTW, Zeev suggested 4th of July for a release date. I think that's nice
> timing. Anyone object? (maybe the French? :)

Why not July 1?
Works too :)
Any volunteers to try and make php.net run with PHP 5? I'm on vacation 
right now (and I shouldn't be reading email if my wife had a say :)

Andi
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] The open letter to Derick Rethans

2004-06-18 Thread Andi Gutmans
At 11:37 PM 6/18/2004 +0200, Derick Rethans wrote:
On Fri, 18 Jun 2004, Andi Gutmans wrote:
> Don't think that's a good idea. I suggest to wait for another 2 weeks or
> so, then release 5.0.0 and create a 5_0 branch for bug fix releases and 5_1
> for bigger changes.
erm, not again. HEAD is main development for 5.1 (read the archives :)
Yeah that's what I meant.
> BTW, Zeev suggested 4th of July for a release date. I think that's nice
> timing. Anyone object? (maybe the French? :)
Don't make PHP a pollitcal thing; I other words: I object too.
hehe OK. I don't really care. It wasn't meant to be political just a nice 
thing because it happens to be in July.

Andi
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] The open letter to Derick Rethans

2004-06-18 Thread Derick Rethans
On Fri, 18 Jun 2004, Andi Gutmans wrote:

> Don't think that's a good idea. I suggest to wait for another 2 weeks or
> so, then release 5.0.0 and create a 5_0 branch for bug fix releases and 5_1
> for bigger changes.

erm, not again. HEAD is main development for 5.1 (read the archives :)

> BTW, Zeev suggested 4th of July for a release date. I think that's nice
> timing. Anyone object? (maybe the French? :)

Don't make PHP a pollitcal thing; I other words: I object too.

regards,
Derick

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Java and $ (was: Re: [PHP-DEV] Re: ClassHints and NULL)

2004-06-18 Thread Timm Friebe
On Fri, 2004-06-18 at 21:43, Andrei Zmievski wrote:
[...]
> Wow. When did Java get $ for variables?

It already has:)

$ cat Dollar.java 
public class Dollar {
  public static void main(String[] args) {
String $str= "Hello";
System.out.println($str);
  }
}
$ /usr/local/jdk1.4.2/bin/javac Dollar.java
$ CLASSPATH="." /usr/local/jdk1.4.2/bin/java Dollar
Hello

- Timm

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: 64-bit bugsquash

2004-06-18 Thread Ard Biesheuvel
The problem with ints and longs is not their sizes, but the fact that 
people use them interchangeably, their sizes being equal coincidentally 
on 32-bit architectures.

Most of the bugs occur when pointers to these variables are passed as 
arguments to variadic functions like zend_parse_parameters(), which are 
not subject to pointer type checking by the compiler.

Sorry but this idea is out of question. The idea was always that PHP is 
64 bit capable as soon you run it on a 64 bit machine. Same for 128 bit 
Some data structures [like IPv4 addresses, for instance], are 32-bits 
regardless of the architecture, so some code needs its variable sizes to 
be defined explicitly. Defining intxx types might be useful in this 
respect, but it won't fix the problem mentioned before.

>> typedef __int8 zend_int8;
>> typedef __int16 zend_int16;
>> typedef __int32 zend_int32;
>> typedef __int64 zend_int64;
>> typedef unsigned __int8 zend_uint8;
>> typedef unsigned __int16 zend_uint16;
>> typedef unsigned __int32 zend_uint32;
>> typedef unsigned __int64 zend_uint64;
Arent't the __intxx types MSVC-only ?
--
Ard
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] The open letter to Derick Rethans

2004-06-18 Thread Daniel Convissor
On Fri, Jun 18, 2004 at 12:27:05PM -0700, Sterling Hughes wrote:
> 
> should take every opportunity we have to test it in a real world
> circumstance before releasing it onto the public.

Hear, hear!

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: ClassHints and NULL

2004-06-18 Thread Hans Lellelid
Andrei Zmievski wrote:
abstract class BasePeer {
 // ...
 public static function doDelete(Criteria $criteria, Connection $con) {
  // ...
 }
}
class AuthorPeer extends BasePeer {
 public static function doDelete(Criteria $criteria, $con = null) {
if ($con === null) {
   $con = Transaction::begin();
}
// ...
parent::doDelete($criteria, $con);
 }
}

Wow. When did Java get $ for variables?
Just about the same time that Apache Torque got ported to PHP5 ;)
Hans
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] The open letter to Derick Rethans

2004-06-18 Thread Andrei Zmievski
On Fri, 18 Jun 2004, Andi Gutmans wrote:
> Don't think that's a good idea. I suggest to wait for another 2 weeks or 
> so, then release 5.0.0 and create a 5_0 branch for bug fix releases and 5_1 
> for bigger changes.
> BTW, Zeev suggested 4th of July for a release date. I think that's nice 
> timing. Anyone object? (maybe the French? :)

Why not July 1?

- Andrei

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: ClassHints and NULL

2004-06-18 Thread Andrei Zmievski
On Fri, 18 Jun 2004, Hans Lellelid wrote:
> abstract class BasePeer {
> 
>   // ...
>   public static function doDelete(Criteria $criteria, Connection $con) {
>// ...
>   }
> 
> }
> 
> class AuthorPeer extends BasePeer {
> 
>   public static function doDelete(Criteria $criteria, $con = null) {
>  if ($con === null) {
> $con = Transaction::begin();
>  }
>  // ...
>  parent::doDelete($criteria, $con);
>   }
> }

Wow. When did Java get $ for variables?

- Andrei

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: ClassHints and NULL

2004-06-18 Thread Hans Lellelid
Hi Marcus,
Marcus Boerger wrote:
Hello Hans,
Friday, June 18, 2004, 9:15:47 PM, you wrote:
Of course, namespaces are more important than anything ;)

hehe, could you live with packages?

Probably! yeah :) -- what's the difference?  Are namespaces more like 
what's implement in C#/.NET (i.e. no necessary correspondence between 
namespace and actual assembly used to provide them) and packages 
something more like Java?  Forgive my ignorance & if there's already a 
thread on this, just say so :)

something alike but without inner classes (of course)
Well, in short, I'd be very strongly in favor of anything that would 
solve the name collision issues in PHP.  The current PEAR system of 
building classnames from catogires (HTML_Template_Flexy) is IMHO a huge 
& clumsy hack.  I think the lack of namespace support is the main 
(perhaps only) language barrier to packaging & distributing libraries.

I'm less concerned about packages (if that means Java-like systems of 
mapping namespace to filesystem), but if this solves the problem then 
great (!)

From reactions I've read from people using PHP5 now, namespaces is one 
thing that people are *really* hoping makes it into CVS for 5.1.  I'm 
certainly one of those people.

That's not to take away from the fact that everyone appreciates all the 
fine work you've done with PHP5.  I certainly do.

Cheers,
Hans
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Re: Re: [PHP-DEV] The open letter to Derick Rethans

2004-06-18 Thread Sterling Hughes
On Fri, 18 Jun 2004 21:04:36 +0200, Andi Gutmans <[EMAIL PROTECTED]> wrote:
> 
> I don't think having php.net run PHP 5 is a pre-requisite for a release.

What high traffic site is PHP5 RCx powering at the moment?
Where is PHP5 being stress tested?
How many people have deployed it for non-academic purposes?

Running php.net on PHP5 isn't about making php.net run better, its
about making PHP5 run better.  In the PHP4 days, as you remember, we
were running PHP4 on php.net since beta 1, why have we not switched to
php5 since beta 1?

I understand that deployment must come after the release for the
majority of sites out there, but that is all the more reason that we
should take every opportunity we have to test it in a real world
circumstance before releasing it onto the public.

-Sterling

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: ClassHints and NULL

2004-06-18 Thread Marcus Boerger
Hello Hans,

Friday, June 18, 2004, 9:15:47 PM, you wrote:
>>>Of course, namespaces are more important than anything ;)
>> 
>> 
>> hehe, could you live with packages?

> Probably! yeah :) -- what's the difference?  Are namespaces more like 
> what's implement in C#/.NET (i.e. no necessary correspondence between 
> namespace and actual assembly used to provide them) and packages 
> something more like Java?  Forgive my ignorance & if there's already a 
> thread on this, just say so :)

something alike but without inner classes (of course)

Best regards,
 Marcusmailto:[EMAIL PROTECTED]

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: ClassHints and NULL

2004-06-18 Thread Hans Lellelid
Marcus Boerger wrote:
Here is a slightly related example from my code [] -- and it
would be nice if I could use optional paramters w/ typehints.

IMO thats the only valid point you brought up here. Another thing missing
is that in derived classes the typehints should be able to accept
superclasses like the following patch does:
http://marcus-boerger.de/php/ext/ze2/ze2-type-hint-classes-20040327.diff.txt
[This patch may be a little bit outdated though :-) ]
Ok, well yes my message sorta morphed as I realized that the central 
problem was my subclasses with fewer params in method sig than the 
parent class.  But the optional typehinted params are very useful & glad 
that'll be revisited.

Of course, namespaces are more important than anything ;)

hehe, could you live with packages?
Probably! yeah :) -- what's the difference?  Are namespaces more like 
what's implement in C#/.NET (i.e. no necessary correspondence between 
namespace and actual assembly used to provide them) and packages 
something more like Java?  Forgive my ignorance & if there's already a 
thread on this, just say so :)

Thanks,
Hans
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] Re: isset and unset behaviour

2004-06-18 Thread Andi Gutmans
Yep, and thanks Sara for fixing it.
At 11:34 AM 6/18/2004 -0700, Sara Golemon wrote:
> Although a double value isn't a valid array index, it doesn't seem
> to be consistent.  I'm thinking that the code should yeild one of
> two results:
>
>   1. Issue warning as with using objects or arrays as keys
>   2. unset uses the str.val to retrieve the proper index.
>
> Any thoughts on the proper behaviour?
>
There was a typo in Zend/zend_execute.c.
doubles used as indexes were being converted from the lval property of the
zval rather than the dval property.
This is similar to a bug that got patched about a month ago:   $a[3.0]  = 1;
acts like $a[0] = 1;just in a different spot.
Fixed now.
-Sara
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Re: [PHP-DEV] The open letter to Derick Rethans

2004-06-18 Thread Andi Gutmans
I don't think having php.net run PHP 5 is a pre-requisite for a release.
That said, I think it'd be great if there'd be people willing to pitch in 
and work on trying to get it to work.
And I don't see any problem with php.net not running the latest 4.x version 
either. Most high-traffic websites don't upgrade every minor version and I 
don't think php.net should be different. If it works, why break it? (unless 
there's a security bug fix).

Andi
At 11:16 AM 6/18/2004 -0700, Sterling Hughes wrote:
% telnet www.php.net 80
Trying 64.246.30.37...
Connected to php.net.
Escape character is '^]'.
HEAD / HTTP/1.0
HTTP/1.1 301 Moved Permanently
Date: Fri, 18 Jun 2004 18:13:45 GMT
Server: Apache/1.3.26 (Unix) mod_gzip/1.3.26.1a PHP/4.3.3-dev
Location: http://www.php.net/
Connection: close
Content-Type: text/html; charset=iso-8859-1
--
% telnet www.zend.com 80
Trying 209.61.191.11...
Connected to www.zend.com.
Escape character is '^]'.
HEAD / HTTP/1.0
HTTP/1.1 200 OK
Date: Fri, 18 Jun 2004 18:14:38 GMT
Server: Apache/1.3.27 (Unix) PHP/4.3.7 mod_macro/1.1.1 mod_ssl/2.8.12 
OpenSSL/0.
9.6b
Set-Cookie: SaneID=68.120.96.254-1087582479359; path=/; expires=Fri, 
18-Jun-09 2
1:14:39 GMT
X-Powered-By: PHP/4.3.7
Set-Cookie: Zend_Session_DB=4a6d867cea6c870397399eb97c44a415; expires=Mon, 
21-Ju
n-2004 18:14:39 GMT; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: Zend_In=deleted; expires=Thu, 19-Jun-2003 18:14:38 GMT; path=/
Connection: close
Content-Type: text/html

--
Perhaps we should try running php.net and zend.com on php5 before we
release?  if we're not even eating our own dogfood yet, it seems
premature to release.
-sterling
On Fri, 18 Jun 2004 20:07:30 +0200, Andi Gutmans <[EMAIL PROTECTED]> wrote:
>
> Don't think that's a good idea. I suggest to wait for another 2 weeks or
> so, then release 5.0.0 and create a 5_0 branch for bug fix releases and 5_1
> for bigger changes.
> BTW, Zeev suggested 4th of July for a release date. I think that's nice
> timing. Anyone object? (maybe the French? :)
>
> Andi
>
>
> At 06:24 PM 6/18/2004 +0200, Sebastian Bergmann wrote:
> >Marcus Boerger wrote:
> >>Even i am holding back tons of patches right now to not disturb release
> >>process further :-)
> >
> >  Why not branch PHP 5.0 now and continue development in HEAD as PHP 5.1?
> >
> >--
> >Sebastian Bergmann
> >http://sebastian-bergmann.de/   http://phpOpenTracker.de/
> >
> >Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/
> >
> >--
> >PHP Internals - PHP Runtime Development Mailing List
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] Re: ClassHints and NULL

2004-06-18 Thread Marcus Boerger
Hello Hans,

Friday, June 18, 2004, 4:41:08 PM, you wrote:

> Hi,

> Marcus Boerger wrote:
>> Last but not least we know already that a lot of people like to
>> be able to handle both instanceof or null with typehints. But at
>> the moment we have no solution that can go into PHP 5.0. However
>> i am quite sure we will address this for 5.1.

> I'm glad this issue will be re-evaluated.  I think the loss of null 
> option is disappointing since it precludes optional params (which was 
> really the only place I was using it), but I also understand the reasoning.

gd :-)

> Here is a slightly related example from my code [] -- and it
> would be nice if I could use optional paramters w/ typehints.

IMO thats the only valid point you brought up here. Another thing missing
is that in derived classes the typehints should be able to accept
superclasses like the following patch does:
http://marcus-boerger.de/php/ext/ze2/ze2-type-hint-classes-20040327.diff.txt
[This patch may be a little bit outdated though :-) ]

> Of course, namespaces are more important than anything ;)

hehe, could you live with packages?

regards
marcus

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: isset and unset behaviour

2004-06-18 Thread Sara Golemon
> Although a double value isn't a valid array index, it doesn't seem
> to be consistent.  I'm thinking that the code should yeild one of
> two results:
>
>   1. Issue warning as with using objects or arrays as keys
>   2. unset uses the str.val to retrieve the proper index.
>
> Any thoughts on the proper behaviour?
>
There was a typo in Zend/zend_execute.c.

doubles used as indexes were being converted from the lval property of the
zval rather than the dval property.
This is similar to a bug that got patched about a month ago:   $a[3.0]  = 1;
acts like $a[0] = 1;just in a different spot.

Fixed now.

-Sara

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] The open letter to Derick Rethans

2004-06-18 Thread George Schlossnagle
On Jun 18, 2004, at 2:16 PM, Sterling Hughes wrote:
% telnet www.php.net 80
Trying 64.246.30.37...
Connected to php.net.
Escape character is '^]'.
HEAD / HTTP/1.0
HTTP/1.1 301 Moved Permanently
Date: Fri, 18 Jun 2004 18:13:45 GMT
Server: Apache/1.3.26 (Unix) mod_gzip/1.3.26.1a PHP/4.3.3-dev

  ^
Perhaps we should try running php.net and zend.com on php5 before we
release?  if we're not even eating our own dogfood yet, it seems
premature to release.
I think it's kinda quaint that php.net runs a development version 4 
point-releases behind current.

George
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Re: [PHP-DEV] The open letter to Derick Rethans

2004-06-18 Thread Sterling Hughes
% telnet www.php.net 80
Trying 64.246.30.37...
Connected to php.net.
Escape character is '^]'.
HEAD / HTTP/1.0

HTTP/1.1 301 Moved Permanently
Date: Fri, 18 Jun 2004 18:13:45 GMT
Server: Apache/1.3.26 (Unix) mod_gzip/1.3.26.1a PHP/4.3.3-dev
Location: http://www.php.net/
Connection: close
Content-Type: text/html; charset=iso-8859-1

--

% telnet www.zend.com 80
Trying 209.61.191.11...
Connected to www.zend.com.
Escape character is '^]'.
HEAD / HTTP/1.0

HTTP/1.1 200 OK
Date: Fri, 18 Jun 2004 18:14:38 GMT
Server: Apache/1.3.27 (Unix) PHP/4.3.7 mod_macro/1.1.1 mod_ssl/2.8.12 OpenSSL/0.
9.6b
Set-Cookie: SaneID=68.120.96.254-1087582479359; path=/; expires=Fri, 18-Jun-09 2
1:14:39 GMT
X-Powered-By: PHP/4.3.7
Set-Cookie: Zend_Session_DB=4a6d867cea6c870397399eb97c44a415; expires=Mon, 21-Ju
n-2004 18:14:39 GMT; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: Zend_In=deleted; expires=Thu, 19-Jun-2003 18:14:38 GMT; path=/
Connection: close
Content-Type: text/html

--

Perhaps we should try running php.net and zend.com on php5 before we
release?  if we're not even eating our own dogfood yet, it seems
premature to release.

-sterling


On Fri, 18 Jun 2004 20:07:30 +0200, Andi Gutmans <[EMAIL PROTECTED]> wrote:
> 
> Don't think that's a good idea. I suggest to wait for another 2 weeks or
> so, then release 5.0.0 and create a 5_0 branch for bug fix releases and 5_1
> for bigger changes.
> BTW, Zeev suggested 4th of July for a release date. I think that's nice
> timing. Anyone object? (maybe the French? :)
> 
> Andi
> 
> 
> At 06:24 PM 6/18/2004 +0200, Sebastian Bergmann wrote:
> >Marcus Boerger wrote:
> >>Even i am holding back tons of patches right now to not disturb release
> >>process further :-)
> >
> >  Why not branch PHP 5.0 now and continue development in HEAD as PHP 5.1?
> >
> >--
> >Sebastian Bergmann
> >http://sebastian-bergmann.de/   http://phpOpenTracker.de/
> >
> >Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/
> >
> >--
> >PHP Internals - PHP Runtime Development Mailing List
> >To unsubscribe, visit: http://www.php.net/unsub.php
> 
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: 64-bit bugsquash

2004-06-18 Thread Stefan Esser
Alexander Valyalkin wrote:
I propose to add several new types with EXACT bit length into this file:
---
typedef __int8 zend_int8;
typedef __int16 zend_int16;
typedef __int32 zend_int32;
typedef __int64 zend_int64;
typedef unsigned __int8 zend_uint8;
typedef unsigned __int16 zend_uint16;
typedef unsigned __int32 zend_uint32;
typedef unsigned __int64 zend_uint64;
---
Sorry but this idea is out of question. The idea was always that PHP is 
64 bit capable as soon you run it on a 64 bit machine. Same for 128 bit 
machines in the future. It is a stupid idea to limit the number of bits. 
Especially if you have to call libc functions...

Stefan Esser
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] The open letter to Derick Rethans

2004-06-18 Thread Andi Gutmans
Don't think that's a good idea. I suggest to wait for another 2 weeks or 
so, then release 5.0.0 and create a 5_0 branch for bug fix releases and 5_1 
for bigger changes.
BTW, Zeev suggested 4th of July for a release date. I think that's nice 
timing. Anyone object? (maybe the French? :)

Andi
At 06:24 PM 6/18/2004 +0200, Sebastian Bergmann wrote:
Marcus Boerger wrote:
Even i am holding back tons of patches right now to not disturb release
process further :-)
 Why not branch PHP 5.0 now and continue development in HEAD as PHP 5.1?
--
Sebastian Bergmann
http://sebastian-bergmann.de/   http://phpOpenTracker.de/
Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] RC4 ???

2004-06-18 Thread Sean Coates
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Magnus Määttä wrote:
| Could you please have a look at the debug_print_backtrace() crash ?
| Bug: #28213
Yes, debug_backtrace seems all-around flaky. Not a crash, but is very
confusing.
See bug: 28377
S
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFA0yhnWppknrQMxQIRAm5oAJ9wKJA/seVxjzFfBS2vealnrCOw4gCgjGR1
bKrw5S2+GDQJPhUvoD8YYUo=
=U6Mt
-END PGP SIGNATURE-
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] RC4 ???

2004-06-18 Thread George Schlossnagle
On Jun 18, 2004, at 1:21 PM, Magnus Määttä wrote:
Hello!
On Friday 18 June 2004 18.06, Andi Gutmans wrote:
I don't see a need for another RC. I think we should release the 
current
HEAD as PHP 5. I'm sure there'll still be plenty of 64bit fixes in the
coming months.
Could you please have a look at the debug_print_backtrace() crash ?
Bug: #28213
Fixed in CVS.
George
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] RC4 ???

2004-06-18 Thread Magnus Määttä
Hello!

On Friday 18 June 2004 18.06, Andi Gutmans wrote:
> I don't see a need for another RC. I think we should release the current
> HEAD as PHP 5. I'm sure there'll still be plenty of 64bit fixes in the
> coming months.

Could you please have a look at the debug_print_backtrace() crash ?
Bug: #28213

And what about the patch Joe sent a few hours ago that I forward ported to 
PHP5 that will fix apache2handler ?
Bug: #28113

Two bugs I wish to have addressed before we release PHP5, both which can be 
reproduced easily and will cause major annoyance for normal situations.


/Magnus

-- 
All is well that ends well.
-- John Heywood


pgpjRGpjM3kd4.pgp
Description: signature


Re: [PHP-DEV] The open letter to Derick Rethans

2004-06-18 Thread Sebastian Bergmann
Marcus Boerger wrote:
Even i am holding back tons of patches right now to not disturb release
process further :-)
 Why not branch PHP 5.0 now and continue development in HEAD as PHP 5.1?
--
Sebastian Bergmann
http://sebastian-bergmann.de/   http://phpOpenTracker.de/
Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DEV] isset and unset behaviour

2004-06-18 Thread Curt Zirzow

Given: 
  $a[2] = '1';
  $k = (double)2;
  echo isset($a[$k]);
  unset($a[$k]);
  echo isset($a[$k]);
  echo " -> expect 1\n";

Results:
  11 -> expect 1

Although a double value isn't a valid array index, it doesn't seem
to be consistent.  I'm thinking that the code should yeild one of
two results:

  1. Issue warning as with using objects or arrays as keys
  2. unset uses the str.val to retrieve the proper index.

Any thoughts on the proper behaviour?


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] RC4 ???

2004-06-18 Thread Andi Gutmans
I don't see a need for another RC. I think we should release the current 
HEAD as PHP 5. I'm sure there'll still be plenty of 64bit fixes in the 
coming months.

Andi
At 08:02 AM 6/18/2004 +0200, Stefan Esser wrote:
Morning,
will we have a RC4 or will we simply release the current HEAD as PHP5? In 
the last 2 days lots of 64 bit issues were fixed.

Stefan
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] Re: ClassHints and NULL

2004-06-18 Thread Hans Lellelid
Hi,
Marcus Boerger wrote:
Last but not least we know already that a lot of people like to
be able to handle both instanceof or null with typehints. But at
the moment we have no solution that can go into PHP 5.0. However
i am quite sure we will address this for 5.1.
I'm glad this issue will be re-evaluated.  I think the loss of null 
option is disappointing since it precludes optional params (which was 
really the only place I was using it), but I also understand the reasoning.

Here is a slightly related example from my code which is preventing me 
from being able to use typehints at all -- the issue is more than just 
allowing null, clearly:

abstract class BasePeer {
  // ...
  public static function doDelete(Criteria $criteria, Connection $con) {
   // ...
  }
}
class AuthorPeer extends BasePeer {
  public static function doDelete(Criteria $criteria, $con = null) {
 if ($con === null) {
$con = Transaction::begin();
 }
 // ...
 parent::doDelete($criteria, $con);
  }
}
Now, even though I am using typehints propertly (i.e. not specifying one 
for $con in subclass), my code is no longer E_STRICT -- because the 
signatures do not match.  :(  Obviously issue is larger than the 
typehints, but it would be nice if the above code were able to be 
E_STRICT (especially since BasePeer is an abstract class) -- and it 
would be nice if I could use optional paramters w/ typehints.

Of course, namespaces are more important than anything ;)
Hans
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] [PATCH] apache2handler memory leak fix

2004-06-18 Thread Joe Orton
On Fri, Jun 18, 2004 at 02:13:05PM +0200, Magnus MÃÃttà wrote:
> Hi!
> 
> On Friday 18 June 2004 12.30, Joe Orton wrote:
> > It's simpler to just use the ap_r* interfaces in the the handler SAPI
> > for 2.0, this improves network usage by allowing httpd to buffer as
> > necessary, and fixes a bug where ub_write is unnecessarily pmemdup'ing
> > the string (it could have used a transient bucket to avoid that; the
> > apache2filter got this right), and stops re-using an output brigade
> > which is now or at least will soon be a 2.0 API violation.
> >
> > (this restores constant memory use for an arbitrary length response)
> 
> I've attached a forward port of this patch for HEAD.
> This also fixes bug #28113.

Ah, thanks Magnus.  Note that flush() may still leak a small amount of
memory but this is what I'm working to fix in httpd.

Regards,

joe

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [PATCH] apache2handler memory leak fix

2004-06-18 Thread Magnus Määttä
Hi!

On Friday 18 June 2004 12.30, Joe Orton wrote:
> It's simpler to just use the ap_r* interfaces in the the handler SAPI
> for 2.0, this improves network usage by allowing httpd to buffer as
> necessary, and fixes a bug where ub_write is unnecessarily pmemdup'ing
> the string (it could have used a transient bucket to avoid that; the
> apache2filter got this right), and stops re-using an output brigade
> which is now or at least will soon be a 2.0 API violation.
>
> (this restores constant memory use for an arbitrary length response)
>

I've attached a forward port of this patch for HEAD.
This also fixes bug #28113.

Hopefully I didn't screw anything up.

/Magnus


-- 
In California they don't throw their garbage away -- they make it into
television shows.
-- Woody Allen, "Annie Hall"
Index: sapi/apache2handler/sapi_apache2.c
===
RCS file: /repository/php-src/sapi/apache2handler/sapi_apache2.c,v
retrieving revision 1.39
diff -u -r1.39 sapi_apache2.c
--- sapi/apache2handler/sapi_apache2.c  18 Jun 2004 00:36:58 -  1.39
+++ sapi/apache2handler/sapi_apache2.c  18 Jun 2004 12:07:47 -
@@ -48,7 +48,7 @@
 #include "http_log.h"
 #include "http_main.h"
 #include "util_script.h"
-#include "http_core.h" 
+#include "http_core.h"
 #include "ap_mpm.h"
 
 #include "php_apache.h"
@@ -58,7 +58,7 @@
  * file does not use the system call shutdown, it is safe to #undef it.K
  */
 #undef shutdown
- 
+
 #define PHP_MAGIC_TYPE "application/x-httpd-php"
 #define PHP_SOURCE_MAGIC_TYPE "application/x-httpd-php-source"
 #define PHP_SCRIPT "php5-script"
@@ -69,31 +69,16 @@
 static int
 php_apache_sapi_ub_write(const char *str, uint str_length TSRMLS_DC)
 {
-   apr_bucket *bucket;
-   apr_bucket_brigade *brigade;
request_rec *r;
php_struct *ctx;
-   char *copy_str;
-
-   if (str_length == 0) {
-   return 0;
-   }
 
ctx = SG(server_context);
r = ctx->r;
-   brigade = ctx->brigade;
-   
-   copy_str = apr_pmemdup(r->pool, str, str_length);
-   bucket = apr_bucket_pool_create(copy_str, str_length, r->pool, 
r->connection->bucket_alloc);
-
-   APR_BRIGADE_INSERT_TAIL(brigade, bucket);
 
-   if (ap_pass_brigade(r->output_filters, brigade) != APR_SUCCESS || 
r->connection->aborted) {
+   if (ap_rwrite(str, str_length, r) < 0) {
php_handle_aborted_connection();
}
-   /* Ensure this brigade is empty for the next usage. */
-   apr_brigade_cleanup(brigade);
-   
+
return str_length; /* we always consume all the data passed to us. */
 }
 
@@ -241,8 +226,6 @@
 php_apache_sapi_flush(void *server_context)
 {
php_struct *ctx;
-   apr_bucket_brigade *brigade;
-   apr_bucket *bucket;
request_rec *r;
TSRMLS_FETCH();
 
@@ -255,20 +238,15 @@
}
 
r = ctx->r;
-   brigade = ctx->brigade;
 
sapi_send_headers(TSRMLS_C);
 
r->status = SG(sapi_headers).http_response_code;
SG(headers_sent) = 1;
 
-   /* Send a flush bucket down the filter chain. */
-   bucket = apr_bucket_flush_create(r->connection->bucket_alloc);
-   APR_BRIGADE_INSERT_TAIL(brigade, bucket);
-   if (ap_pass_brigade(r->output_filters, brigade) != APR_SUCCESS || 
r->connection->aborted) {
+   if (ap_rflush(r) < 0 || r->connection->aborted) {
php_handle_aborted_connection();
}
-   apr_brigade_cleanup(brigade);
 }
 
 static void php_apache_sapi_log_message(char *msg)
@@ -277,7 +255,7 @@
TSRMLS_FETCH();
 
ctx = SG(server_context);
-   
+
/* We use APLOG_STARTUP because it keeps us from printing the
 * data and time information at the beginning of the error log
 * line.  Not sure if this is correct, but it mirrors what happens
@@ -504,8 +482,8 @@
}
 
/* Setup the CGI variables if this is the main request */
-   if (r->main == NULL || 
-   /* .. or if the sub-request envinronment differs from the 
main-request. */ 
+   if (r->main == NULL ||
+   /* .. or if the sub-request envinronment differs from the 
main-request. */
r->subprocess_env != r->main->subprocess_env
) {
/* setup standard CGI variables */


pgpDVcTTMpax6.pgp
Description: signature


Re: [PHP-DEV] Re: PHP and Apache2

2004-06-18 Thread Uwe Schindler
Due to a lot of emails and bug reports from SunONE webserver users, the 
apache2 multithreading message should also be marked as important for *ALL* 
multithreaded webservers. With some modifications it could be used for all 
multithreaded environments not only Apache2. We could link this faq message 
from all multithreaded webserver install sections.

Especially for SunONE webservers there is also the possibility to use 
FastCGI since version 6.1 (the Zend module is bundled there, but without 
any documentation and click'n'play availability in the admin server) - so 
users want to use ext/GD... can use this with some speed drawback (the 
NSAPI module is *very* fast compared to FastCGI - because multithreaded) 
and missing features (no virtual() function, no apache-like "php_value" 
options).

Uwe
At 11:56 16.06.2004, Jan Lehnardt wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
On 16 Jun 2004, at 11:35, Joseph Lee wrote:
I have seem this questions been asked many times in a few mail list.
Someone should post this reply into a FAQ page or the Manual in
www.php.net
I am about to commit this to the installation chapter of the manual.
Jan
- --
GPG Key: BB96 56B0
Q: Thank Jan? - A: http://geschenke.an.dasmoped.net/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (Darwin)
iD8DBQFA0Bk17KW8t7uWVrARAmfUAJ9mIGqzR0WOe90AHNB/p00HMUbn5QCeNC8a
I6o3NcztxMST3cWRpZJvac4=
=dz2E
-END PGP SIGNATURE-
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

-
Uwe Schindler
[EMAIL PROTECTED] - http://www.php.net
NSAPI SAPI developer
Erlangen, Germany
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DEV] [PATCH] apache2handler memory leak fix

2004-06-18 Thread Joe Orton
It's simpler to just use the ap_r* interfaces in the the handler SAPI
for 2.0, this improves network usage by allowing httpd to buffer as
necessary, and fixes a bug where ub_write is unnecessarily pmemdup'ing
the string (it could have used a transient bucket to avoid that; the
apache2filter got this right), and stops re-using an output brigade
which is now or at least will soon be a 2.0 API violation.

(this restores constant memory use for an arbitrary length response)

--- php-4.3.7/sapi/apache2handler/sapi_apache2.c.handler
+++ php-4.3.7/sapi/apache2handler/sapi_apache2.c
@@ -67,30 +67,15 @@
 static int
 php_apache_sapi_ub_write(const char *str, uint str_length TSRMLS_DC)
 {
-   apr_bucket *bucket;
-   apr_bucket_brigade *brigade;
request_rec *r;
php_struct *ctx;
-   char *copy_str;
-
-   if (str_length == 0) {
-   return 0;
-   }
 
ctx = SG(server_context);
r = ctx->r;
-   brigade = ctx->brigade;

-   copy_str = apr_pmemdup( r->pool, str, str_length);
-   bucket = apr_bucket_pool_create(copy_str, str_length, r->pool, 
r->connection->bucket_alloc);
-
-   APR_BRIGADE_INSERT_TAIL(brigade, bucket);
-
-   if (ap_pass_brigade(r->output_filters, brigade) != APR_SUCCESS || 
r->connection->aborted) {
+   if (ap_rwrite(str, str_length, r) < 0) {
php_handle_aborted_connection();
}
-   /* Ensure this brigade is empty for the next usage. */
-   apr_brigade_cleanup(brigade);

return str_length; /* we always consume all the data passed to us. */
 }
@@ -245,8 +230,6 @@
 php_apache_sapi_flush(void *server_context)
 {
php_struct *ctx;
-   apr_bucket_brigade *brigade;
-   apr_bucket *bucket;
request_rec *r;
TSRMLS_FETCH();
 
@@ -259,20 +242,15 @@
}
 
r = ctx->r;
-   brigade = ctx->brigade;
 
sapi_send_headers(TSRMLS_C);
 
r->status = SG(sapi_headers).http_response_code;
SG(headers_sent) = 1;
 
-   /* Send a flush bucket down the filter chain. */
-   bucket = apr_bucket_flush_create(r->connection->bucket_alloc);
-   APR_BRIGADE_INSERT_TAIL(brigade, bucket);
-   if (ap_pass_brigade(r->output_filters, brigade) != APR_SUCCESS || 
r->connection->aborted) {
+   if (ap_rflush(r) < 0 || r->connection->aborted) {
php_handle_aborted_connection();
}
-   apr_brigade_cleanup(brigade);
 }
 
 static void php_apache_sapi_log_message(char *msg)

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: 64-bit bugsquash

2004-06-18 Thread Alexander Valyalkin
There is a header file with PHP type's definition:
/Zend/zend_types.h
It consists following types:
---
typedef unsigned char zend_bool;
typedef unsigned char zend_uchar;
typedef unsigned int zend_uint;
typedef unsigned long zend_ulong;
typedef unsigned short zend_ushort;
---
I propose to add several new types with EXACT bit length into this file:
---
typedef __int8 zend_int8;
typedef __int16 zend_int16;
typedef __int32 zend_int32;
typedef __int64 zend_int64;
typedef unsigned __int8 zend_uint8;
typedef unsigned __int16 zend_uint16;
typedef unsigned __int32 zend_uint32;
typedef unsigned __int64 zend_uint64;
---
If compiler does not support some __int* types, (for example, __int64),
we can deal it before zend_* types definition.
For example:
-
#ifdef COMPILERS_WITHOUT_INT64_TYPE
typedef long long __int64;
#endif
-
Then in other places of PHP sources:
 - if we need EXACT 8bit integers, we must use zend_int8 type
 - if we need EXACT 16bit integers, we must use zend_int16 type.
 etc...
It solves such problems as "int is 64bit on FOO compiler"
or "long is 32bit on BAR compiler".
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php