Re: [PHP-DEV] [VOTE] Vote change for empty() RFC

2012-05-21 Thread Rafael Dohms
Awesome, that clear is up pretty well. I just wanted to get this well cleared up, and since this vote ad its various quirks, why not just sort out all issues once and for all. Thanks for the replies. -- Rafael Dohms PHP Evangelist and Community Leader http://www.rafaeldohms.com.br http://www.p

[PHP-DEV] Re: [PHP-QA] Parallel run-tests

2012-05-21 Thread Nuno Lopes
Alright, thanks for the reply! I'll try to have a look at the code and give it a try next weekend. Nuno -Original Message- From: zoe slattery Sent: Monday, May 21, 2012 8:26 AM Subject: Re: [PHP-QA] Parallel run-tests On 21/05/2012 06:45, Nuno Lopes wrote: Hi Zoe, Thanks for unde

Re: [PHP-DEV] memory usage ouchy

2012-05-21 Thread Richard Lynch
No offense intended, but if you've got so many OOP objects flying around that they are sucking down that much memory... You probably need to refactor your code and just "don't do that" Just my opinion. -- brain cancer update: http://richardlynch.blogspot.com/search/label/brain%20tumor Donate: h

Re: [PHP-DEV] [VOTE] Vote change for empty() RFC

2012-05-21 Thread Kris Craig
On Mon, May 21, 2012 at 3:22 PM, Sanford Whiteman < swhitemanlistens-softw...@cypressintegrated.com> wrote: > Ah, this is why one should trust a coder over a butler: > > > http://www.ask.com/answers/112530521/5-people-are-voting-what-is-2-3-s-of-a-majority > > Ugh. > > -- S. > > > -- > PHP Interna

Re: [PHP-DEV] [VOTE] Vote change for empty() RFC

2012-05-21 Thread Sanford Whiteman
Ah, this is why one should trust a coder over a butler: http://www.ask.com/answers/112530521/5-people-are-voting-what-is-2-3-s-of-a-majority Ugh. -- S. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: internals Digest 21 May 2012 21:48:46 -0000 Issue 2690

2012-05-21 Thread Rasmus Schultz
oh, wow! so this was already implemented in 5.4, and without introducing some kind of base-class to enable it. who knew... fantastic, thanks for the info! case closed :-) - Rasmus From: "Gustavo Lopes" To: internals@lists.php.net Cc: Date: Mon, 21 May 2012 21:13:52 +0200 Subject: Re: [PHP-DEV]

Re: [PHP-DEV] [VOTE] Vote change for empty() RFC

2012-05-21 Thread Kris Craig
On Mon, May 21, 2012 at 2:48 PM, Rafael Dohms wrote: > On Mon, May 21, 2012 at 11:25 PM, Gustavo Lopes > wrote: > > > There is nothing unclear about "a 2/3 majority is required". 2/3 of all > the > > votes need not be a integer, but that doesn't mean you can't compare it > to > > an integer. If t

Re: [PHP-DEV] [VOTE] Vote change for empty() RFC

2012-05-21 Thread Johannes Schlüter
On Mon, 2012-05-21 at 23:48 +0200, Rafael Dohms wrote: > > > So we are counting half people now, good i hear Tyrion the Imp going > around internals, good. I tried to stay away from voting but well, simple math: Assume 5 votes. Then 3 is less then 2/3 of all votes and 4 is "at least 2/3" (more m

Re: [PHP-DEV] memory usage ouchy

2012-05-21 Thread Michael Morris
What about a magic interface instead of a new base class, in a similar vein to the existing Array Access and Serializable interfaces. NonDynamic perhaps? On Mon, May 21, 2012 at 5:09 PM, Tom Boutell wrote: > Rasmus, isn't your concern about the impact of dynamic property > support on developers w

Re: [PHP-DEV] [VOTE] Vote change for empty() RFC

2012-05-21 Thread Rafael Dohms
On Mon, May 21, 2012 at 11:25 PM, Gustavo Lopes wrote: > There is nothing unclear about "a 2/3 majority is required". 2/3 of all the > votes need not be a integer, but that doesn't mean you can't compare it to > an integer. If this still doesn't answer your question, please refer to how > this wo

Re: [PHP-DEV] [VOTE] Vote change for empty() RFC

2012-05-21 Thread Gustavo Lopes
On Mon, 21 May 2012 23:18:03 +0200, Rafael Dohms wrote: On Mon, May 21, 2012 at 10:36 PM, Lars Strojny wrote: hope it’s ok I've reopened the vote temporarily, but you’ve got the missing vote. Even better, get this on clean papers. thanks. But i would still like Pierre and others invol

Re: [PHP-DEV] [VOTE] Vote change for empty() RFC

2012-05-21 Thread Rafael Dohms
On Mon, May 21, 2012 at 10:36 PM, Lars Strojny wrote: > Hi Rafael, > > hope it’s ok I've reopened the vote temporarily, but you’ve got the missing > vote. Even better, get this on clean papers. thanks. But i would still like Pierre and others involved with voting to clear up the point about rou

Re: [PHP-DEV] [RFC] [DISCUSSION] array_part()

2012-05-21 Thread Gustavo Lopes
First, I'd like to announce the native implementation is available on github: https://github.com/cataphract/php-src/compare/array_part Please review this feature BEFORE voting starts. Unless something comes up that has to be dealt with until then, I want to start voting on Monday, 28th May

Re: [PHP-DEV] memory usage ouchy

2012-05-21 Thread Tom Boutell
Rasmus, isn't your concern about the impact of dynamic property support on developers who don't actually use it a nonissue in 5.4, where properties that aren't dynamic are stored as a flat array? On Mon, May 21, 2012 at 4:52 PM, Rasmus Schultz wrote: > Adding/removing properties at runtime is gre

Re: [PHP-DEV] memory usage ouchy

2012-05-21 Thread Rasmus Schultz
Adding/removing properties at runtime is great if you want obscure, unmaintainable code and don't think an IDE is useful. So to make my previous statement more precise, dynamic properties are not widely used in respectable modern codebases, and is generally something a reputable developer would fr

Re: [PHP-DEV] [VOTE] Vote change for empty() RFC

2012-05-21 Thread Lars Strojny
Hi Rafael, hope it’s ok I've reopened the vote temporarily, but you’ve got the missing vote. Am 21.05.2012 um 01:05 schrieb Rafael Dohms: > On Mon, May 21, 2012 at 12:44 AM, Pierre Joye wrote: >> >> >> See the previous mails, as long as other voters agree to change their >> votes to empty on

Re: [PHP-DEV] memory usage ouchy

2012-05-21 Thread Stas Malyshev
Hi! > 262144 bytes used > > That is definitely a significant improvement. > > Objects are still a lot bigger than their contents. I don't expect > they would ever shrink to the size of their contents exactly or even > all that close of course. Hashtables and zvals have overhead. So if you store

Re: [PHP-DEV] memory usage ouchy

2012-05-21 Thread Tom Boutell
I ran this script on 5.3.13, and it reported: 786432 bytes used On 5.4.3, it reported: 262144 bytes used That is definitely a significant improvement. Objects are still a lot bigger than their contents. I don't expect they would ever shrink to the size of their contents exactly or even all tha

Re: [PHP-DEV] memory usage ouchy

2012-05-21 Thread Tom Boutell
Thanks for clarifying that. Sounds like a huge win. On Mon, May 21, 2012 at 3:13 PM, Gustavo Lopes wrote: > On Mon, 21 May 2012 20:47:51 +0200, Rasmus Schultz > wrote: > >> I just realized something that never occurred to me before - every >> property is actually stored as a hash. >> >> This tes

Re: [PHP-DEV] Persist context across threads?

2012-05-21 Thread Richard Lynch
On Mon, May 14, 2012 1:47 pm, David Rueter wrote: > I am interested in preserving the complete PHP context for a thread > (globals, > variables, interpreter, etc.--everything) for later access from a > different > thread. > > What would be involved in this? It seems like: > > 1) Avoid calling ts_f

Re: [PHP-DEV] memory usage ouchy

2012-05-21 Thread Gustavo Lopes
On Mon, 21 May 2012 20:47:51 +0200, Rasmus Schultz wrote: I just realized something that never occurred to me before - every property is actually stored as a hash. This test-script will demonstrate: [snip] The test-script contains no information about the version of PHP you're using.

Re: [PHP-DEV] memory usage ouchy

2012-05-21 Thread Tom Boutell
Yeah, dynamic properties get used by default every time you json_decode something, to take a random example. String folding could be used, but that would require a hashtable lookup and would probably be slower than allocation (at least until you started to swap). Worth testing maybe. Or... when y

Re: [PHP-DEV] memory usage ouchy

2012-05-21 Thread Stas Malyshev
Hi! > How come it's necessary to store the property-names of every property > in every object? For properties that have been defined in classes, why > can't they be stored in a more efficient manner? (using lookup tables) No because you can add and remove properties freely at runtime. > I know t

[PHP-DEV] memory usage ouchy

2012-05-21 Thread Rasmus Schultz
I just realized something that never occurred to me before - every property is actually stored as a hash. This test-script will demonstrate: = 'a'; $foo-> = 'b'; $foo->cc

Re: [PHP-DEV] zend_execute_internal hook missing from PHP 5

2012-05-21 Thread Xinchen Hui
发自我的 iPad 在 2012-5-21,21:05,Stefan Esser 写道: > Hi, > >>> While this has no immediate impact for average PHP users, it basically >>> kills the possibility for an extension like Suhosin to catch all function >>> starts. >> Actually, there is one, use user opcode handler hook the fcall series >>

Re: [PHP-DEV] zend_execute_internal hook missing from PHP 5

2012-05-21 Thread Stefan Esser
Hi, >> While this has no immediate impact for average PHP users, it basically kills >> the possibility for an extension like Suhosin to catch all function starts. > Actually, there is one, use user opcode handler hook the fcall series > opcodes, that is how I did in taint extension. From what I

Re: [PHP-DEV] zend_execute_internal hook missing from PHP 5

2012-05-21 Thread Xinchen Hui
Sent from my iPhone 在 2012-5-21,18:42,Stefan Esser 写道: > Hi, > > it recently came to my attention that the function whitelist and blacklist > feature inside Suhosin is easily bypassable since PHP 5.0. > > The reason for this is that PHP is no longer calling the > zend_execute_internal() hook i

Re: [PHP-DEV] zend_execute_internal hook missing from PHP 5

2012-05-21 Thread Derick Rethans
On Mon, 21 May 2012, Stefan Esser wrote: > While this has no immediate impact for average PHP users, it basically > kills the possibility for an extension like Suhosin to catch all > function starts. This should also be a problem for your DTRACE > support. And IIRC Xdebug was hooking this point

[PHP-DEV] zend_execute_internal hook missing from PHP 5

2012-05-21 Thread Stefan Esser
Hi, it recently came to my attention that the function whitelist and blacklist feature inside Suhosin is easily bypassable since PHP 5.0. The reason for this is that PHP is no longer calling the zend_execute_internal() hook if a function is called from another function (via zend_call_function)

Re: [PHP-DEV] Re: [PHP-QA] Parallel run-tests

2012-05-21 Thread zoe slattery
On 21/05/2012 08:59, Devis Lucato wrote: Hi, nice work, out of curiosity I tried on a VM with 24 virtual cores: Sequential new phpruntests: 29.6 seconds Parallel -z 4: 12.1 - 12.3 secs Parallel -z 8: 10.6 - 10.9 secs Parallel -z 16: 10.6 - 11.3 secs Parallel -z 24: 10.9 - 11.7 secs Cool - thank

Re: [PHP-DEV] Re: [PHP-QA] Parallel run-tests

2012-05-21 Thread Devis Lucato
Hi, nice work, out of curiosity I tried on a VM with 24 virtual cores: Sequential new phpruntests: 29.6 seconds Parallel -z 4: 12.1 - 12.3 secs Parallel -z 8: 10.6 - 10.9 secs Parallel -z 16: 10.6 - 11.3 secs Parallel -z 24: 10.9 - 11.7 secs Btw I'm seeing this error: PHP Warning: Invalid arg

[PHP-DEV] Re: [PHP-QA] Parallel run-tests

2012-05-21 Thread zoe slattery
On 21/05/2012 06:45, Nuno Lopes wrote: Hi Zoe, Thanks for undertaking this project! I just have a few concerns about this: - The speedup seems a bit low to me. Maybe with a higher number of extensions enabled it will improve?.. I don't think it will improve with a higher number of extensions.