Re: [PHP-DEV] PHP 5.3.0RC3

2009-05-12 Thread Jani Taskinen
Matt Wilmas wrote: Hint: zend_operators.* (I noticed your recent cleanup stuff, and thought He has to notice.) I forgot smiley from that. This was more tongue-in-cheek than a real rant. :D much either way, but that sounds nice. :O)). I'd vote for karma removal until people can learn to do

Re: [PHP-DEV] Method call improvements

2009-05-12 Thread Dmitry Stogov
Hi Guilherme, 5.3 is closed for major updates (it is in RC state). I would try to look into this when we develop a strategy for next PHP version. Thanks. Dmitry. Guilherme Blanco wrote: Hi guys, What's the status on this one?! It's an important optimization that should be considered. Save

Re: [PHP-DEV] Method call improvements

2009-05-12 Thread Dmitry Stogov
Hi Paul, Paul Biggar wrote: On Mon, May 11, 2009 at 7:47 PM, Guilherme Blanco guilhermebla...@gmail.com wrote: What's the status on this one?! I think it died from neglect. But it was a really good idea. One question that was raised was: On Thu, Jan 22, 2009 at 10:20 AM, Dmitry Stogov

[PHP-DEV] Re: Reflection

2009-05-12 Thread Kalle Sommer Nielsen
Hi Johannes 2009/5/11 Johannes Schlüter johan...@php.net: (re-sending, sorry if this arrives twice) Hi, This should be low risk as it's a self-contained function and we all est HEAD ... but I'd prefer not adding anything but bug fixes to 5.3 as it already took way too long. We can always

Re: [PHP-DEV] Method call improvements

2009-05-12 Thread Paul Biggar
Hi Stas, Dmitry, On Tue, May 12, 2009 at 2:01 AM, Stanislav Malyshev s...@zend.com wrote: IHMO it's not static enough. I.e., since PHP is not compiled, we can not  create VD table for the class until runtime inheritance, which means that the code using this class can use method resolution more

Re: [PHP-DEV] Method call improvements

2009-05-12 Thread Dmitry Stogov
Paul Biggar wrote: Hi Stas, Dmitry, On Tue, May 12, 2009 at 2:01 AM, Stanislav Malyshev s...@zend.com wrote: IHMO it's not static enough. I.e., since PHP is not compiled, we can not create VD table for the class until runtime inheritance, which means that the code using this class can use

Re: [PHP-DEV] Method call improvements

2009-05-12 Thread Paul Biggar
On Tue, May 12, 2009 at 9:43 AM, Dmitry Stogov dmi...@zend.com wrote: Apologies, I'm not familiar with run-time inheritence in PHP. My understanding was that when a classes source code is compiled, its parent classes must be known. When is this not the case? The parent class may be defined in

Re: [PHP-DEV] PHP 5.3.0RC3

2009-05-12 Thread Lukas Kahwe Smith
On 12.05.2009, at 04:20, Matt Wilmas wrote: Hi Lukas, - Original Message - From: Lukas Kahwe Smith Sent: Monday, May 11, 2009 [...] Critical issues: 1) I assume the issues with rounding are resolved. If any issues pop up again, please let the list know. @Matt/Dmitry: Can you

Re: [PHP-DEV] Method call improvements

2009-05-12 Thread Dmitry Stogov
Paul Biggar wrote: On Tue, May 12, 2009 at 9:43 AM, Dmitry Stogov dmi...@zend.com wrote: Apologies, I'm not familiar with run-time inheritence in PHP. My understanding was that when a classes source code is compiled, its parent classes must be known. When is this not the case? The parent

Re: [PHP-DEV] Method call improvements

2009-05-12 Thread Paul Biggar
On Tue, May 12, 2009 at 12:29 PM, Dmitry Stogov dmi...@zend.com wrote: But I think its fair to say that it has static inheritance - that is, its full inheritance chain is known before it can be instantiated, and it can never be changed after that. Right, but it has a lot of dynamic issues

Re: [PHP-DEV] Method call improvements

2009-05-12 Thread Guilherme Blanco
Thanks Dmitry, I imagined that. I just thought it was already applied, but it's not. So I spoke a bit with Lukas and he suggested me to revamp this discussion, since it stopped all of a sudden. Anyway... once you guys find a final patch, should I expect it at least commited into HEAD? Cheers,

[PHP-DEV] The constant use of isset()

2009-05-12 Thread Ólafur Waage
While researching for this suggestion I found this rfc proposal regarding ifsetor() ( http://wiki.php.net/rfc/ifsetor?s[]=issethttp://wiki.php.net/rfc/ifsetor?s%5B%5D=isset) and it's rejection point was that it was currently not possible ( http://marc.info/?l=php-internalsm=108931281901389w=2 )

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Olivier B.
So if the variable is set and contains false, we can't check it ? And near same problem for 0, empty array and empty string. But you can also use this syntax : (yes it's not very clean) if( @$_GET['foo'] === 'bar') or if( @$_GET['foo'] === 'bar' or @$_GET['baz'] === 'bat' ) Olivier

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Sean Coates
So if the variable is set and contains false, we can't check it ? And near same problem for 0, empty array and empty string. How would you ever get false (the value, not the string) into a request variable? (without setting it that way after the request init, that is) S -- PHP

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Olivier B.
Sean Coates a écrit : So if the variable is set and contains false, we can't check it ? And near same problem for 0, empty array and empty string. How would you ever get false (the value, not the string) into a request variable? (without setting it that way after the request init, that is)

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Ólafur Waage
The error suppression was discussed in the rfc and yes it is not clean and you could be suppressing something else inadvertently. Yes the false value would be an issue with this, but for 0, empty array and empty string is an issue with just about anything else in PHP already. Hence === if you

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Sean Coates
So this isset() behavior will only be available for request variable, not for all variables ? I'm not picking sides, but that seems to me like the overwhelmingly popular use case. S -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Lewis Wright
Regarding ifsetor, what's wrong with just using this: isset($myvar) OR $myvar = 'i am set'; It works in just the same way and has no problems. I agree it would be great though if there could be a function to retrieve a variable's value if it exists, without throwing an error if it doesn't exist.

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Ionut G. Stan
Regarding ifsetor, what's wrong with just using this: isset($myvar) OR $myvar = 'i am set'; It works in just the same way and has no problems. I agree it would be great though if there could be a function to retrieve a variable's value if it exists, without throwing an error if it doesn't

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Robert Cummings
On Tue, 2009-05-12 at 18:23 +0100, Lewis Wright wrote: Regarding ifsetor, what's wrong with just using this: isset($myvar) OR $myvar = 'i am set'; It works in just the same way and has no problems. I agree it would be great though if there could be a function to retrieve a variable's

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread D. Dante Lorenso
Ólafur Waage wrote: While researching for this suggestion I found this rfc proposal regarding ifsetor() ( http://wiki.php.net/rfc/ifsetor?s[]=issethttp://wiki.php.net/rfc/ifsetor?s%5B%5D=isset) and it's rejection point was that it was currently not possible (

Re: [PHP-DEV] PHP 5.3.0RC3

2009-05-12 Thread Stanislav Malyshev
Hi! @Stas/Dmitry: ? As I said, I'm ok with committing this, provided all the tests are fixed, etc. -- Stanislav Malyshev, Zend Software Architect s...@zend.com http://www.zend.com/ (408)253-8829 MSN: s...@zend.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

Re: [PHP-DEV] Method call improvements

2009-05-12 Thread Stanislav Malyshev
Hi! Apologies, I'm not familiar with run-time inheritence in PHP. My understanding was that when a classes source code is compiled, its parent classes must be known. When is this not the case? Must it be known for the class' first instantiation? No, the problems here are different. The

Re: [PHP-DEV] Method call improvements

2009-05-12 Thread Daniel Convissor
Hi Paul: On Tue, May 12, 2009 at 12:50:12PM +0100, Paul Biggar wrote: This is what I'm getting at. How can the parent class be changed? I can see that it might be deferred, but I don't see how it can be changed once it's set. The decision of which class to extend from can be made at run

RE: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Jared Williams
-Original Message- From: Ólafur Waage [mailto:olaf...@gmail.com] Sent: 12 May 2009 17:35 To: internals@lists.php.net Subject: [PHP-DEV] The constant use of isset() While researching for this suggestion I found this rfc proposal regarding ifsetor() (

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Ólafur Waage
On Tue, May 12, 2009 at 5:39 PM, Robert Cummings rob...@interjinn.comwrote: On Tue, 2009-05-12 at 18:23 +0100, Lewis Wright wrote: Regarding ifsetor, what's wrong with just using this: isset($myvar) OR $myvar = 'i am set'; It works in just the same way and has no problems. I agree it

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Robert Cummings
On Tue, 2009-05-12 at 19:35 +, Ólafur Waage wrote: On Tue, May 12, 2009 at 5:39 PM, Robert Cummings rob...@interjinn.comwrote: On Tue, 2009-05-12 at 18:23 +0100, Lewis Wright wrote: Regarding ifsetor, what's wrong with just using this: isset($myvar) OR $myvar = 'i am set';

Re: [PHP-DEV] The constant use of isset()

2009-05-12 Thread Ólafur Waage
2009/5/12 Brian Moon br...@moonspot.net $foo = filter_input(INPUT_GET, foo, FILTER_UNSAFE_RAW); That would have a value if set or null if not set. It also allows you to validate it using filters if you wanted to. This of course only works with GPC variables, but it is a great solution.