Re: [PHP-DEV] [VOTE] Choosing a distributed version control system for PHP

2011-08-25 Thread Lester Caine
Gwynne Raskind wrote: On Wed, Aug 24, 2011 at 19:03, David Soria Parrad...@php.net wrote: Those wanting to use git and git workflows have a disadvantage when we stay with SVN. Choosing a VCS happens from time to time and sometimes your favorit is not the winner. I personally would love

[PHP-DEV] Array as class member and refcounting

2011-08-25 Thread Flavius Aspra
There is something that confuses me. Let there be a class member Foo::$bar, which has to be initialized as an empty array in the constructor. If I do that (via zend_update_property), its refcount is increased (from 1, which it gets after alloc + array_init, to 2). It is obvious why this

Re: [PHP-DEV] PHP 5.3.8 Released!

2011-08-25 Thread Pierre Joye
On Thu, Aug 25, 2011 at 3:51 AM, a...@akbkhome.com a...@akbkhome.com wrote: BTW. we could really do with a searchable archive of php.dev + internals... - It's pretty difficult to find out if this was ever discussed before.. Again, it was discussed already and the argument of using instanceof

RE: [PHP-DEV] PHP 5.3.8 Released!

2011-08-25 Thread Zeev Suraski
-Original Message- From: Pierre Joye [mailto:pierre@gmail.com] Sent: Thursday, August 25, 2011 11:31 AM To: a...@akbkhome.com Cc: Stas Malyshev; internals@lists.php.net Subject: Re: [PHP-DEV] PHP 5.3.8 Released! On Thu, Aug 25, 2011 at 3:51 AM, a...@akbkhome.com

Re: [PHP-DEV] PHP 5.3.8 Released!

2011-08-25 Thread Pierre Joye
On Thu, Aug 25, 2011 at 10:39 AM, Zeev Suraski z...@zend.com wrote: -Original Message- From: Pierre Joye [mailto:pierre@gmail.com] Sent: Thursday, August 25, 2011 11:31 AM To: a...@akbkhome.com Cc: Stas Malyshev; internals@lists.php.net Subject: Re: [PHP-DEV] PHP 5.3.8 Released!

RE: [PHP-DEV] PHP 5.3.8 Released!

2011-08-25 Thread Johannes Schlüter
On Thu, 2011-08-25 at 08:39 +, Zeev Suraski wrote: - Given that we've already done it - I wouldn't revert it. Fix it in PEAR. That's the only way to create something that works across all versions of 5.3.x. Unfortunately this is the case. johannes -- PHP Internals - PHP Runtime

Re: [PHP-DEV] [VOTE] Choosing a distributed version control system for PHP

2011-08-25 Thread Derick Rethans
On Wed, 24 Aug 2011, Stas Malyshev wrote: On 8/24/11 2:03 PM, David Soria Parra wrote: after 3 weeks of discussion, I think we are ready to start voting on the DVCS RFC. If you think something is missing or should be explained in more detail, let me know. I'm not sure choosing

Re: [PHP-DEV] [VOTE] Choosing a distributed version control system for PHP

2011-08-25 Thread Ivan Enderlin @ Hoa
On 25/08/11 11:15, Derick Rethans wrote: On Wed, 24 Aug 2011, Stas Malyshev wrote: On 8/24/11 2:03 PM, David Soria Parra wrote: after 3 weeks of discussion, I think we are ready to start voting on the DVCS RFC. If you think something is missing or should be explained in more detail, let me

Re: [PHP-DEV] [VOTE] Choosing a distributed version control system for PHP

2011-08-25 Thread David Soria Parra
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/25/2011 11:28 AM, Ivan Enderlin @ Hoa wrote: On 25/08/11 11:15, Derick Rethans wrote: On Wed, 24 Aug 2011, Stas Malyshev wrote: I agree, and I also think that before people can make a choice they need to have played with all the options.

[PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Sebastian Bergmann
I have attached a patch to https://bugs.php.net/bug.php?id=55490 that implements ReflectionClass::newInstanceWithoutConstructor() to create an object a class without invoking the constructor. As there are certain internal classes that would crash when their constructor is not invoked, this

Re: [PHP-DEV] [VOTE] Choosing a distributed version control system for PHP

2011-08-25 Thread Ivan Enderlin @ Hoa
On 25/08/11 11:37, David Soria Parra wrote: On 08/25/2011 11:28 AM, Ivan Enderlin @ Hoa wrote: On 25/08/11 11:15, Derick Rethans wrote: On Wed, 24 Aug 2011, Stas Malyshev wrote: I agree, and I also think that before people can make a choice they need to have played with all the options. Just

Re: [PHP-DEV] [VOTE] Choosing a distributed version control system for PHP

2011-08-25 Thread David Soria Parra
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/25/2011 11:56 AM, Ivan Enderlin @ Hoa wrote: On 25/08/11 11:37, David Soria Parra wrote: On 08/25/2011 11:28 AM, Ivan Enderlin @ Hoa wrote: On 25/08/11 11:15, Derick Rethans wrote: On Wed, 24 Aug 2011, Stas Malyshev wrote: I agree, and I

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Pierre Joye
hi, On Thu, Aug 25, 2011 at 11:46 AM, Sebastian Bergmann sebast...@php.net wrote:  I have attached a patch to https://bugs.php.net/bug.php?id=55490 that  implements ReflectionClass::newInstanceWithoutConstructor() to create an  object a class without invoking the constructor.  As there are

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Gustavo Lopes
On Thu, 25 Aug 2011 10:46:21 +0100, Sebastian Bergmann sebast...@php.net wrote: I have attached a patch to https://bugs.php.net/bug.php?id=55490 that implements ReflectionClass::newInstanceWithoutConstructor() to create an object a class without invoking the constructor. As there

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Patrick ALLAERT
2011/8/25 Sebastian Bergmann sebast...@php.net:  I have attached a patch to https://bugs.php.net/bug.php?id=55490 that  implements ReflectionClass::newInstanceWithoutConstructor() to create an  object a class without invoking the constructor.  As there are certain internal classes that would

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Richard Quadling
On 25 August 2011 10:46, Sebastian Bergmann sebast...@php.net wrote:  I have attached a patch to https://bugs.php.net/bug.php?id=55490 that  implements ReflectionClass::newInstanceWithoutConstructor() to create an  object a class without invoking the constructor.  As there are certain

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Sebastian Bergmann
On 08/25/2011 02:26 PM, Richard Quadling wrote: Wouldn't ReflectionClass::newMockInstance() be a better name? It is not specific to stubbing/mocking. What other use cases exists? ORM and stubbing/mocking should be enough. -- Sebastian BergmannCo-Founder and Principal

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Etienne Kneuss
Hi, On Thu, Aug 25, 2011 at 11:46, Sebastian Bergmann sebast...@php.net wrote:  I have attached a patch to https://bugs.php.net/bug.php?id=55490 that  implements ReflectionClass::newInstanceWithoutConstructor() to create an  object a class without invoking the constructor. To me this feature

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Sebastian Bergmann
On 08/25/2011 01:46 PM, Gustavo Lopes wrote: What about userland classes that extend internal classes? Good point. How would I implement such a check? -- Sebastian BergmannCo-Founder and Principal Consultant http://sebastian-bergmann.de/

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Sebastian Bergmann
On 08/25/2011 02:39 PM, Etienne Kneuss wrote: To me this feature makes no sense. But if people find use for it and it remains in Reflection, I won't object to it, so +0. It should only be used for meta programming, of course ;-) If an internal class can't behave well without a constructor

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Kalle Sommer Nielsen
Hi 2011/8/25 Sebastian Bergmann sebast...@php.net:  Good point. How would I implement such a check? Speaking of which, wouldn't it be easier to check all our internal classes for such failures and fix them accordingly with this addition (Fix the dont-crash-without-calling-constructor)? We

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Sebastian Bergmann
On 08/25/2011 02:47 PM, Kalle Sommer Nielsen wrote: Speaking of which, wouldn't it be easier to check all our internal classes for such failures and fix them accordingly with this addition (Fix the dont-crash-without-calling-constructor)? We could do like that of above and cast an exception

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Etienne Kneuss
Hi, On Thu, Aug 25, 2011 at 14:43, Sebastian Bergmann sebast...@php.net wrote: On 08/25/2011 02:39 PM, Etienne Kneuss wrote: To me this feature makes no sense. But if people find use for it and it remains in Reflection, I won't object to it, so +0.  It should only be used for meta

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Pierre Joye
On Thu, Aug 25, 2011 at 2:41 PM, Sebastian Bergmann sebast...@php.net wrote: On 08/25/2011 01:46 PM, Gustavo Lopes wrote: What about userland classes that extend internal classes?  Good point. How would I implement such a check? Checking the same thing than what instanceof does Cheers, --

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Etienne Kneuss
Hi, On Thu, Aug 25, 2011 at 14:49, Sebastian Bergmann sebast...@php.net wrote: On 08/25/2011 02:47 PM, Kalle Sommer Nielsen wrote: Speaking of which, wouldn't it be easier to check all our internal classes for such failures and fix them accordingly with this addition (Fix the

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Etienne Kneuss
On Thu, Aug 25, 2011 at 14:54, Etienne Kneuss col...@php.net wrote: Hi, On Thu, Aug 25, 2011 at 14:49, Sebastian Bergmann sebast...@php.net wrote: On 08/25/2011 02:47 PM, Kalle Sommer Nielsen wrote: Speaking of which, wouldn't it be easier to check all our internal classes for such failures

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Gustavo Lopes
On Thu, 25 Aug 2011 13:41:27 +0100, Sebastian Bergmann sebast...@php.net wrote: On 08/25/2011 01:46 PM, Gustavo Lopes wrote: What about userland classes that extend internal classes? Good point. How would I implement such a check? You could fetch the parent and do the same check, and

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Sebastian Bergmann
On 08/25/2011 02:54 PM, Gustavo Lopes wrote: You could fetch the parent and do the same check, and so on. I think you might be able to just check whether ce.create_object is not NULL, because if the internal class doesn't replace create_object, there's no chance of that class of crashes

Re: [PHP-DEV] PHP 5.3.8 Released!

2011-08-25 Thread Matthew Weier O'Phinney
On 2011-08-25, a...@akbkhome.com a...@akbkhome.com wrote: I'm not sure it's possible to get agreement on if this is a bug or not, you might see a bug, I just see this as a pointless change for consistency that pretty much nobody will ever need or use. Please don't generalize based on your own

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Benjamin Eberlei
Thanks for working on this Sebastian, its really appreciated! +1 from me! On Thu, Aug 25, 2011 at 3:27 PM, Sebastian Bergmann sebast...@php.netwrote: On 08/25/2011 02:54 PM, Gustavo Lopes wrote: You could fetch the parent and do the same check, and so on. I think you might be able to just

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread guilhermebla...@gmail.com
Sebastian, This is a hidden gem for us! =D Thanks a lot for putting your effort into this. Cheers, On Thu, Aug 25, 2011 at 11:03 AM, Benjamin Eberlei kont...@beberlei.de wrote: Thanks for working on this Sebastian, its really appreciated! +1 from me! On Thu, Aug 25, 2011 at 3:27 PM,

Re: [PHP-DEV] [VOTE] Choosing a distributed version control system for PHP

2011-08-25 Thread Philip Olson
I'm not familiar enough with Mercurial to properly vote, but am guessing we'll move to Git. Git is popular because Github is popular, and Github is popular because it's awesome. But I think we should skip git.php.net and mirrors/bridges, and simply move to Github. And this means people who

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Patrick ALLAERT
2011/8/25 Gustavo Lopes glo...@nebm.ist.utl.pt: You could fetch the parent and do the same check, and so on. Checking only the topmost should be enough if traversing the whole inheritance could be avoided. I think you might be able to just check whether ce.create_object is not NULL, because

Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor()

2011-08-25 Thread Patrick ALLAERT
2011/8/25 Patrick ALLAERT patrickalla...@php.net: 2011/8/25 Gustavo Lopes glo...@nebm.ist.utl.pt: You could fetch the parent and do the same check, and so on. Checking only the topmost should be enough if traversing the whole inheritance could be avoided. Well, of course I highly second the

Re: [PHP-DEV] [VOTE] Choosing a distributed version control system for PHP

2011-08-25 Thread Kalle Sommer Nielsen
2011/8/24 David Soria Parra d...@php.net: Hi Internals,, after 3 weeks of discussion, I think we are ready to start voting on the DVCS RFC.  If you think something is missing or should be explained in more detail, let me know. I won't transfer the discussion over here but; I don't want to

Re: [PHP-DEV] [VOTE] Choosing a distributed version control system for PHP

2011-08-25 Thread Ilia Alshanetsky
If we do decide to make a VCS change the vote should be fairly one sided for option of choice as this has a fairly broad impact on our development process. On Wed, Aug 24, 2011 at 5:03 PM, David Soria Parra d...@php.net wrote: Hi Internals,, after 3 weeks of discussion, I think we are ready to

Re: [PHP-DEV] Failing Autotests / Bugs

2011-08-25 Thread marius adrian popa
On Tue, Aug 23, 2011 at 10:26 PM, marius adrian popa map...@gmail.com wrote: On Tue, Aug 23, 2011 at 9:51 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 08/23/2011 09:45 AM, Daniel Convissor wrote: Hi: On Sun, Aug 21, 2011 at 03:08:09PM +0200, Reindl Harald wrote: FAIL DateTime::diff() days

[PHP-DEV] transversing associative arrays from C

2011-08-25 Thread Aaron Gray
Hi, I am working on a C extension module for PHP and am wondering about an API issue. I can see how to add to an associative array :- zval *aa; MAKE_STD_ZVAL(aa); array_init(aa); add_assoc_string(aa, test, test value, 1); but how do I transverse an associative array of values

[PHP-DEV] transversing associative arrays from C

2011-08-25 Thread Aaron Gray
Hi, I am working on a C extension module for PHP and am wondering about an API issue. I can see how to add to an associative array :- zval *aa; MAKE_STD_ZVAL(aa); array_init(aa); Hi, I am working on a C extension module for PHP and am wondering about an API issue. I can see how to add to an

Re: [PHP-DEV] [VOTE] Choosing a distributed version control system for PHP

2011-08-25 Thread David Muir
On 08/26/2011 04:12 AM, Kalle Sommer Nielsen wrote: 2011/8/24 David Soria Parra d...@php.net: Hi Internals,, after 3 weeks of discussion, I think we are ready to start voting on the DVCS RFC. If you think something is missing or should be explained in more detail, let me know. I won't

Re: [PHP-DEV] transversing associative arrays from C

2011-08-25 Thread Chris Stockton
Hello, On Thu, Aug 25, 2011 at 2:57 PM, Aaron Gray ang.use...@gmail.com wrote: Hi, I am working on a C extension module for PHP and am wondering about an API issue. I can see how to add to an associative array :- Most everything you need to know about manipulating arrays can be found in

Re: [PHP-DEV] transversing associative arrays from C

2011-08-25 Thread Aaron Gray
Chris Stockton chrisstockto...@gmail.com wrote in message news:calkfbxvsuq-zqyytdxi3a9tccieh6xzz9y-kbyqva8kpc4-...@mail.gmail.com... Hello, On Thu, Aug 25, 2011 at 2:57 PM, Aaron Gray ang.use...@gmail.com wrote: Hi, I am working on a C extension module for PHP and am wondering about an API

Re: [PHP-DEV] transversing associative arrays from C

2011-08-25 Thread Christopher Jones
On 08/25/2011 05:16 PM, Aaron Gray wrote: Chris Stockton chrisstockto...@gmail.com wrote in message news:calkfbxvsuq-zqyytdxi3a9tccieh6xzz9y-kbyqva8kpc4-...@mail.gmail.com... Hello, On Thu, Aug 25, 2011 at 2:57 PM, Aaron Gray ang.use...@gmail.com wrote: Hi, I am working on a C extension

Re: [PHP-DEV] transversing associative arrays from C

2011-08-25 Thread Aaron Gray
Aaron Gray ang.use...@gmail.com wrote in message news:a1.a0.22704.0d5e6...@pb1.pair.com... Chris Stockton chrisstockto...@gmail.com wrote in message news:calkfbxvsuq-zqyytdxi3a9tccieh6xzz9y-kbyqva8kpc4-...@mail.gmail.com... Hello, On Thu, Aug 25, 2011 at 2:57 PM, Aaron Gray

Re: [PHP-DEV] transversing associative arrays from C

2011-08-25 Thread Aaron Gray
Christopher Jones christopher.jo...@oracle.com wrote in message news:4e56e662.90...@oracle.com... On 08/25/2011 05:16 PM, Aaron Gray wrote: Chris Stockton chrisstockto...@gmail.com wrote in message news:calkfbxvsuq-zqyytdxi3a9tccieh6xzz9y-kbyqva8kpc4-...@mail.gmail.com... Hello, On Thu, Aug

Re: [PHP-DEV] transversing associative arrays from C

2011-08-25 Thread Stas Malyshev
Hi! On 8/25/11 5:52 PM, Aaron Gray wrote: Thinking about it what I really want to do is see if a key exists in an array and get its type to see if it is BOOL and that it is TRUE. For this, you will need to call zend_hash_find (or zend_symtable_find if there's a possibility of keys like 0

[PHP-DEV] is_a() consequences.....

2011-08-25 Thread Alan Knowles
I've committed the fixes for my two of my packages to support this change.. Who ever thinks this is such a great idea, could you kindly file bugs against all the packages below to request they fix their 'bugs' or verify the input http://pear.php.net/bugs/ Since the behaviour of

Re: [PHP-DEV] transversing associative arrays from C

2011-08-25 Thread Aaron Gray
Hi Stas, Stas Malyshev smalys...@sugarcrm.com wrote in message news:4e56f0d6.20...@sugarcrm.com... Hi! On 8/25/11 5:52 PM, Aaron Gray wrote: Thinking about it what I really want to do is see if a key exists in an array and get its type to see if it is BOOL and that it is TRUE. For this,

Re: [PHP-DEV] transversing associative arrays from C

2011-08-25 Thread Xinchen Hui
hi every api has lots of 'samples' ,that are the standard extensions in src/ext/* :) Thanks Sent from my iPhone 在 2011-8-26,11:20,Aaron Gray ang.use...@gmail.com 写道: Hi Stas, Stas Malyshev smalys...@sugarcrm.com wrote in message news:4e56f0d6.20...@sugarcrm.com... Hi! On 8/25/11

Re: [PHP-DEV] transversing associative arrays from C

2011-08-25 Thread Aaron Gray
Thanks ! Xinchen Hui larue...@gmail.com wrote in message news:7256329410255948429@unknownmsgid... hi every api has lots of 'samples' ,that are the standard extensions in src/ext/* :) Thanks Sent from my iPhone 在 2011-8-26,11:20,Aaron Gray ang.use...@gmail.com 写道: Hi Stas, Stas