Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Simon Schick
2012/3/8 John Crenshaw : > > Conversion the other way is essential. Consider the following URL: > > http://example.com?foo=1 > > In your PHP script $_GET['foo'] === '1' (a string). > > In fact, nearly every input to PHP is a string. This is why PHP was designed > with some seriously robust type ju

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Rick WIdmer
On 3/7/2012 8:48 PM, John Crenshaw wrote: In fact, nearly every input to PHP is a string. This is why PHP was designed with some seriously robust type juggling on scalars. Any typing proposal that wants to actually pass a vote is going to have to allow appropriate implicit conversions from stri

RE: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread John Crenshaw
From: Simon Schick [mailto:simonsimc...@googlemail.com] > > > > I consider interchangeable only three cases: > > 1. Numerical string. > > 2. Integers and floats as strings. > > 3. Integer and string  0 1 as bool. > > > > Any other cases should error out. > > Until now I thought about the weak v

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Anthony Ferrara
John, > Thanks...and aw crap. I hate feeling like I shut the door on something. Not at all. I don't feel bad about this in the least. Yes, I would have liked to have gotten it in, but I want a good solution before I want mine. So I'm absolutely willing to withdraw this RFC, as it does have iss

RE: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread John Crenshaw
> Now we understand each other fully... > > Point taken. > > I've withdrawn the parameter hinting RFC. > Thanks...and aw crap. I hate feeling like I shut the door on something. Let's make sure we can salvage as much as possible here: 1. The structure of the patch looked like it was reusable re

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Simon Schick
Hi, Just a small addition to what I wrote about handling null ... function foo(array $d = array()) { var_dump($d); } foo(null); // This fails with the message: Argument 1 passed to foo() must be an array, null given As this code fails I'd not expect to change this behavior for the weak-types. f

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Anthony Ferrara
John, Thanks a lot for the reply. Comments inline: > You've been spending a lot of time defending these proposals and trying to > prove wrong feedback that raises concerns. This is preventing you from > actually using the feedback to improve the proposals. You are losing out on > perhaps the

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Simon Schick
Hi Arvids, I pretty much like this idea as it's more strict. Let me say something to the questions you pointed out here. 2012/3/7 Arvids Godjuks : > I realize that with scalars it's not that straight forward, but > complicating things by adding an auto-cast syntax and so on is just > ridiculous.

Re: [PHP-DEV] Re: Git Migration: Status Update

2012-03-07 Thread Ryan McCue
Kris Craig wrote: As I and others have said already, using a Subversion branching model on Git just doesn't make any sense. We may as well just keep using SVN if we're not going to make use of Git's branching advantages. I completely disagree. There's no need to completely switch your branchi

RE: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread John Crenshaw
> From: Anthony Ferrara [mailto:ircmax...@gmail.com] > > John, > > On Tue, Mar 6, 2012 at 9:04 PM, John Crenshaw > wrote: > > A good number of issues with the current proposal were raised during the > > discussion on the mailing list. I don't feel like digging them all up right > > now, but o

Re: [PHP-DEV] '

2012-03-07 Thread Ángel González
El 07/03/12 00:15, Kris Craig wrote: > > > To clarify again, I was under the mistaken impression that was a new > > alias for short_open_tag. My argument was (and still is) against > > short_open_tag. I do see some use in this new echo alias for > templating > > purposes.

Re: [PHP-DEV] Providing sandboxed versions of include and require language constructs

2012-03-07 Thread Ángel González
On 07/03/12 00:04, Adam Jon Richardson wrote: > It would be the responsibility of the framework or CMS or application > to protect against this type of attack (which they do quite well.) > When you can force a plugin to work through your API, you can take > appropriate measures. When the plugin can

Re: [PHP-DEV] Quoting again (Was: Re: [PHP-DEV] [RFC] Config setting to force all math operations to pass through BCMath library.

2012-03-07 Thread Lester Caine
Derick Rethans wrote: Part of quoting correctly, is to trim out things you're not replying too. And remove signatures as well (any proper client does that!). Which means, everything after the "-- " + return should be removed. Exactly ... One line answers are not a problem ... they don't need an

Re: [PHP-DEV] Quoting again (Was: Re: [PHP-DEV] [RFC] Config setting to force all math operations to pass through BCMath library.

2012-03-07 Thread Derick Rethans
On Wed, 7 Mar 2012, Kris Craig wrote: > On Wed, Mar 7, 2012 at 10:31 AM, Sebastian Bergmann wrote: > > > Am 07.03.2012 11:05, schrieb Derick Rethans: > > >> "3. Do not top post. Place your answer underneath anyone you wish to > > >> quote and remove any previous comment that is not relevant to yo

Re: [PHP-DEV] Re: [VOTE] APXS LoadModule Option in configure

2012-03-07 Thread Kris Craig
On Tue, Mar 6, 2012 at 11:56 PM, Lester Caine wrote: > Kris Craig wrote: > >> I'll commit the changes to 5.4 at the earliest opportunity. I just >> realized that the language was somewhat vague as to whether it should be >> applied to 5.3 branch or not; I don't really care either way but I'll >>

Re: [PHP-DEV] Re: Git Migration: Status Update

2012-03-07 Thread Kris Craig
Umm Sebastian, how many times do I have to explain that *I agree with you*?! Please read my post before responding. Specifically, point #5. I hate repeating myself, so I'll simply copy/paste it if you don't mind: "when I draft it I'll propose a gradual adoption scheme" --Kris On Wed

Re: [PHP-DEV] Quoting again (Was: Re: [PHP-DEV] [RFC] Config setting to force all math operations to pass through BCMath library.

2012-03-07 Thread Kris Craig
On Wed, Mar 7, 2012 at 10:31 AM, Sebastian Bergmann wrote: > Am 07.03.2012 11:05, schrieb Derick Rethans: > >> "3. Do not top post. Place your answer underneath anyone you wish to > >> quote and remove any previous comment that is not relevant to your > >> post." > > Couldn't agree more, such quo

Re: [PHP-DEV] Re: Git Migration: Status Update

2012-03-07 Thread Sebastian Bergmann
Am 07.03.2012 19:46, schrieb Kris Craig: > As I and others have said already, using a Subversion branching model > on Git just doesn't make any sense. How often does it have to be explained to you and others that we would like to do this step by step? First we change the tool, then we change th

Re: [PHP-DEV] Re: Git Migration: Status Update

2012-03-07 Thread Kris Craig
On Wed, Mar 7, 2012 at 1:12 AM, David Soria Parra wrote: > On 2012-03-07, Kris Craig wrote: > > --f46d044304ec4e135704baa12342 > > Content-Type: text/plain; charset=ISO-8859-1 > > > > On Tue, Mar 6, 2012 at 10:09 PM, Kiall Mac Innes > wrote: > > > >> On Wed, Mar 7, 2012 at 6:03 AM, Drak wrote:

Re: [PHP-DEV] Quoting again (Was: Re: [PHP-DEV] [RFC] Config setting to force all math operations to pass through BCMath library.

2012-03-07 Thread Sebastian Bergmann
Am 07.03.2012 11:05, schrieb Derick Rethans: >> "3. Do not top post. Place your answer underneath anyone you wish to >> quote and remove any previous comment that is not relevant to your >> post." Couldn't agree more, such quoting is really annoying. While we are at the topic of etiquette: pleas

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Stas Malyshev
Hi! would make even less sense, since it would need to be cast, so the following would return false: function foo((string) $bar = 123) { return $bar === 123; } foo(); You explicitly said "convert, then compare excluding conversion", what would you expect? That's like saying "why $a+1 is

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Lazare Inepologlou
> You could try some kind of stricter casting. Where odd conversions between array/object <-> bool/int/float/string do not work on parameter casting .. but then you end up with two types of casting ... I have used in depth the casting operators of C#, which are incredibly flexible and powerful, an

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Alan Knowles
Comment in-line below... On Wednesday, March 07, 2012 07:10 AM, Simon Schick wrote: Hi,: It got quite around that because we have some RFCs to this where the functionality seems to be defined as the people thought it should be. Otherwise they can raise their hands and write a mail that they wan

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Arvids Godjuks
I, for one, decided not to participate in the discussions any more because they always change to something different in a few hours of discussion. I'm surprised how people tend to complicate the feature into something weird and ugly. I now understand why core team just ignores some discussions. I

Re: [PHP-DEV] Quoting again

2012-03-07 Thread Marco Tabini
> should i draw you a picture for help? Yes, but please make sure that it is on 24# cream paper. And draw in charcoal, because professionals don't use pencils. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Quoting again

2012-03-07 Thread Reindl Harald
Am 07.03.2012 11:12, schrieb Pierre Joye: > On Wed, Mar 7, 2012 at 11:05 AM, Derick Rethans wrote: > >> The mailinglist guidelines also are for you, so let me repeat what I >> wrote yesterday: > > To write a one line reply to another one line reply is just fine. > > Make us all a favour, don'

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Anthony Ferrara
Christian, On Wed, Mar 7, 2012 at 3:22 AM, Christian Kaps wrote: > Hi, > > I'm with Stas here. > > First let me say that I would like to see type hinting for scalars in PHP. > As a userland developer it would help me to write clean and more robust > code. But I think this proposal is only a worka

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Anthony Ferrara
Stas, Thanks for the comments! inline. On Wed, Mar 7, 2012 at 2:31 AM, Stas Malyshev wrote: > Hi! > https://wiki.php.net/rfc/parameter_type_casting_hints > > > Just took a look on it - the syntax proposed there is quite ugly and rather > confusing, I really wouldn't like to have such synta

Re: [PHP-DEV] PHP-FPM and max_execution_time

2012-03-07 Thread Christian Kaps
Hi, Am 07.03.2012 13:32, schrieb Antony Dovgal: On 03/07/2012 03:47 PM, Christian Kaps wrote: The Apache logs prints: FastCGI: comm with server "/home/christian.kaps/fcgi.sock" aborted: idle timeout (30 sec) FastCGI: incomplete headers (0 bytes) received from server "/home/christian.kaps/fcgi.s

Re: [PHP-DEV] PHP-FPM and max_execution_time

2012-03-07 Thread Antony Dovgal
On 03/07/2012 03:47 PM, Christian Kaps wrote: The Apache logs prints: FastCGI: comm with server "/home/christian.kaps/fcgi.sock" aborted: idle timeout (30 sec) FastCGI: incomplete headers (0 bytes) received from server "/home/christian.kaps/fcgi.sock" http://httpd.apache.org/mod_fcgid/mod/mod_f

Re: [PHP-DEV] Re: Git Migration: Status Update

2012-03-07 Thread Drak
On 7 March 2012 11:54, Kiall Mac Innes wrote: > On Wed, Mar 7, 2012 at 6:03 AM, Drak wrote: > >> [snip] >> Forcing pushes to one's own topic branches in one's own fork can be >> acceptable providing >> upstream maintainers know before merging (for example squashing some work >> after peer review

[PHP-DEV] PHP-FPM and max_execution_time

2012-03-07 Thread Christian Kaps
Hi, before I submit a Bug report I wanted to validate if it's a bug or not. I try to increase the max_execution_time for a test script. What I have done is to set php_admin_value[max_execution_time] = 100 in the config for my pool. The phpinfo() output shows this value for max_execution_time.

Re: [PHP-DEV] consider reverting E_ALL with E_STRICT

2012-03-07 Thread Arvids Godjuks
Alan Knowles You should consider the fact that some E_STRICT stuff can one day become E_WARNING or E_FATAL. For example calling a static method dynamically - I would bet that someday this thing will be moved to be a run-time fatal error and fix those if I make a mistake of doing that. Or not setti

Re: [PHP-DEV] Re: Git Migration: Status Update

2012-03-07 Thread Xinchen Hui
Sent from my iPhone 在 2012-3-7,17:12,David Soria Parra 写道: > On 2012-03-07, Kris Craig wrote: >> --f46d044304ec4e135704baa12342 >> Content-Type: text/plain; charset=ISO-8859-1 >> >> On Tue, Mar 6, 2012 at 10:09 PM, Kiall Mac Innes wrote: >> >>> On Wed, Mar 7, 2012 at 6:03 AM, Drak wrote: >>>

Re: [PHP-DEV] Re: Quoting again (Was: Re: [PHP-DEV] [RFC] Config setting to force all math operations to pass through BCMath library.

2012-03-07 Thread Pierre Joye
The only fact that this reminder ended in such a discussion pretty much makes my point. Most of the times I do clean out before replying, but I really do not need mailing list police and certainly not willing to argue even more about this topic, read: I have other things to do that to deal with s

Re: [PHP-DEV] Re: Quoting again (Was: Re: [PHP-DEV] [RFC] Config setting to force all math operations to pass through BCMath library.

2012-03-07 Thread Lester Caine
Pierre Joye wrote: The mailinglist guidelines also are for you, so let me repeat what I > wrote yesterday: To write a one line reply to another one line reply is just fine. So why include all the rest of the crap as well ... THAT is the waste of bandwidth, and a pain to deal with what ever cli

Re: [PHP-DEV] Re: Quoting again (Was: Re: [PHP-DEV] [RFC] Config setting to force all math operations to pass through BCMath library.

2012-03-07 Thread Peter Cowburn
Hi Pierre, The length of the reply being replied On 7 March 2012 10:12, Pierre Joye wrote: > On Wed, Mar 7, 2012 at 11:05 AM, Derick Rethans wrote: > > to is irrelevant. The length of the reply is also > > The mailinglist guidelines also are for you, so let me repeat what I > > wrote yester

[PHP-DEV] Re: Quoting again (Was: Re: [PHP-DEV] [RFC] Config setting to force all math operations to pass through BCMath library.

2012-03-07 Thread Pierre Joye
On Wed, Mar 7, 2012 at 11:05 AM, Derick Rethans wrote: > The mailinglist guidelines also are for you, so let me repeat what I > wrote yesterday: To write a one line reply to another one line reply is just fine. Make us all a favour, don't waste even more bandwidth and use a mail client that can

[PHP-DEV] Quoting again (Was: Re: [PHP-DEV] [RFC] Config setting to force all math operations to pass through BCMath library.

2012-03-07 Thread Derick Rethans
Pierre, On Wed, 7 Mar 2012, Pierre Joye wrote: The mailinglist guidelines also are for you, so let me repeat what I wrote yesterday: On Tue, 6 Mar 2012, Derick Rethans wrote: > Please read > "http://ch2.php.net/reST/php-src/trunk_README.MAILINGLIST_RULES"; which > states: > > "3. Do not to

Re: [PHP-DEV] '

2012-03-07 Thread Reindl Harald
Am 07.03.2012 00:15, schrieb Kris Craig: >> In such cases, the people breaking the thread convention should >> the very least remove all the other content. >> And yes, his MUA does support threading. >> >> >> > > I'll try this one last time: I don't know what the solution is. learning to use

Re: [PHP-DEV] consider reverting E_ALL with E_STRICT

2012-03-07 Thread Reindl Harald
Am 07.03.2012 01:11, schrieb Alan Knowles: > Sorry - top post as I can't reply to all the mails on the thread.. > > - display errors on. > Yes, this is a business decision, 20 servers running upgraded at different > times, some have less maintenance others > have more.. Seriously, the chance of

RE: [PHP-DEV] Re: [RFC] Namespace and Parse tags on Include and Require

2012-03-07 Thread John Crenshaw
> Ok, with Hannes help I have the RFC up now. > > https://wiki.php.net/rfc/changes_to_include_and_require WRT tagless files, in addition to the issues already raised by others: - What about script execution? You'll still need a shebang (linux) or to register the extension (Windows). Having a spec

Re: [PHP-DEV] Re: Git Migration: Status Update

2012-03-07 Thread David Soria Parra
On 2012-03-07, Kris Craig wrote: > --f46d044304ec4e135704baa12342 > Content-Type: text/plain; charset=ISO-8859-1 > > On Tue, Mar 6, 2012 at 10:09 PM, Kiall Mac Innes wrote: > >> On Wed, Mar 7, 2012 at 6:03 AM, Drak wrote: >> > I know I keep promising to draft an RFC for this lol, so I'll make it

Re: [PHP-DEV] [RFC] Config setting to force all math operations to pass through BCMath library.

2012-03-07 Thread Pierre Joye
he was using mpir. The idea was based on a plan I discussed with him to add large integers support transparently to php. Not sure either what's the status :) On Tue, Mar 6, 2012 at 11:43 PM, Derick Rethans wrote: > On Tue, 6 Mar 2012, Michael Morris wrote: > >> https://wiki.php.net/rfc/php_ini_bc

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Christian Kaps
Hi, I'm with Stas here. First let me say that I would like to see type hinting for scalars in PHP. As a userland developer it would help me to write clean and more robust code. But I think this proposal is only a workaround to get a round the main problem. It's a try to push similar functiona

Re: [PHP-DEV] Scalar Type Hinting

2012-03-07 Thread Lester Caine
Stas Malyshev wrote: And can we please stop using word "hinting"? We can call it type conversion, typecasting, type coercion, etc. http://en.wikipedia.org/wiki/Type_conversion But I don't see how there's any hinting involved. Is this were things have drifted from the original working base? I w