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

2005-08-23 Thread Derick Rethans
On Tue, 23 Aug 2005, Andi Gutmans wrote: > I didn't quite understand. Users would be able to handle E_FATAL errors? How > would exceptions from those user handlers propagate the C extensions? No, they would only be able to catch E_ERROR, E_FATAL is the current "E_ERROR" and can NOT be caught by

Re: [PHP-DEV] PHP Unicode strings impl proposal

2005-08-23 Thread Rolland Santimano
--- Andrei Zmievski <[EMAIL PROTECTED]> wrote: > On Aug 23, 2005, at 8:23 AM, Rolland Santimano wrote: > > [1] string substr_replace > > Impl: > > The current impl is written in terms of memcpy(), after adjusting > > satrt & length correctly. With Unicode input, 'start' & 'length' > > may not be al

Re: [PHP-DEV] Re: PHP 6.0 Wishlist

2005-08-23 Thread Michael Walter
Zeev, On 8/24/05, Michael Walter <[EMAIL PROTECTED]> wrote: > On 8/23/05, Zeev Suraski <[EMAIL PROTECTED]> wrote: > > >"Real" anonymous functions (as in, closures) should be able to capture > > >variables from its lexical environment, e.g.: > > > > create_function() accepts a string, and that stri

Re: [PHP-DEV] Re: PHP 6.0 Wishlist

2005-08-23 Thread Michael Walter
Zeev, On 8/23/05, Zeev Suraski <[EMAIL PROTECTED]> wrote: > >"Real" anonymous functions (as in, closures) should be able to capture > >variables from its lexical environment, e.g.: > > create_function() accepts a string, and that string is constructed with > full access to the lexical scope of th

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

2005-08-23 Thread Al Baker
o be > >fixed. In some cases I added RETURN_FALSE or return. > > > >I also updated some test cases. You can find the patch here: > >http://files.derickrethans.nl/e_fatal-20050823.diff.txt > > > >Derick > > > >-- > >Derick Rethans > >http://

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-23 Thread Greg Beaver
Andi Gutmans wrote: > Again (I sound like a broken record), I don't think that we should add > language constructs to support delegation. We will be overcomplicating > things for PHP developers and it'll start to be hard to read PHP code. > I do think it might be worth considering a user-land or in

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

2005-08-23 Thread Makoto Tozawa
This looks good. When the unicode_semantics switch is turned on, it provides Unicode everywhere development solution to PHP developers. The output, input, and script encodings are all utf-8 by default. The internal encoding is utf-16 which allows developers to handle surrogate pairs correctly. I

Re: [PHP-DEV] Returning References from Internal Functions

2005-08-23 Thread Sara Golemon
> There's some commented out code in there that refers to bug 34045: > /* We shouldn't fix bad extensions here, > because it can break proper ones (Bug #34045) > if (!EX(function_state).function->common.return_reference) { > EX_T(opline->result.u.var).var.ptr->is_ref = 0; >

Re: [PHP-DEV] Returning References from Internal Functions

2005-08-23 Thread Andi Gutmans
OK thanks for the additional info. Will take a look. At 05:05 PM 8/23/2005, Sara Golemon wrote: > We'll take a look at it as this should actually work today. > That's what I'd thought coming into this, but all my attempts to return a reference failed: My Arg Info struct: static ZEND_BEGIN_A

Re: [PHP-DEV] Returning References from Internal Functions

2005-08-23 Thread Sara Golemon
> We'll take a look at it as this should actually work today. > That's what I'd thought coming into this, but all my attempts to return a reference failed: My Arg Info struct: static ZEND_BEGIN_ARG_INFO_EX(php_sample_retref_arginfo, 0, 1, 0) ZEND_END_ARG_INFO() My reference linking: i

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-23 Thread Andi Gutmans
Again (I sound like a broken record), I don't think that we should add language constructs to support delegation. We will be overcomplicating things for PHP developers and it'll start to be hard to read PHP code. I do think it might be worth considering a user-land or internal class such as a P

Re: [PHP-DEV] Returning References from Internal Functions

2005-08-23 Thread Andi Gutmans
We'll take a look at it as this should actually work today. As to back porting, I don't think we should touch the stable branches. Andi At 11:47 AM 8/23/2005, Sara Golemon wrote: I've got a one-line fix to allow internal functions to return by reference. What happens currently is if (*return_

RE: [PHP-DEV] Re: PHP 6.0 Wishlist

2005-08-23 Thread Andi Gutmans
Guys, Anonymous functions are really a niche feature and tend to lead to pretty magical code. I really don't think that it's an important enough feature which would be usable to the mainstream PHP users. We really need to get a grip on the new features and not overcomplicate the language. Ther

Re: [PHP-DEV] Re: PHP 6.0 Wishlist

2005-08-23 Thread Noah Botimer
Zeev, My only gripe with create_function() is the inherent "dirt" involved in handing a code-containing string to a function. I've been living in the app development world for some time now, so my example stash is clean out, but my notion is that, for folks who have a real, novel applica

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

2005-08-23 Thread Andi Gutmans
would not have aborted. Major exceptions here are ext/hwapi, ext/soap, ext/simplexml and ext/ming. These need to be fixed. In some cases I added RETURN_FALSE or return. I also updated some test cases. You can find the patch here: http://files.derickrethans.nl/e_fatal-20050823.diff.txt Derick -- Deric

Re: [PHP-DEV] sync complete

2005-08-23 Thread Andi Gutmans
Likelihood is that we will have to release new versions of PHP 5.0 due to security issues. That said, I don't think we need to maintain it far beyond that unless there's something exceptional. Andi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.ne

Re: [PHP-DEV] PHP Unicode strings impl proposal

2005-08-23 Thread Andrei Zmievski
On Aug 23, 2005, at 8:23 AM, Rolland Santimano wrote: [1] string substr_replace(string original, string new, int start[, int length]) Returns string where original[start..length] is replaced with new. Input args can be arrays, in which case case the operation is: substr_replace(original[i], new[i

RE: [PHP-DEV] Re: PHP 6.0 Wishlist

2005-08-23 Thread Zeev Suraski
At 18:47 23/08/2005, Dmitry Stogov wrote: > function adder($a) {return function($b) {return $a+$b;}} > function index($i) {return function($a) {return $a[$i];}} > > I'm sure you can think of useful examples. I like this syntax and expected behavior. The only problem is implementation. That

Re: [PHP-DEV] Simplexml and xml namespaces

2005-08-23 Thread Marcus Boerger
Hello Rob, what we need here is a temp hash table to store the names. var_dump would grep them through get_properties... Friday, August 19, 2005, 9:34:54 PM, you wrote: > There isn't a single method in DOM for this - have to write code to do > it. get_properties was not implemented in DOM due

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-23 Thread Marcus Boerger
Hello Zeev, Tuesday, August 23, 2005, 8:59:49 PM, you wrote: > At 19:12 23/08/2005, Lukas Smith wrote: >>Joseph Crawford wrote: >>>I would like to see Multiple Inheritance implemented in a future version. >>>I am not sure what obstacles got in the way (if any) for not implementing >>>that in PHP

Re: [PHP-DEV] Re: PHP 6.0 Wishlist

2005-08-23 Thread Marcus Boerger
Hello George, Monday, August 22, 2005, 9:53:02 PM, you wrote: > On Aug 22, 2005, at 2:08 PM, Stanislav Malyshev wrote: MB * Anonymous functions. The real stuff, not just some odd stringĀ  MB passed to create_function(). MB>>> MB>>>There were some others already asking for this, maybe we

Re: [PHP-DEV] Re: PHP 6.0 Wishlist

2005-08-23 Thread Zeev Suraski
At 09:18 23/08/2005, Michael Walter wrote: On 8/22/05, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > MB>>> * Anonymous functions. The real stuff, not just some odd string > MB>>> passed to create_function(). > MB>> > MB>>There were some others already asking for this, maybe we should at least

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-23 Thread Zeev Suraski
At 19:12 23/08/2005, Lukas Smith wrote: Joseph Crawford wrote: I would like to see Multiple Inheritance implemented in a future version. I am not sure what obstacles got in the way (if any) for not implementing that in PHP 5 but i would defenately like to see that in PHP 6 or 7 IIRC, it was s

[PHP-DEV] Returning References from Internal Functions

2005-08-23 Thread Sara Golemon
I've got a one-line fix to allow internal functions to return by reference. What happens currently is if (*return_value_ptr)->refcount <= 2 at the end of an internal function, then the _get_zval_ptr_ptr_var delrefs it down to refcount==1 (removing is_ref in the process). With userspace functions

Re: [PHP-DEV] Re: strrev() impl - Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/standard string.c

2005-08-23 Thread Andrei Zmievski
On Aug 22, 2005, at 10:48 PM, Tex Texin wrote: One more comment- We should take into account that most data will not use combining characters and should optimize for that case. Most text will consist of solely characters with combining class = 0. We can therefore scan backwards, copying char

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-23 Thread Lukas Smith
Joseph Crawford wrote: I would like to see Multiple Inheritance implemented in a future version. I am not sure what obstacles got in the way (if any) for not implementing that in PHP 5 but i would defenately like to see that in PHP 6 or 7 IIRC, it was shot down. Use overloading and interfaces

RE: [PHP-DEV] Re: PHP 6.0 Wishlist

2005-08-23 Thread Dmitry Stogov
> -Original Message- > From: Michael Walter [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 23, 2005 10:18 AM > To: Stanislav Malyshev > Cc: Marcus Boerger; internals@lists.php.net > Subject: Re: [PHP-DEV] Re: PHP 6.0 Wishlist > > > On 8/22/05, Stanislav Malyshev <[EMAIL PROTECTED]>

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-23 Thread Rasmus Lerdorf
Joseph Crawford wrote: > I would like to see Multiple Inheritance implemented in a future version. I > am not sure what obstacles got in the way (if any) for not implementing that > in PHP 5 but i would defenately like to see that in PHP 6 or 7 And if we had implemented MI, that would probably g

[PHP-DEV] PHP Unicode strings impl proposal

2005-08-23 Thread Rolland Santimano
Comments / impl suggestions please. TIA, Rolland -- [1] string substr_replace(string original, string new, int start[, int length]) Returns string where original[start..length] is replaced with new. Input args can be arrays, in which case case the operation is: substr_replace(original[i], new[i],

Re: [PHP-DEV] Re: PHP 6.0 Wishlist

2005-08-23 Thread Michael Walter
On 8/22/05, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > MB>>> * Anonymous functions. The real stuff, not just some odd string > MB>>> passed to create_function(). > MB>> > MB>>There were some others already asking for this, maybe we should at least > MB>>give it a thought if it is doable at all

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-23 Thread Joseph Crawford
I would like to see Multiple Inheritance implemented in a future version. I am not sure what obstacles got in the way (if any) for not implementing that in PHP 5 but i would defenately like to see that in PHP 6 or 7 -- Joseph Crawford Jr. Codebowl Solutions, Inc. 1-802-671-2021 [EMAIL PROTECTED

[PHP-DEV] Re: BC break list?

2005-08-23 Thread Lukas Smith
DvDmanDT wrote: Hello everyone.. I woke up this morning with an idea, that I think would be useful: a BC break list. I think that could benefit alot of people, and I don't think it would be that much work to implent (I can do the scripting if noone else cares to). I would need some input from y

[PHP-DEV] Re: BC break list?

2005-08-23 Thread Lukas Smith
DvDmanDT wrote: Hello everyone.. I woke up this morning with an idea, that I think would be useful: a BC break list. I think that could benefit alot of people, and I don't think it would be that much work to implent (I can do the scripting if noone else cares to). I would need some input from y

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

2005-08-23 Thread Derick Rethans
the patch here: http://files.derickrethans.nl/e_fatal-20050823.diff.txt Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] BC break list?

2005-08-23 Thread DvDmanDT
Hello everyone.. I woke up this morning with an idea, that I think would be useful: a BC break list. I think that could benefit alot of people, and I don't think it would be that much work to implent (I can do the scripting if noone else cares to). I would need some input from you guys though, t

Re: [PHP-DEV] sync complete

2005-08-23 Thread Zeev Suraski
At 11:44 23/08/2005, Rasmus Lerdorf wrote: I agree 4.4.x will live a long time due to the installed base and BC problems going from 4 to 5. But I think 5.0 can go away once we get a couple of releases into 5.1.x. The 5.0 installed base is small and the 5.0 to 5.1 migration is not difficult. I

Re: [PHP-DEV] sync complete

2005-08-23 Thread Zeev Suraski
At 14:05 23/08/2005, Edin Kadribasic wrote: Zeev Suraski wrote: > Look, I take no joy at committing to 4 branches any more than anybody > else, but let's be realistic here. The branch isn't going anywhere, and > 5.0, which was the best PHP version we offered as of mid 2004, will have > to be sup

Re: [PHP-DEV] sync complete

2005-08-23 Thread Edin Kadribasic
Zeev Suraski wrote: > Look, I take no joy at committing to 4 branches any more than anybody > else, but let's be realistic here. The branch isn't going anywhere, and > 5.0, which was the best PHP version we offered as of mid 2004, will have > to be supported for critical fixes for quite some time.

Re: [PHP-DEV] sync complete

2005-08-23 Thread Derick Rethans
On Tue, 23 Aug 2005, Zeev Suraski wrote: > Look, I take no joy at committing to 4 branches any more than anybody else, > but let's be realistic here. The branch isn't going anywhere, and 5.0, which > was the best PHP version we offered as of mid 2004, will have to be supported > for critical fixe

Re: [PHP-DEV] sync complete

2005-08-23 Thread Zeev Suraski
At 11:00 23/08/2005, Derick Rethans wrote: On Tue, 23 Aug 2005, Zeev Suraski wrote: > At 01:23 23/08/2005, Rasmus Lerdorf wrote: > >Greg Beaver wrote: > > > I just synced php-src/pear (PHP_5_0/PHP_5_1/PHP_4_4) with pear-core > > > (PEAR_1_3). May god bring the day when this is no longer necessa

Re: [PHP-DEV] Re: PHP 6.0 Wishlist

2005-08-23 Thread Stanislav Malyshev
GS>>1) syntactical: the amount of escaping/funkyjunk you need to do to GS>>have anonymous functions look like regular functions in their GS>>declaration is huge (yes, you can use heredocs, but they have their GS>>(big if you run up against them) limitations as well). Well, this is right and va

Re: [PHP-DEV] Re: PHP 6.0 Wishlist

2005-08-23 Thread Stanislav Malyshev
MW>> function adder($a) {return function($b) {return $a+$b;}} As opposed to: function adder($a) { return create_function('$b', 'return '.(integer)$a.'+$b;'); } Former form may be a bit prettier, but no substantial difference here. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECT

Re: [PHP-DEV] sync complete

2005-08-23 Thread Derick Rethans
On Tue, 23 Aug 2005, Lester Caine wrote: > People are switching to PHP4.4 from PHP4.3 and complaining about broken code - Yes, they should be, as *their* code was broken. Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] sync complete

2005-08-23 Thread Lester Caine
Derick Rethans wrote: As for PHP 4.x I would expect that one to end sometimes in the first part of next year. Heh, no way :) It would be nice if updates to PHP4 tree did not introduce changes that require all backwards compatible PHP5 code to be re-tested with PHP4 and changes made! People

Re: [PHP-DEV] sync complete

2005-08-23 Thread Rasmus Lerdorf
Zeev Suraski wrote: > At 01:23 23/08/2005, Rasmus Lerdorf wrote: > >> Greg Beaver wrote: >> > I just synced php-src/pear (PHP_5_0/PHP_5_1/PHP_4_4) with pear-core >> > (PEAR_1_3). May god bring the day when this is no longer necessary >> > sooner rather than later. >> >> We'll get there. But we c

Re: [PHP-DEV] sync complete

2005-08-23 Thread Derick Rethans
On Tue, 23 Aug 2005, Lukas Smith wrote: > As for PHP 4.x I would expect that one to end sometimes in the first > part of next year. Heh, no way :) regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP Internals - PHP Runtime Development Mailing

Re: [PHP-DEV] sync complete

2005-08-23 Thread Derick Rethans
On Tue, 23 Aug 2005, Zeev Suraski wrote: > At 01:23 23/08/2005, Rasmus Lerdorf wrote: > >Greg Beaver wrote: > > > I just synced php-src/pear (PHP_5_0/PHP_5_1/PHP_4_4) with pear-core > > > (PEAR_1_3). May god bring the day when this is no longer necessary > > > sooner rather than later. > > > >We'

Re: [PHP-DEV] sync complete

2005-08-23 Thread Lukas Smith
Zeev Suraski wrote: At 01:23 23/08/2005, Rasmus Lerdorf wrote: Greg Beaver wrote: > I just synced php-src/pear (PHP_5_0/PHP_5_1/PHP_4_4) with pear-core > (PEAR_1_3). May god bring the day when this is no longer necessary > sooner rather than later. We'll get there. But we can't kill the 5.0

Re: [PHP-DEV] sync complete

2005-08-23 Thread Zeev Suraski
At 01:23 23/08/2005, Rasmus Lerdorf wrote: Greg Beaver wrote: > I just synced php-src/pear (PHP_5_0/PHP_5_1/PHP_4_4) with pear-core > (PEAR_1_3). May god bring the day when this is no longer necessary > sooner rather than later. We'll get there. But we can't kill the 5.0 tree until we have a 5