Re: [PHP-DEV] one RM to rule them all

2009-07-10 Thread Robert Lemke
Hi Lukas, thanks a lot for your outstanding work! And maybe it attracts you organizing the release of PHP 7.0? Cheers, robert Am 09.07.2009 um 20:05 schrieb Lukas Kahwe Smith: Aloha, FYI: Since 5.3.0 is out and we are now in maintenance mode for this branch, there is not really a need

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Pierre Joye
hi, I'm still in favour of #2 (Ilia's patch) as I don't see a real benefit of a weak typing implementation, it defeats the main goal of this addition. I'm also still opposed to add such thing in 5.3.x. Cheers, On Thu, Jul 9, 2009 at 9:47 AM, Zeev Suraskiz...@zend.com wrote: 2.  Move forward

Re: [PHP-DEV] CVS Account Request: rdohms

2009-07-10 Thread Pierre Joye
hi, can someone approve this request please? Cheers, On Thu, Jul 9, 2009 at 5:57 PM, Rafael Machado Dohmsrdo...@gmail.com wrote: I would like to keep writing tests for PHP as I have started in the PHP Test Fest. During this event i lead my UG to write 144 tests (PHPSP) and I myself wrote

Re: [PHP-DEV] CVS Account Request: rdohms

2009-07-10 Thread Derick Rethans
On Fri, 10 Jul 2009, Pierre Joye wrote: On Thu, Jul 9, 2009 at 5:57 PM, Rafael Machado Dohmsrdo...@gmail.com wrote: I would like to keep writing tests for PHP as I have started in the PHP Test Fest. During this event i lead my UG to write 144 tests (PHPSP) and I myself wrote 51 tests,

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Giovanni Giacobbi
On Fri, Jul 10, 2009 at 02:44:52AM +0200, troels knak-nielsen wrote: [...] For example, instead of: function addFive(int $x) { return $x + 5; } You would simply do: function addFive(is_numeric $x) { return $x + 5; } Since $x is guaranteed to be

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Ionut G. Stan
On 7/10/2009 13:23, Giovanni Giacobbi wrote: On Fri, Jul 10, 2009 at 02:44:52AM +0200, troels knak-nielsen wrote: [...] For example, instead of: function addFive(int $x) { return $x + 5; } You would simply do: function addFive(is_numeric $x) { return $x + 5;

Re: [PHP-DEV] Soap over SSL and

2009-07-10 Thread David Zülke
On 07.07.2009, at 16:18, Brian A. Seklecki wrote: On Tue, 2009-07-07 at 15:42 +0200, endrazine wrote: It is lacking any type of authentication of the payment gateway, which is not acceptable. I agree+++. The problem is that PHP SOAP uses an internal streams library instead of

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Lewis Wright
2009/7/10 Ionut G. Stan ionut.g.s...@gmail.com On 7/10/2009 13:23, Giovanni Giacobbi wrote: On Fri, Jul 10, 2009 at 02:44:52AM +0200, troels knak-nielsen wrote: [...] For example, instead of: function addFive(int $x) { return $x + 5; } You would simply do:

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alain Williams
On Fri, Jul 10, 2009 at 01:35:45PM +0300, Ionut G. Stan wrote: On 7/10/2009 13:23, Giovanni Giacobbi wrote: On Fri, Jul 10, 2009 at 02:44:52AM +0200, troels knak-nielsen wrote: [...] For example, instead of: function addFive(int $x) { return $x + 5; } You would

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Lewis Wright
2009/7/10 Alain Williams a...@phcomp.co.uk On Fri, Jul 10, 2009 at 01:35:45PM +0300, Ionut G. Stan wrote: On 7/10/2009 13:23, Giovanni Giacobbi wrote: On Fri, Jul 10, 2009 at 02:44:52AM +0200, troels knak-nielsen wrote: [...] For example, instead of: function addFive(int $x)

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Lukas Kahwe Smith
On 10.07.2009, at 13:20, Lewis Wright wrote: 3) function Foo(is_int($x)) { Function is_int is called, an error is raised if it returns false. But then you're complicating it to the point where it's no longer much more useful than just calling the is_numeric method in the function

Re: [PHP-DEV] one RM to rule them all

2009-07-10 Thread Christian Schneider
Robert Lemke wrote: thanks a lot for your outstanding work! Yes, I second that. Thanks, Lukas! And to Johannes: Keep up the good work! Cheers, - Chris -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alban
Le Thu, 09 Jul 2009 21:11:31 +0200, Geoffrey Sneddon a écrit : On 9 Jul 2009, at 18:20, Lukas Kahwe Smith wrote: On 09.07.2009, at 10:39, Paul Biggar wrote: I think we can take Lukas's RFC and either change it or write something based on it for weak typing only. If people here find it

Re: [PHP-DEV] CVS Account Request: rdohms

2009-07-10 Thread Rafael Dohms
Thank you guys. I'll check out what needs testing after the SVN migrations is 100% and i'm back from a 4 day vacation On Fri, Jul 10, 2009 at 5:58 AM, Derick Rethans der...@php.net wrote: On Fri, 10 Jul 2009, Pierre Joye wrote: On Thu, Jul 9, 2009 at 5:57 PM, Rafael Machado

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alain Williams
On Fri, Jul 10, 2009 at 08:45:55AM -0400, Alban wrote: Hello all, I don't understand why you focus on Strict / Weak question. It is really about: * type checking and enforcement or * type casting and generation of an error if the value cannot be converted cleanly Both of these have a

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Jack Allnutt
Please let me state that this is the greatest idea I read since the type hinting discussion began (and the only one I personally like, as I find all the other proposals really disappointing). +1. This contract system seems to be the best by far. -- PHP Internals - PHP Runtime

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Josh Thompson
Lukas Kahwe Smith m...@pooteeweet.org wrote: On 10.07.2009, at 13:20, Lewis Wright wrote: 3) function Foo(is_int($x)) { Function is_int is called, an error is raised if it returns false. But then you're complicating it to the point where it's no longer much more useful

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Ryan Panning
Alban wrote: I don't understand why you focus on Strict / Weak question. For me it's very simple, it's not obligatory use Type Hiting. Developpers wants to write a weak code, they'll just have to not use Type Hiting and developpers wants wrote a stric code they'll have to use it. After,

Re: [PHP-DEV] Soap over SSL and

2009-07-10 Thread endrazine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear list, dear David, David Zülke wrote: In short: $c = new SoapClient( 'https://foo/bar.wsdl', array( 'stream_context = stream_context_create(array( 'ssl' = array( 'verify_peer' = true ) )) ) );

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Giovanni Giacobbi
On Fri, Jul 10, 2009 at 01:40:47PM +0200, Lukas Kahwe Smith wrote: On 10.07.2009, at 13:20, Lewis Wright wrote: 3) function Foo(is_int($x)) { Function is_int is called, an error is raised if it returns false. But then you're complicating it to the point where it's no longer

Re: [PHP-DEV] Soap over SSL and

2009-07-10 Thread Hannes Magnusson
On Fri, Jul 10, 2009 at 16:38, endrazineendraz...@gmail.com wrote: David Zülke wrote: $c = new SoapClient(   'https://foo/bar.wsdl',   array(     'stream_context = stream_context_create(array(       'ssl' = array(         'verify_peer' = true       )     ))   ) ); This works and

Re: [PHP-DEV] Soap over SSL and

2009-07-10 Thread Richard Quadling
2009/7/10 David Zülke david.zue...@bitextender.com: On 07.07.2009, at 16:18, Brian A. Seklecki wrote: On Tue, 2009-07-07 at 15:42 +0200, endrazine wrote: It is lacking any type of authentication of the payment gateway, which is not acceptable. I agree+++. The problem is that PHP SOAP

Re: [PHP-DEV] Soap over SSL and

2009-07-10 Thread endrazine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hannes Magnusson wrote: On Fri, Jul 10, 2009 at 16:38, endrazineendraz...@gmail.com wrote: David Zülke wrote: $c = new SoapClient( 'https://foo/bar.wsdl', array( 'stream_context = stream_context_create(array( 'ssl' = array(

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alain Williams
Just to add a little fuel to this fire, should we allow the specification of return type of functions, eg: function int Factorial(int $num) {...} What about things that return FALSE on error, eg fgets(), something like this: function (string, bool) fgets(resource $handle, int

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alban
Le Fri, 10 Jul 2009 14:23:24 +0100, Alain Williams a écrit : On Fri, Jul 10, 2009 at 08:45:55AM -0400, Alban wrote: Hello all, I don't understand why you focus on Strict / Weak question. It is really about: * type checking and enforcement or * type casting and generation of an

RE: [PHP-DEV] Soap over SSL and

2009-07-10 Thread Uwe Schindler
As far as I know, SOAP does not use the HTTP wrappers directly, it uses only sockets/ssl for communication (so the context applies only to the lower level SSL socket). So CURL is not used, because PHP's HTTP streams are not used. - Uwe Schindler theta...@php.net - http://www.php.net NSAPI

Re: [PHP-DEV] Soap over SSL and

2009-07-10 Thread Hannes Magnusson
On Fri, Jul 10, 2009 at 16:52, endrazineendraz...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hannes Magnusson wrote: On Fri, Jul 10, 2009 at 16:38, endrazineendraz...@gmail.com wrote: David Zülke wrote: $c = new SoapClient(   'https://foo/bar.wsdl',   array(    

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Richard Quadling
2009/7/10 Alain Williams a...@phcomp.co.uk: Just to add a little fuel to this fire, should we allow the specification of return type of functions, eg:        function int Factorial(int $num) {...} What about things that return FALSE on error, eg fgets(), something like this:        

Re: [PHP-DEV] Soap over SSL and

2009-07-10 Thread Hannes Magnusson
On Fri, Jul 10, 2009 at 16:58, Uwe Schindlertheta...@php.net wrote: As far as I know, SOAP does not use the HTTP wrappers directly, it uses only sockets/ssl for communication (so the context applies only to the lower level SSL socket). So CURL is not used, because PHP's HTTP streams are not

Re: [PHP-DEV] Soap over SSL and

2009-07-10 Thread endrazine
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hannes Magnusson wrote: On Fri, Jul 10, 2009 at 16:58, Uwe Schindlertheta...@php.net wrote: As far as I know, SOAP does not use the HTTP wrappers directly, it uses only sockets/ssl for communication (so the context applies only to the lower level

Re: [PHP-DEV] Soap over SSL and

2009-07-10 Thread David Zülke
On 10.07.2009, at 17:00, Hannes Magnusson wrote: On Fri, Jul 10, 2009 at 16:58, Uwe Schindlertheta...@php.net wrote: As far as I know, SOAP does not use the HTTP wrappers directly, it uses only sockets/ssl for communication (so the context applies only to the lower level SSL socket). So

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alain Williams
On Fri, Jul 10, 2009 at 10:57:22AM -0400, Alban wrote: Le Fri, 10 Jul 2009 14:23:24 +0100, Alain Williams a écrit : On Fri, Jul 10, 2009 at 08:45:55AM -0400, Alban wrote: Hello all, I don't understand why you focus on Strict / Weak question. It is really about: * type

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Lukas Kahwe Smith
On 10.07.2009, at 17:16, Alain Williams a...@phcomp.co.uk wrote: On Fri, Jul 10, 2009 at 10:57:22AM -0400, Alban wrote: Le Fri, 10 Jul 2009 14:23:24 +0100, Alain Williams a écrit And Exception is better than an Error because this give one chance to programmer for resolving the

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Zeev Suraski
At 10:42 10/07/2009, Pierre Joye wrote: hi, I'm still in favour of #2 (Ilia's patch) as I don't see a real benefit of a weak typing implementation, it defeats the main goal of this addition. I'm also still opposed to add such thing in 5.3.x. Can you elaborate on what is the main goal of this

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alban
Le Fri, 10 Jul 2009 16:16:51 +0100, Alain Williams a écrit : On Fri, Jul 10, 2009 at 10:57:22AM -0400, Alban wrote: Le Fri, 10 Jul 2009 14:23:24 +0100, Alain Williams a écrit : On Fri, Jul 10, 2009 at 08:45:55AM -0400, Alban wrote: Hello all, I don't understand why you focus on

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alain Williams
On Fri, Jul 10, 2009 at 11:50:04AM -0400, Alban wrote: Le Fri, 10 Jul 2009 16:16:51 +0100, Alain Williams a écrit : The GET argument, yes, should be an integer, but it's possible is not ! In this, actually i always use this syntaxe : is_child(intval($_GET['age'])); or is_child( (int)

Fwd: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread troels knak-nielsen
-- Forwarded message -- From: troels knak-nielsen troel...@gmail.com Date: Fri, Jul 10, 2009 at 2:12 PM Subject: Re: [PHP-DEV] Type hinting - Request for Discussion To: Lukas Kahwe Smith m...@pooteeweet.org On Fri, Jul 10, 2009 at 1:40 PM, Lukas Kahwe Smithm...@pooteeweet.org

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Jack Allnutt
*You* do the above because you know that you should; (hopefully you do other checks as well). One of the things that we are doing is trying to help the naive/lazy programmer who doesn't bother - or thinks that javascript checking is enough :-( What we want to do is to generate an

Re: Fwd: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alain Williams
On Fri, Jul 10, 2009 at 06:10:33PM +0200, troels knak-nielsen wrote: So you suggest the following goals: Move common validation code out of the function body in order to * reduce code * increase readability * enable IDE's to be even smarter. Also it will improve reflection, this could be

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Stanislav Malyshev
Hi! According to Zeev's description of the behavior this would cause a fatal error, as $_GET['a'] cannot be converted to an integer value.. I like that, but I think we need to devise a mechanism that allows you to catch this error at runtime and write application logic around it... In the

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Stanislav Malyshev
Hi! right .. lets not forget the original goal (though it hasnt been perfectly defined) the idea was to move common validation code out of the function body to reduce code, increase readability and enable IDE's to be even smarter. I think while intent is good (avoiding repetitive code) the

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Stanislav Malyshev
Hi! This would be the perfect pairing. A library utilizing strict/enforced types would surely want to indicate explicitly the return type. To what use? PHP can't do static type checking, and for dynamic checking specifying the type is useless - it's zval that gets checked, not the

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Lukas Kahwe Smith
On 10.07.2009, at 19:58, Stanislav Malyshev wrote: Hi! right .. lets not forget the original goal (though it hasnt been perfectly defined) the idea was to move common validation code out of the function body to reduce code, increase readability and enable IDE's to be even smarter. I

[PHP-DEV] SVN Conversion Complete

2009-07-10 Thread Gwynne Raskind
The conversion from CVS to SVN is complete. CVS read AND write access has been completely disabled. SVN is now up and running, however *we remain in commit freeze* until Monday. Commits to SVN in order to fix critical problems (such as all those scripts which should have been made ready a