[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 l

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

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 specificat

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! 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 simple

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 coul

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 error/warning

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

2009-07-10 Thread troels knak-nielsen
-- Forwarded message -- From: troels knak-nielsen Date: Fri, Jul 10, 2009 at 2:12 PM Subject: Re: [PHP-DEV] Type hinting - Request for Discussion To: Lukas Kahwe Smith On Fri, Jul 10, 2009 at 1:40 PM, Lukas Kahwe Smith wrote: > right .. lets not forget the original goal (though

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( (i

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

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 a

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

2009-07-10 Thread Lukas Kahwe Smith
On 10.07.2009, at 17:16, Alain Williams 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 problem before program

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:

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 Schindler 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, be

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 Schindler 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

Re: [PHP-DEV] Soap over SSL and

2009-07-10 Thread Hannes Magnusson
On Fri, Jul 10, 2009 at 16:58, Uwe Schindler 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 > used. A.

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

2009-07-10 Thread Richard Quadling
2009/7/10 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 (st

Re: [PHP-DEV] Soap over SSL and

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

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 SAPI

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 generat

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] 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, endrazine wrote: >> David Zülke wrote: >> >>> $c = new SoapClient( >>> 'https://foo/bar.wsdl', >>> array( >>> 'stream_context" => stream_context_create(array( >>> 'ssl' => array( >>

Re: [PHP-DEV] Soap over SSL and

2009-07-10 Thread Richard Quadling
2009/7/10 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

Re: [PHP-DEV] Soap over SSL and

2009-07-10 Thread Hannes Magnusson
On Fri, Jul 10, 2009 at 16:38, endrazine 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 work

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 i

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 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] Type hinting - Request for Discussion

2009-07-10 Thread Josh Thompson
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 > > much more > > useful

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 Development

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] 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 wrote: > On Fri, 10 Jul 2009, Pierre Joye wrote: > > > On Thu, Jul 9, 2009 at 5:57 PM, Rafael Machado Dohms > wrote: > > > > > I

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 pe

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 bod

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

2009-07-10 Thread Lewis Wright
2009/7/10 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(i

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 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; > >>

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

2009-07-10 Thread Lewis Wright
2009/7/10 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: >>> >

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 libcur

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] 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

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 Dohms 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, for th

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 Dohms 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, for

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 Suraski wrote: > 2.  Move forward with the seman