[PHP-DEV] Warning: Unicode Merge starting

2005-08-10 Thread Andrei Zmievski
The warning goes into full effect now: do not commit anything to Zend/, main/, or ext/standard/ or I will hunt you down and make you memorize the entire contents of Unicode Character Set. In binary. -Andrei -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http:/

[PHP-DEV] Re: [PATCH] debug_get_object_handle

2005-08-10 Thread Sara Golemon
I have cooked a patch that adds a function named debug_get_object_handle() which returns the handle id of an object. Having a function like this makes devs' live easier - no need to parse the output of var_dump(). The patch is available here: http://hristov.com/andrey/projects/php_stuff/patches/

[PHP-DEV] Patch for get_headers(

2005-08-10 Thread Arnar Mar Sig
This patch defines a new argument to get_headers. "header" to get a specified header and returns it as a string. ? get_headers.patch Index: ext/standard/url.c === RCS file: /repository/php-src/ext/standard/url.c,v retrieving revisio

[PHP-DEV] update snaps.php.net to reflect PHP_5_1 branch

2005-08-10 Thread Wez Furlong
Can somebody with access to snaps.php.net update it so that 5.1 refers to the 5.1 branch, instad of HEAD? No need to have HEAD available on there until 5.1 is released. --Wez. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [PATCH] debug_get_object_handle

2005-08-10 Thread Wez Furlong
Why do you need the object handle? --Wez. On 8/10/05, Andrey Hristov <[EMAIL PROTECTED]> wrote: > Hi all, > I have cooked a patch that adds a function named debug_get_object_handle() > which returns the handle id of an object. Having a function like this makes > devs' live easier - no need to p

[PHP-DEV] [PATCH] debug_get_object_handle

2005-08-10 Thread Andrey Hristov
Hi all, I have cooked a patch that adds a function named debug_get_object_handle() which returns the handle id of an object. Having a function like this makes devs' live easier - no need to parse the output of var_dump(). The patch is available here: http://hristov.com/andrey/projects/php_stuff/p

Re: [PHP-DEV] type hinting throwing a fatal error

2005-08-10 Thread Andrey Hristov
I concur! Andrey Tobias Schlitt wrote: Hi Zeev Suraski! On 08/10/05 17:30 you wrote: I think that throwing exceptions in all sorts of places encourages people to write 'exception-oriented' apps, which is very messy. Sorry, but I consider that statement wrong. We are still talking about P

Re: [PHP-DEV] type hinting throwing a fatal error

2005-08-10 Thread Tobias Schlitt
Hi Zeev Suraski! On 08/10/05 17:30 you wrote: > I think > that throwing exceptions in all sorts of places encourages people to > write 'exception-oriented' apps, which is very messy. Sorry, but I consider that statement wrong. We are still talking about PHP and a not caught exception will result

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Andrei Zmievski
On Aug 10, 2005, at 3:54 AM, Antony Dovgal wrote: Do we really need such kind of magic? I think it may be pretty confusing when after echo'ing or print'ing a variable you can see one output, but after writing the very same variable into a file you can see something completely different. Abs

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Andrei Zmievski
On Aug 10, 2005, at 3:45 AM, Ron Korving wrote: This looks very promising, I'm impressed by the work you guys have done (big thumbs up). Thanks. What about the other functions that output to stdout directly, such as readfile() and passthru()? readfile() uses streams so it would rely on st

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Adam Maccabee Trachtenberg
On Wed, 10 Aug 2005, Marcus Boerger wrote: > i had a chat with Andi about __toString() and i hope that he finally > undestood why a lot of ppl wanted it right from the beginning. To me the > current situation is simply the worst case because noone understnds when it > works and when not (. vs ,)

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Andrei Zmievski
I did not have time to write the full reply earlier so here goes. Even if we modify the output layer to be aware of various types of strings coming down the pipe, it would still need to know the encoding of IS_STRING's in order to convert them to the output encoding. This presents a particular

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Ron Korving
Sounds absolutely great :) Ron "Marcus Boerger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Ron, > > i had a chat with Andi about __toString() and i hope that he finally > undestood why a lot of ppl wanted it right from the beginning. To me the > current situation is si

[PHP-DEV] Using document root as open basedir

2005-08-10 Thread Alexander Windbichler
Hello, I have one question concerning the "_SERVER" variables that we can find in the output of phpinfo(). For example: _SERVER["DOCUMENT_ROOT"] /var/www/user1 Is it possible to set this DOCUMENT_ROOT as open_basedir? This would be very comfortable, because I do not have to set

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Marcus Boerger
Hello Ron, i had a chat with Andi about __toString() and i hope that he finally undestood why a lot of ppl wanted it right from the beginning. To me the current situation is simply the worst case because noone understnds when it works and when not (. vs ,). Since we are doing a drastic change in

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Ron Korving
I firmly believe though, that all outputting functions should act the same. It's the same problem otherwise as with __toString(). I would use __toString if it wasn't just restricted to echo and print, but right now it's pretty useless to me. I hope that behavior can change in a major version update

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Rasmus Lerdorf
Andrei Zmievski wrote: > We have not changed the underlying output mechanism. The transcoding is > done by zend_make_printable_zval(). Ok, but all the non-stream based output functions pass through that. Not that we have very many, but it is more than just echo/print. -Rasmus -- PHP Internals

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Andrei Zmievski
We have not changed the underlying output mechanism. The transcoding is done by zend_make_printable_zval(). -Andrei On Aug 10, 2005, at 7:30 AM, Rasmus Lerdorf wrote: Yeah, print/echo was just a way of describing the underlying output stuff. It wasn't meant to be taken literally. -Rasmus

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Andrei Zmievski
On Aug 10, 2005, at 7:26 AM, Andi Gutmans wrote: We need to automatically convert the output as internally we will be storing UTF-16 which is not what you want to send to the user. The SAPI output mechanism does the conversion, I don't think it's print & echo. It will actually save people a

Re: [PHP-DEV] type hinting throwing a fatal error

2005-08-10 Thread Zeev Suraski
I don't think that's a good idea, regardless of implementation issues. Calling to a function with the wrong arguments is something that should be dealt with when developing the application, not at runtime. I think that throwing exceptions in all sorts of places encourages people to write 'exc

Re: [PHP-DEV] PHP 5.5 or 6.0

2005-08-10 Thread Zeev Suraski
I agree, the Unicode-enabled version of PHP should definitely be 6.0. Zeev At 11:41 09/08/2005, Derick Rethans wrote: Now that we branched it's time to rename HEAD to something else than 5.1 in order to have different version numbers. Although the name PHP 5.5 was mentioned before, I do think w

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Antony Dovgal
Ah. Ok, then I'm happy =) On Wed, 10 Aug 2005 07:30:38 -0700 Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: > Yeah, print/echo was just a way of describing the underlying output > stuff. It wasn't meant to be taken literally. -- Wbr, Antony Dovgal -- PHP Internals - PHP Runtime Development Ma

Re: [PHP-DEV] is_a, instanceof, conclusion

2005-08-10 Thread Andi Gutmans
I don't mind undeprecating it while I continue to digest the whole instanceof thread and look at real-world examples... At 09:46 AM 8/10/2005 +0200, Pierre-Alain Joye wrote: Hello, As there is no way to find a solution to the two different vision (pedantic, non pedantic ;). I propose to do not

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Ron Korving
Exactly. That's how I understood it too: "Ah, the __toString behavior". I'm very glad this is not the case. Ron "George Schlossnagle" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > > On Aug 10, 2005, at 10:30 AM, Rasmus Lerdorf wrote: > > > Yeah, print/echo was just a way of des

Re: [PHP-DEV] Re: drastic memory consumption with a sequenceofexceptions

2005-08-10 Thread Ron Korving
Yup, there's no difference. What Wez said makes sense: > foreach() 'copies' $data, and it's the copy that isn't going away. > > --Wez." Ron "Markus Fischer" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > This is also apply if you use the reference operator? > > foreach ($data a

Re: [PHP-DEV] Re: drastic memory consumption with a sequenceofexceptions

2005-08-10 Thread Ron Korving
Thanks, that's all I would ever ask for :) Ron "Andi Gutmans" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > Hi Ron, > > Indeed exception may lead to leaks in certain cases. We do try and cleanup > as much as possible but the situation you describe is hard to detect. I > will how

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread George Schlossnagle
On Aug 10, 2005, at 10:30 AM, Rasmus Lerdorf wrote: Yeah, print/echo was just a way of describing the underlying output stuff. It wasn't meant to be taken literally. Given the __toString fiasco, it's understandable that this would be confusing though. George -- PHP Internals - PHP Runti

Re: [PHP-DEV] Re: drastic memory consumption with a sequenceofexceptions

2005-08-10 Thread Markus Fischer
This is also apply if you use the reference operator? foreach ($data as &$lines) { .. ? - Markus Wez Furlong wrote: foreach() 'copies' $data, and it's the copy that isn't going away. --Wez. On 8/10/05, Ron Korving <[EMAIL PROTECTED]> wrote: "Derick Rethans" <[EMAIL PROTECTED]> schreef in

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Rasmus Lerdorf
Yeah, print/echo was just a way of describing the underlying output stuff. It wasn't meant to be taken literally. -Rasmus Andi Gutmans wrote: > We need to automatically convert the output as internally we will be > storing UTF-16 which is not what you want to send to the user. The SAPI > output

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Andi Gutmans
We need to automatically convert the output as internally we will be storing UTF-16 which is not what you want to send to the user. The SAPI output mechanism does the conversion, I don't think it's print & echo. It will actually save people a lot of headache that this is done automatically. As f

Re: [PHP-DEV] Re: drastic memory consumption with a sequenceof exceptions

2005-08-10 Thread Andi Gutmans
Hi Ron, Indeed exception may lead to leaks in certain cases. We do try and cleanup as much as possible but the situation you describe is hard to detect. I will however put it on our TODO list because this case could possibly be improved on. Andi At 11:54 AM 8/10/2005 +0200, Ron Korving wrot

Re: [PHP-DEV] Re: drastic memory consumption with a sequenceofexceptions

2005-08-10 Thread Wez Furlong
foreach() 'copies' $data, and it's the copy that isn't going away. --Wez. On 8/10/05, Ron Korving <[EMAIL PROTECTED]> wrote: > "Derick Rethans" <[EMAIL PROTECTED]> schreef in bericht > news:[EMAIL PROTECTED] > > On Wed, 10 Aug 2005, Ron Korving wrote: > > > > > My situation is parsing a number of

Re: [PHP-DEV] Re: drastic memory consumption with a sequenceofexceptions

2005-08-10 Thread Ron Korving
"Derick Rethans" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > On Wed, 10 Aug 2005, Ron Korving wrote: > > > My situation is parsing a number of XML-reports. If parsing goes wrong in > > any way (XML parsing fails, XML validation fails, database insertion fails), > > I want to thr

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Christian Schneider
Derick Rethans wrote: On Wed, 10 Aug 2005, Ron Korving wrote: "In order to create binary string literals, a new syntax is necessary: prefixing a string literal with letter 'b' creates a binary string." The b-prefix for binary strings is great, but how does that work with a function like file_ge

RE: [PHP-DEV] Re: drastic memory consumption with a sequenceofexceptions

2005-08-10 Thread David Zülke
I concur. - David > -Original Message- > From: Ron Korving [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 10, 2005 2:53 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Re: drastic memory consumption with a > sequenceofexceptions > > My situation is parsing a number of XM

Re: [PHP-DEV] Re: drastic memory consumption with a sequenceofexceptions

2005-08-10 Thread Derick Rethans
On Wed, 10 Aug 2005, Ron Korving wrote: > My situation is parsing a number of XML-reports. If parsing goes wrong in > any way (XML parsing fails, XML validation fails, database insertion fails), > I want to throw an exception. There's a script that batch-processes these > files. I want to collect

Re: [PHP-DEV] Re: drastic memory consumption with a sequenceofexceptions

2005-08-10 Thread Ron Korving
My situation is parsing a number of XML-reports. If parsing goes wrong in any way (XML parsing fails, XML validation fails, database insertion fails), I want to throw an exception. There's a script that batch-processes these files. I want to collect exceptions and give that feedback to the user. I

Re: [PHP-DEV] Re: drastic memory consumption with a sequenceof exceptions

2005-08-10 Thread Derick Rethans
On Wed, 10 Aug 2005, Ron Korving wrote: > Perhaps it would require an revised garbage collection mechanism? If that's > the case and you think it's worth investing time in, I think it would be > something for the next major version (6). I think it would be better not to abuse Exceptions like this

Re: [PHP-DEV] Re: drastic memory consumption with a sequenceof exceptions

2005-08-10 Thread Ron Korving
Perhaps it would require an revised garbage collection mechanism? If that's the case and you think it's worth investing time in, I think it would be something for the next major version (6). Good luck, Ron ""Dmitry Stogov"" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > I have

RE: [PHP-DEV] Re: drastic memory consumption with a sequenceof exceptions

2005-08-10 Thread Dmitry Stogov
I have opened the bug #34065, but it is very hard to fix it. Thanks. Dmitry. > -Original Message- > From: Ron Korving [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 10, 2005 1:55 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Re: drastic memory consumption with a > seque

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Derick Rethans
On Wed, 10 Aug 2005, Ron Korving wrote: > "In order to create binary string literals, a new syntax is necessary: > prefixing a string literal with letter 'b' creates a binary string." > > The b-prefix for binary strings is great, but how does that work with a > function like file_get_contents() o

Re: [PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Antony Dovgal
On Wed, 10 Aug 2005 12:45:27 +0200 "Ron Korving" <[EMAIL PROTECTED]> wrote: > This looks very promising, I'm impressed by the work you guys have done (big > thumbs up). > > There are a few issues/questions I have after reading your document: > > > "Therefore, command such as 'print' and 'echo'

[PHP-DEV] Re: PHP Unicode support design document

2005-08-10 Thread Ron Korving
This looks very promising, I'm impressed by the work you guys have done (big thumbs up). There are a few issues/questions I have after reading your document: "Therefore, command such as 'print' and 'echo' automatically convert their arguments to the specified encoding. No automatic output encodi

Re: [PHP-DEV] Re: drastic memory consumption with a sequenceof exceptions

2005-08-10 Thread Ron Korving
You're right, using that file to create a big piece of data was just for demonstration purposes. In my personal case it's XML parsing. The way I read what you just said is that this is behavior by design. But if I don't throw Exceptions, memory usage stays constant. Throwing and catching these exce

Re: [PHP-DEV] Re: drastic memory consumption with a sequenceof exceptions

2005-08-10 Thread Marcus Boerger
Hello Ron, Wednesday, August 10, 2005, 8:47:25 AM, you wrote: > Okay Andi, the script in this message is as simple as it gets. I used a > syslog file to create a load of data in this case, but of course you can use > any (text) file for this. > #!/usr/bin/php5 >function process() > { >

[PHP-DEV] is_a, instanceof, conclusion

2005-08-10 Thread Pierre-Alain Joye
Hello, As there is no way to find a solution to the two different vision (pedantic, non pedantic ;). I propose to do not deprecate is_a. It cannot hurt neither is_a (is_a uses instanceof too) or instanceof. The only cons for is_a is a little slow down, which is negligeable. Any objection? Regar

[PHP-DEV] PHP Unicode support design document

2005-08-10 Thread Andrei Zmievski
Before we go breaking things, please read this document that describes how PHP will support the Unicode standard natively. Hopefully the attachment will work. Thanks, -Andrei Introduction As successful as PHP has proven to be in the past several years, it is still the only re