[PHP-DEV] CVS Account Request: hulayan

2006-11-10 Thread Sam Ulayan
Publish PHP -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Namespaces in PHP 6 - ++$take

2006-11-10 Thread Jessie Hernandez
Hello, I haven't had time to work on my patch, but thinking about this some more, I'm convinced namespaces should only contain classes. The only problem that was present when permitting functions/constants to be inside namespaces was the ambiguity in ternary expressions. By just supporting cl

[PHP-DEV] Re: Namespaces in PHP 6 - ++$take

2006-11-10 Thread David Lindstrom
Hello Internals. I'm not sure how many of you know about Phalanger [1][2]. For those who don't, it's a fairly complete PHP language compiler, compiling PHP5 sources into MSIL bytecodes, which can then be executed on the .NET platform or Mono. Since the .NET framework makes heavy use of namespac

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Robert Cummings
On Sat, 2006-11-11 at 00:31 +0100, Marcus Boerger wrote: > Hello Hans, > > Friday, November 10, 2006, 8:30:55 PM, you wrote: > > > Brian Moon wrote: > >>> Unfortunately namespaces are not only syntactic sugar, but dire > >>> necessity > >>> for PHP if it wants to be taken as a serious langauage a

Re: [PHP-DEV] strange php_stream_from_zval requires return_value

2006-11-10 Thread Antony Dovgal
On 11/11/2006 04:13 AM, Arnold Daniels wrote: Hi, I've noticed that building an extension will fail when using macro php_stream_from_zval and there is not return_value variable within the scope. Well, looks like it's time to install cscope or ctags and use it to see which code actually stan

[PHP-DEV] strange php_stream_from_zval requires return_value

2006-11-10 Thread Arnold Daniels
Hi, I've noticed that building an extension will fail when using macro php_stream_from_zval and there is not return_value variable within the scope. /root/php-5.1.6/ext/hello/hello.c: In function `streamit': /root/php-5.1.6/ext/hello/hello.c:58: error: `return_value' undeclared (first use in

Re: [PHP-DEV] Private patches in PHP CVS? [was Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_2) / zend_language_scanner.l]

2006-11-10 Thread Pierre
Hello, On 11/10/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: Hello Edin, is it so hard to understand? Ok just kidding, it might not be obvious but as soon as you start to develop stuff that is supposed to run onboth 5 and 6 binary makesa bunch of things easier. Somehow like having var in 5 -

Re: [PHP-DEV] Re: cvs: ZendEngine2(PHP_5_2) / zend_language_scanner.l

2006-11-10 Thread Rasmus Lerdorf
Stanislav Malyshev wrote: > >> Please, lets keep 5.x code in 5.x and 6.x code in 6.x, different >> branches exist for a good reason. > > Well, then I guess we shouldn't have (binary) in 5.x? A lot of functions in PHP 6 are able to take both binary and Unicode strings and act differently when the

Re: [PHP-DEV] newbie question nr 2: compile error when using php_stream_get_line

2006-11-10 Thread Arnold Daniels
Hi again, I thought that this might not be interesting enough for the list. But I'll be sure CC it in the future. Thanks for your help, the extension now builds. It doesn't run however. I crashes on PHP_STREAM_TO_ZVAL(stream, in). But I'm sure I'm able to fix that problem myself. Thanks ag

Re: [PHP-DEV] Re: cvs: ZendEngine2(PHP_5_2) / zend_language_scanner.l

2006-11-10 Thread Rob Richards
Due to encoding issues, I made it that binary strings were required for the XML based extensions when loading documents via strings. By adding the binary cast to 5.x it will at least allow developers to prepare for this change when 6 is rolled out, so imo this is a good idea. Rob Ilia Alshan

Re: [PHP-DEV] Re: cvs: ZendEngine2(PHP_5_2) / zend_language_scanner.l

2006-11-10 Thread Stanislav Malyshev
Please, lets keep 5.x code in 5.x and 6.x code in 6.x, different branches exist for a good reason. Well, then I guess we shouldn't have (binary) in 5.x? -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP Internals - PHP Runtime Development Mailing Li

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Marcus Boerger
Hello Hans, Friday, November 10, 2006, 8:30:55 PM, you wrote: > Brian Moon wrote: >>> Unfortunately namespaces are not only syntactic sugar, but dire >>> necessity >>> for PHP if it wants to be taken as a serious langauage and defend it's >>> position against other arising 'web scripting' alterna

Re: [PHP-DEV] Re: cvs: ZendEngine2(PHP_5_2) / zend_language_scanner.l

2006-11-10 Thread Ilia Alshanetsky
On 10-Nov-06, at 6:24 PM, Stanislav Malyshev wrote: Marcus Boerger wrote: Hello Edin, is it so hard to understand? Ok just kidding, it might not be obvious but as soon as you start to develop stuff that is supposed to run onboth 5 and 6 binary makesa bunch of things easier. Somehow like

[PHP-DEV] Re: cvs: ZendEngine2(PHP_5_2) / zend_language_scanner.l

2006-11-10 Thread Stanislav Malyshev
Marcus Boerger wrote: Hello Edin, is it so hard to understand? Ok just kidding, it might not be obvious but as soon as you start to develop stuff that is supposed to run onboth 5 and 6 binary makesa bunch of things easier. Somehow like having var in 5 - only the other way round. There are su

Re: [PHP-DEV] Hash Algorithm [was: Re: [PHP-DEV] Namespaces in PHP 6 - ++$take]

2006-11-10 Thread Marcus Boerger
Hello Sebastian, the best ones unfortunatley are GPL and thus not acceptable. I once played with case insensitive hashes. They worked very much faster - but they had more conflicts. If we were about intel processors my experience is that string functions can be optimized at assembler level very

Re: [PHP-DEV] Private patches in PHP CVS? [was Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_2) / zend_language_scanner.l]

2006-11-10 Thread Marcus Boerger
Hello Edin, is it so hard to understand? Ok just kidding, it might not be obvious but as soon as you start to develop stuff that is supposed to run onboth 5 and 6 binary makesa bunch of things easier. Somehow like having var in 5 - only the other way round. best regards marcus Friday, November

Re: [PHP-DEV] Feature request

2006-11-10 Thread Marcus Boerger
Hello Dmitry, the major problem here is that people have a wrong understanding of what it would do. Without return by reference it creates copies which not only makes assignments useless but also read code very slow. To overcome this, we would need to discuss another error message's fate/severit

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Patrick Mueller
Tony Bibbs wrote: While I could munge the class names in one or more packages as you suggest then I'm in maintainability hell because when I need to update one of the other packages (for security, features or bugfixes) you have to do the name munging again. C'mon, that ain't right. Next excu

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Tony Bibbs
Ilia Alshanetsky wrote: If you properly pick a classname you almost never need to rename it let alone the methods contained with the class. Plus namespaces are going to introduce their own sets of problems where extension X adds namespace X, which some lib already decided to use and we are b

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Ilia Alshanetsky
On 10-Nov-06, at 5:01 PM, Lukas Kahwe Smith wrote: Remember the point Sebastian made earlier. Its also a hassle during development of the library code itself, where you have to deal with endlessly long class names. You still have the same long names, you've just split them into two namesp

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Ilia Alshanetsky
On 10-Nov-06, at 4:57 PM, Tony Bibbs wrote: While I could munge the class names in one or more packages as you suggest then I'm in maintainability hell because when I need to update one of the other packages (for security, features or bugfixes) you have to do the name munging again. What

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Lukas Kahwe Smith
Patrick Mueller wrote: There would typically be a one time 'hit' in your code for a long, prefixed named used as a constructor, or possibly a static method called on a factory. After that, if you're dealing with object instances, then instead of function names (which would need to also use a

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Tony Bibbs
While I could munge the class names in one or more packages as you suggest then I'm in maintainability hell because when I need to update one of the other packages (for security, features or bugfixes) you have to do the name munging again. C'mon, that ain't right. Next excuse? --Tony Patric

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Patrick Mueller
Daniel T. Gorski wrote: Escpecially due to the new OO features of PHP 5, namespaces are urgently required for writers of independent libraries which should not clash. I would claim exactly the opposite. That's because you already get scoping on names, for free, when you use objects. The meth

Re: [PHP-DEV] newbie question nr 2: compile error when using php_stream_get_line

2006-11-10 Thread Johannes Schlüter
Hi, errors complaining about something related to tsrm_ls mean that you're building a thread-safe PHP and forgot some TSRMLS[_...] macros. See for example http://blog.libssh2.org/index.php?/archives/22-What-the-heck-is-TSRMLS_CC-anyway.html for more about these macros. This should help you, but

[PHP-DEV] newbie question nr 2: compile error when using php_stream_get_line

2006-11-10 Thread Arnold Daniels
Hi, I've got another newbie question. My .ini parser now works correctly when parsing a string (thanks to help of Matt Wilmas). With the same function I want to be able to parse content of a stream. I looked at fgets to see how to read a line from a stream. Unfortunately when I call php_strea

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Hans Lellelid
Brian Moon wrote: >> Unfortunately namespaces are not only syntactic sugar, but dire >> necessity >> for PHP if it wants to be taken as a serious langauage and defend it's >> position against other arising 'web scripting' alternatives. > > It seems the list of things that PHP needs to be "taken as

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Brian Moon
Unfortunately namespaces are not only syntactic sugar, but dire necessity for PHP if it wants to be taken as a serious langauage and defend it's position against other arising 'web scripting' alternatives. It seems the list of things that PHP needs to be "taken as a serious langauage" is never

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Hans Lellelid
>> I think there is far more >> demand for a fast & stable PHP then for syntatic sugar features which >> seem extremely useful, but in the end prove to carry too much baggage. >> > > Nothing has been proven either way.. at least not publicly.. unless I > just missed it. > I haven't talked

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Ilia Alshanetsky
On 10-Nov-06, at 1:19 PM, Sean Coates wrote: PHP 6 is not yet out and probably won't be production quality for quite some time. Which means that migration to it en mass is probably not going to happen this decade :-). I'm not talking about forcing everyone to use namespaces tomorrow. I'm t

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Daniel T. Gorski
On 10 Nov 13:05, Ilia Alshanetsky wrote: > On 10-Nov-06, at 12:41 PM, Sean Coates wrote: >> [...] >> I also don't deny that there will be a minor performance hit. There are a >> ton of other things in PHP that reduce performance.. the idea is to find >> a balance of which ones are worth it (as w

[PHP-DEV] Hash Algorithm [was: Re: [PHP-DEV] Namespaces in PHP 6 - ++$take]

2006-11-10 Thread Sebastian Bergmann
Ilia Alshanetsky wrote: > As your key size increases the slower the key hash generation process > becomes, if you look at the PHP's hash key generation code you'll see > that it works best for 8 or less chars, anything longer and the > performance starts to drop. It's been a long time since I stu

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Sean Coates
> PHP 6 is not yet out and probably won't be production quality for quite > some time. Which means that migration to it en mass is probably not > going to happen this decade :-). I'm not talking about forcing everyone to use namespaces tomorrow. I'm trying to plan for a future where there's a sen

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Ilia Alshanetsky
On 10-Nov-06, at 12:54 PM, Sebastian Bergmann wrote: Ilia Alshanetsky wrote: If anything it'll make code complex and intertwined, introduce serious scope issue most people have not had to consider up until now and so on. It will without a doubt increase language complexity as well, which

[PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_2) / zend_language_scanner.l

2006-11-10 Thread Stanislav Malyshev
Derick Rethans wrote: derick Fri Nov 10 12:02:51 2006 UTC Modified files: (Branch: PHP_5_2) /ZendEngine2 zend_language_scanner.l Log: - Forward port the binary cast, which will do the same as the string cast in PHP 5.2. What this is supposed to do in PH

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Ilia Alshanetsky
On 10-Nov-06, at 12:41 PM, Sean Coates wrote: I don't think namespaces are a magic bullet. As it stands, it's impossible to use namespaces without a third party patch that may or may not work. I strongly believe that if namespaces are implemented in PHP 6, most of our prefixing/symbol collis

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Sebastian Bergmann
Ilia Alshanetsky wrote: > If anything it'll make code complex and intertwined, introduce serious > scope issue most people have not had to consider up until now and so > on. It will without a doubt increase language complexity as well, which > generally translates to a loss in performance. Am I r

RE: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Andi Gutmans
Too long of an email to read :) but just wanted to give a heads-up that we haven't forgotten about this (it's on the PHP 6 list). We'll try and come with a proposal in the coming weeks with a way to do it. > -Original Message- > From: Sean Coates [mailto:[EMAIL PROTECTED] > Sent: Friday,

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Sean Coates
> That's a bit of a circular logic no? There are indeed technical > challenges to implementing namespaces, these reasons have been covered > in previous discussions many times, since no adequate solution was > devised they were never implemented. Once those issues are resolved or > at the very leas

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Ilia Alshanetsky
On 10-Nov-06, at 11:51 AM, Sean Coates wrote: The way I see it is that implementing namespaces is a technical hurdle, and the reasons we haven't jumped it are political, not technical. That's a bit of a circular logic no? There are indeed technical challenges to implementing namespaces, t

[PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-10 Thread Sean Coates
Hello all, A number of factors have come together to prompt me to possibly commit mailing-list-suicide by re-opening the namespace issue. Last week at Zendcon, a number of PHP developers/community members chatted about namespaces in PHP 6. That chat was the prime motivator for this email, but the

Re: [PHP-DEV] Feature request

2006-11-10 Thread Antony Dovgal
On 11/10/2006 12:21 AM, Dmitry Shirokov wrote: Hey guys. What are you thinking about adding this feature: I would really like to see everybody spending more time on existing problems and bugs instead of adding more and more doubtfully useful features. There are not more than 3 active mem

Re: [PHP-DEV] Yet another feature request

2006-11-10 Thread Patrick Mueller
Arnold Daniels wrote: I see this is the time to do language feature request. So let me add another. I very often use something like: /$a = isset($x['abc']) ? //$x['abc'] : null; /This is to prevent an E_NOTICE from being thrown. It seems to me like adding a function: mixed array_get(mixed

[PHP-DEV] Private patches in PHP CVS? [was Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2(PHP_5_2) / zend_language_scanner.l]

2006-11-10 Thread Edin Kadribasic
Hi Derick, Would this patch provide any benefits for people outside EZ corporation? You seem to think that It wouldn't since you din't bother to ask the rest of the PHP devs on internals. Could you please explain? Edin Derick Rethans wrote: > derickFri Nov 10 12:02:51 2006 UTC >

Re: [PHP-DEV] Unicode chars allowed in numbers?

2006-11-10 Thread Matt Wilmas
Hi Andrei, All right, glad I checked. I had a few things in mind to optimize is_numeric_string/unicode, and it's fairly straightforward in _string, but would just make things slower if u_* functions were needed to do the same in _unicode, so I was going to rethink it. Now whatever I come up with

Re: [PHP-DEV] Optimization for ..._MULTIPLY_LONG on more systems

2006-11-10 Thread Nuno Lopes
> Did it not work for you as-is on Windows...? It did for me, since it seems > there's already a typedef for __int64 -> long long. I'd wondered the same, I think some VC versions on windows don't know "long long" but do know __int64, but I don't remember from the top of my head which versio

[PHP-DEV] Re: Yet another feature request

2006-11-10 Thread M.Sokolewicz
read the archives, there's been a LOT of discussion about this already. AFAIK the team decided not to implement this before PHP 6.0. - tul Arnold Daniels wrote: Hi, I see this is the time to do language feature request. So let me add another. I very often use something like: /$a = isset($x[

[PHP-DEV] Yet another feature request

2006-11-10 Thread Arnold Daniels
Hi, I see this is the time to do language feature request. So let me add another. I very often use something like: /$a = isset($x['abc']) ? //$x['abc'] : null; /This is to prevent an E_NOTICE from being thrown. This subject is already discussed many times, which led to a suggestion for PHP6

Re: [PHP-DEV] Feature request

2006-11-10 Thread Alain Williams
On Fri, Nov 10, 2006 at 12:55:45PM +0100, Sebastian Bergmann wrote: > Dmitry Shirokov wrote: > > > function foo() > > { > >return array(1,2,3,4,5,6); > > } > > > > echo foo()[4]; // < it that > > // or may be (foo())[4] ? > > > > > > // instead of > > $var = foo(); > > echo $var[4]; >

Re: [PHP-DEV] Feature request

2006-11-10 Thread Alain Williams
On Fri, Nov 10, 2006 at 05:05:05AM -0700, Rick Widmer wrote: > > > Stanislav Malyshev wrote: > >I'd say expression(f()[1]) means $tmp = f(); expression($tmp); > >unset($tmp); which here means: > >$tmp = foo(); > >$tmp[1] = 4; > >unset($tmp); > > > >which is meaningless but should work. IIRC the

Re: [PHP-DEV] zend_u_strtod() 400% speed up

2006-11-10 Thread Antony Dovgal
On 11/10/2006 02:14 PM, Matt Wilmas wrote: Hi Antony, - Original Message - From: "Antony Dovgal" Sent: Friday, November 10, 2006 Hello all. I would like to propose a replacement for current zend_u_strtod() implementation. The patch: http://tony2001.phpclub.net/dev/tmp/u_strtod.diff

Re: [PHP-DEV] Feature request

2006-11-10 Thread Rick Widmer
Stanislav Malyshev wrote: I'd say expression(f()[1]) means $tmp = f(); expression($tmp); unset($tmp); which here means: $tmp = foo(); $tmp[1] = 4; unset($tmp); which is meaningless but should work. IIRC the engine can make free's at the end of expression, so it shouldn't be big problem. Actu

Re: [PHP-DEV] Feature request

2006-11-10 Thread Sebastian Bergmann
Dmitry Shirokov wrote: > function foo() > { >return array(1,2,3,4,5,6); > } > > echo foo()[4]; // < it that > // or may be (foo())[4] ? > > > // instead of > $var = foo(); > echo $var[4]; > ?> Although I am not a huge fan of method chaining in general (see [1]), I am happy to have

Re: [PHP-DEV] zend_u_strtod() 400% speed up

2006-11-10 Thread Matt Wilmas
Hi Antony, - Original Message - From: "Antony Dovgal" Sent: Friday, November 10, 2006 > Hello all. > > I would like to propose a replacement for current zend_u_strtod() implementation. > The patch: http://tony2001.phpclub.net/dev/tmp/u_strtod.diff > > According to my tests, new implementa

Re: [PHP-DEV] Feature request

2006-11-10 Thread Jan Schneider
Zitat von Dmitry Shirokov <[EMAIL PROTECTED]>: Hey guys. What are you thinking about adding this feature: Yes, please, that would be most important shorthand functionality after dereferencing. Jan. -- Do you need professional PHP or Horde consulting? http://horde.org/consulting/ -- PH

Re: [PHP-DEV] make php build on non-Linux: test ... == ...

2006-11-10 Thread Richard Quadling
Doing a quick check on ... pear pear-core pecl phpdoc php-src ZendAPI ZendEngine2 I've attached diffs to deal with == being = for compliance. On 09/11/06, Hubert Feyrer <[EMAIL PROTECTED]> wrote: Hi, I've stumbled across this with php5, but this is also in php6 (against which the patch

[PHP-DEV] zend_u_strtod() 400% speed up

2006-11-10 Thread Antony Dovgal
Hello all. I would like to propose a replacement for current zend_u_strtod() implementation. The patch: http://tony2001.phpclub.net/dev/tmp/u_strtod.diff According to my tests, new implementation is faster in about 40 (forty) times. The simple script below takes ~1 sec to run with the patch and

Re: [PHP-DEV] Unicode chars allowed in numbers?

2006-11-10 Thread Andrei Zmievski
Hi Andrei, et al., I was just looking at README.UNICODE, regarding interpretation of numbers: "we restrict numbers to consist only of ASCII digits," and "Numeric strings are supposed to adhere to the same rules." Is it correct to take that to mean only UChar's with values from '0'-'9'/0x3

[PHP-DEV] CVS Account Request: janisto

2006-11-10 Thread Jani Mikkonen
Add PEAR package Validate_FI to CVS. I'm the lead developer. I need access to the package and documentation. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php