Re: [PHP-DEV] bug 52062

2011-12-27 Thread Gustavo Lopes
roperties), it should work independently from the DateInterval portion. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Fwd: SplDoublyLinkedList

2012-01-09 Thread Gustavo Lopes
On Mon, 09 Jan 2012 04:59:09 +0100, Paul Dragoonis wrote: Hey Internals, I've finished the patch, and with approval i'd like to push to trunk, even though i'm aware we have a 5_4 branch code freeze. Can someone review my work and provide feedback/approval? [1] https://gist.github.com/15809

Re: [PHP-DEV] Reflection to remove final

2012-01-17 Thread Gustavo Lopes
s of removing the flag would be permanent (i.e., would affect subsequent requests). And for threaded builds this could cause races between the threads. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Reflection to remove final

2012-01-18 Thread Gustavo Lopes
relies final classes not having subclasses to this is probably still not going to be trivial. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] The case of HTTP response splitting protection in PHP

2012-02-03 Thread Gustavo Lopes
humbly take the blame as I simply assumed the header was being passed as a C string (odd that they aren't since NULL bytes are not allowed in headers anyway but besides the point). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] The case of HTTP response splitting protection in PHP

2012-02-03 Thread Gustavo Lopes
m thinking that since we're in the business of validating HTTP headers, we could also forbid the other control characters that are forbidden by the spec (not just LF and CR). Thank you -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: htt

Re: [PHP-DEV] The case of HTTP response splitting protection in PHP

2012-02-03 Thread Gustavo Lopes
On Fri, 03 Feb 2012 13:03:24 +0100, Gustavo Lopes wrote: On Fri, 03 Feb 2012 12:06:26 +0100, Stefan Esser wrote: [snip] obviously inside PHP no one cares about reviewing security patches. Perhaps then you'd want to comment on: http://nebm.ist.utl.pt/~glopes/misc/bug60227

Re: [PHP-DEV] The case of HTTP response splitting protection in PHP

2012-02-03 Thread Gustavo Lopes
r loop go until header_line_len - 1? No in this case because header_line_len is the length not including the terminator and estrndup guarantees a null terminated string. Thanks -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] The case of HTTP response splitting protection in PHP

2012-02-04 Thread Gustavo Lopes
On Sat, 04 Feb 2012 00:06:45 +0100, Ángel González wrote: On 03/02/12 21:44, Ángel González wrote: On 03/02/12 15:01, Gustavo Lopes wrote: I've committed a different version that also forbids \0 (since, as Stefan says, a NUL byte can result in the truncation of the rest of the header) and

Re: [PHP-DEV] The case of HTTP response splitting protection in PHP

2012-02-04 Thread Gustavo Lopes
header without validation. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] The case of HTTP response splitting protection in PHP

2012-02-04 Thread Gustavo Lopes
On Sat, 04 Feb 2012 16:35:04 +0100, Ángel González wrote: Gustavo Lopes wrote: On Sat, 04 Feb 2012 00:06:45 +0100, Ángel González wrote: I've gone ahead and written code for that feature. Comments welcome. The comparison has a problem: if char is signed (the most common scenario), you&

Re: [PHP-DEV] Suhosin patch disabled by default in Debian php5 builds

2012-02-04 Thread Gustavo Lopes
ecause of other problems (like CRLF + (SP or HT) being disallowed). But I could do without the dramatization, which just shows (see also the other thread) how pointless it is to engage with you in anything but strictly technical issues, which I'll refrain from doing from now on. -- G

Re: [PHP-DEV] Static Analysis of PHP_5_4 with CLANG

2012-02-05 Thread Gustavo Lopes
d be replaced by zend_error_noreturn. That variant has the "noreturn" attribute, which signals the function never returns. This useful for suppressing those kind of warnings (note C11 also added a standard __Noreturn). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development M

Re: [PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/main/output.c trunk/main/output.c

2012-02-15 Thread Gustavo Lopes
it appears to be (namely old output handlers will now work) --, then it should be in NEWS. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] max_file_uploads INI_PERDIR

2012-02-18 Thread Gustavo Lopes
f the user only actually uploads a single file, it will hit this limit and fail. This is not true since PHP 5.3.4. See request #50692 (don't count 0-bytes files towards the max_file_uploads limit). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscri

[PHP-DEV] Dropped streams pooling (Was: svn: /php/php-src/trunk/main/streams/ php_stream_context.h streams.c)

2012-02-22 Thread Gustavo Lopes
- if (FAILURE == zend_hash_del(Z_ARRVAL_P(context->links), (char*)hostent, strlen(hostent)+1)) { - ret = FAILURE; - } - } else { - ret = FAI

Re: [PHP-DEV] Dropped streams pooling (Was: svn: /php/php-src/trunk/main/streams/ php_stream_context.h streams.c)

2012-02-22 Thread Gustavo Lopes
=> 4]; + $a = ['one' => 1, 2, 'three' => 3, 4]; + - Binary number format + 0b00100 0b010101 -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Dropped streams pooling (Was: svn: /php/php-src/trunk/main/streams/ php_stream_context.h streams.c)

2012-02-22 Thread Gustavo Lopes
most of it that I could check quickly. Sorry, you're right, it's all there with the exception of SplFixedArray::__wakeup(), which is in fact NOT in 5.4. I'll just cleanup trunk/UPGRADING of everything else, then. -- Gustavo Lopes -- PHP Internals - PHP Runtime Develop

Re: [PHP-DEV] Apache 2.4 support in PHP 5.4.0?

2012-02-24 Thread Gustavo Lopes
about 3 days old now :) [...] There is a patch attached to https://bugs.php.net/bug.php?id=61172 It needs review and wider testing. [...] In any case, I think a release note pointing to this issue and the provisional solution would be a good idea. -- Gustavo Lopes -- PHP Internals - PHP Runtime Deve

Re: [PHP-DEV] Object Casting - An Alternative to Type Hinting

2012-02-26 Thread Gustavo Lopes
n the past, which would like to be able to do $a = 1; $a->blah(). [1] https://wiki.php.net/internals/engine/objects#cast_object [2] https://wiki.php.net/internals/engine/objects#get -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www

Re: [PHP-DEV] Scalar type hinting

2012-02-27 Thread Gustavo Lopes
(), called in - on line 5 and defined in - on line 3 object(A)#1 (0) { } -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Scalar type hinting

2012-02-27 Thread Gustavo Lopes
rn an instance of the given class (or there will be an exception). Use This is not true. The new operator can return NULL. The intl extension uses this extensively: -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [Draft RFC] Object Casting and Assignment Handlers

2012-02-29 Thread Gustavo Lopes
least agree that this should be handled with caution. Changing the 'set' handler seems more related with the 'boxing' part of the proposal (the one not in the RFC), and it's strange to find it here. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Vulnerability by loading doctype-declaration of xml

2012-02-29 Thread Gustavo Lopes
receives a callback that takes two strings, a public id and system id and a context (an array with four keys). The callback should return a resource, a string from which a resource can be opened, or NULL. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscr

Re: [PHP-DEV] question about Zend MM

2012-03-01 Thread Gustavo Lopes
rgument) because the bits less significant than the log2(ZEND_MM_ALIGNMENT)-th will be zero. "a & n-1" is the same as "a mod n" with n being a power of 2. So if a & ZEND_MM_ALIGNMENT - 1 == 0 then a mod ZEND_MM_ALIGNMENT == 0 and a is a multiple of ZEND_MM_ALIGN

Re: [PHP-DEV] Scalar type hinting

2012-03-01 Thread Gustavo Lopes
oid recycling arguments just so you can have the last word. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] discussions, about a 5.3 EOL

2012-03-02 Thread Gustavo Lopes
s possibly exploitable 2) ask the RM for approval 3) merge the fix 4) probably then you also have to remove the entry from stable NEWS to oldstable NEWS Plus, 5.3 won't accumulate known bugs so quickly. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscri

Re: [PHP-DEV] [RFC] discussions, about a 5.3 EOL

2012-03-02 Thread Gustavo Lopes
On Fri, 02 Mar 2012 14:00:51 +0100, Pierre Joye wrote: On Fri, Mar 2, 2012 at 1:56 PM, Gustavo Lopes wrote: I'd go with another option: One year of bug fixes, one year of security fixes and bug fixes that are trivial to backport. Won't work. It is then two years bug fixing.

Re: [PHP-DEV] Patches for Review

2012-03-04 Thread Gustavo Lopes
integer; then return such integer. It's easy to see these sort of tricks would have to be applied all over the place (additions, products, and all other mathematical operations). In sum, I think the rule that if a mathematical operation involves a float, the result should be a float ought

Re: [PHP-DEV] Patches for Review

2012-03-04 Thread Gustavo Lopes
;. But this is a case where the exact same input (just type is different) leads to different output. Which I believe is inconsistent and incorrect. But if the consensus is otherwise, that's fine... -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

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

2012-03-06 Thread Gustavo Lopes
om which, btw, you can exclude E_STRICT errors -- or with syslog). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Scalar Type Hinting

2012-03-08 Thread Gustavo Lopes
R in the cases where zpp would return FAILURE seems in fact the only viable option, even with the disadvantages it has (centralization and lack of flexibility). Still, the fact that 100% consistency is not possible is not a strong argument against at least *some* consistency and in favor of

Re: [PHP-DEV] [RFC] Specify namespace to include file into.

2012-03-08 Thread Gustavo Lopes
obal namespace). I only see some usefulness as a transitional measure, which would save from namespacing 'legacy' libraries. But PHP 5.5 seems a bit late to introduce such measure. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Specify namespace to include file into.

2012-03-08 Thread Gustavo Lopes
ine. Sorry, I confused things here for a moment. This in fact seems to be a valid use case. But you're only saving a line, and you can't rely on the fallback to globals because it would create an ambiguity. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters

2012-03-09 Thread Gustavo Lopes
nowadays and this hasn't been particularly problematic. That said, I think we could move to a mild BC breaking change for php-next that would make zpp stricter (with or without user-land scalar type hinting/coercion). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing

Re: [PHP-DEV] default charset confusion

2012-03-14 Thread Gustavo Lopes
Of course, if you start enabling certain features of mbstring (zend multibyte hooks, translation of input variables, function overload) then it starts to be significant. However, there are other more compelling reasons not to make it required (see above). -- Gustavo Lopes -- PHP Int

Re: [PHP-DEV] Q: ZEND_HANDLE_STREAM and wincache extension on PHP 5.4

2012-03-15 Thread Gustavo Lopes
eak the abstraction is correct. For instance, see http://lxr.php.net/opengrok/xref/PHP_TRUNK/ext/phar/phar.c#3364 which has: file_handle->handle.stream.handle = phar; and *phar is of type phar_archive_data, which is not a php_stream (or an augmentation thereof). -- Gustavo Lopes -- PHP In

Re: [PHP-DEV] Q: ZEND_HANDLE_STREAM and wincache extension on PHP 5.4

2012-03-16 Thread Gustavo Lopes
that default implementation of zend_stream_open_function (php_stream_open_for_zend_ex) does store a php_stream* in handle. However, this clearly isn't the general case (even it were, breaking the abstraction would already be dubious). This is definitely a bug. -- Gustavo Lopes -- PHP Internals - PHP

Re: [PHP-DEV] DOMDocument->saveXML with node parameter

2012-03-20 Thread Gustavo Lopes
sses). Most likely, you're loading an old version of the DOM extension (compiled with an earlier version of PHP 5.3). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Q: ZEND_HANDLE_STREAM and wincache extension on PHP 5.4

2012-03-21 Thread Gustavo Lopes
tion pointer is php_zend_stream_closer and only then assume it wraps a php_stream? If it was not, you'd have to abandon shebang detection, but I think that's a minor problem. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: fix for 61418 breaks win32 build

2012-03-23 Thread Gustavo Lopes
I'll only be able to test it more thoroughly during the weekend. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Got a git merge conflict in main/output.c

2012-03-29 Thread Gustavo Lopes
wards (not forgetting to, before the merge, pull or merge 5.4 and master with origin/PHP-5.4 or origin/master). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 5.4.1 RC1 Released

2012-03-30 Thread Gustavo Lopes
th) is not very satisfactory. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Merge from 5.3 and/or 5.4. What's the current policy?

2012-03-30 Thread Gustavo Lopes
The problem with the current workflow is only when you have something specific to a lower branch, which is not applicable to upper branches because the code base has diverged. You still have to merge upwards in those situations and resolve the likely conflict (typically with the "ou

[PHP-DEV] Addition of calendar to intl

2012-04-02 Thread Gustavo Lopes
been preceded (or even followed) by any discussion; however, Stas expressed the opinion this is not a proper course of action nowadays. Consequently, if anyone has any non-trivial substantive (as opposed to procedural) concern with this change, I will revert the merge and submit an RFC. -- Gu

Re: [PHP-DEV] Addition of calendar to intl

2012-04-02 Thread Gustavo Lopes
T work required. In sum, I don't think it hurts much and it helps the extension stay consistent. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Addition of calendar to intl

2012-04-02 Thread Gustavo Lopes
p a DateTimeZone, but it would also imply using the C++ API for IntlDateFormatter, which is not the case currently. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Addition of calendar to intl

2012-04-08 Thread Gustavo Lopes
g to country and region. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [off] PHP: a fractal of bad design

2012-04-10 Thread Gustavo Lopes
about the error-code model. Is there anything actually susceptible of being actioned upon there or it's just the usual "PHP is inconsistent" rant -- something we can all agree on some degree, but which is usually irrelevant given BC concerns? -- Gustavo Lopes -- PHP Internal

Re: [PHP-DEV] Re: Fileinfo fixes for windows

2012-04-10 Thread Gustavo Lopes
ibute. See https://github.com/php/php-src/commit/112a476b683a634390b23fe7509d5b73632d0829 (5.4 and master) and https://github.com/php/php-src/commit/1c8fccdf6d6d04d8e6a5dedd7c9d6b1afda8839f (5.3) -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsu

Re: [PHP-DEV] '9223372036854775807' == '9223372036854775808'

2012-04-13 Thread Gustavo Lopes
72036854775808" to represent an integer value that, not being representable as int in PHP, should preclude a numeric comparison, or if you consider (string)"9223372036854775808" to be the same as (double)"9223372036854775808" for numeric comparison purposes. And I'm not sure here. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] '9223372036854775807' == '9223372036854775808'

2012-04-13 Thread Gustavo Lopes
807" == "9223372036854775808" differently. The distinction I propose is answering "yes" to the questions above -- they represent different entities and when no conversion of the integer string to the integer type can't be done we should fall back to memcmp(). This is what is already done with the overflowing "1e400". I don't find it particularly convincing, though. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] is_numeric_string an hexadecimal numbers ("123" == "0x7B")

2012-04-17 Thread Gustavo Lopes
ranch is not wise: http://lxr.php.net/opengrok/search?q=&project=PHP_TRUNK&defs=&refs=is_numeric_string But in case, if there are no graver BC impacts, +1 for master. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] is_numeric_string an hexadecimal numbers ("123" == "0x7B")

2012-04-17 Thread Gustavo Lopes
behavior. You can't do "123" == "0b10" or "123" == "0876". Extending this hexadecimal oddity instead of eliminating it is inconsistent with the treatment given to those other formats. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Some Stats

2012-04-17 Thread Gustavo Lopes
in the RFC to avoid it being brought up again. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] voting without vcs accounts

2012-04-18 Thread Gustavo Lopes
be dismissed (and "has been said in the past" and allusions to obviousness or lack of problems so far are not appropriate responses). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] skipping optional parameters

2012-04-18 Thread Gustavo Lopes
is at most an occasional minor nuisance for me. Plus, this solution encourages bad behavior. If we want to properly support long argument lists (and I'm not we do), we have to have named parameters. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] skipping optional parameters

2012-04-18 Thread Gustavo Lopes
ong argument, I could find a number of proponents for every crazy feature. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] skipping optional parameters

2012-04-18 Thread Gustavo Lopes
armless. Quickly skimming the output with shows that in some cases it's multiline calls, but those are in a clear minority (most are in if/switch statements). And remember, this is just PHP core, a small fraction of all extensions. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Addition of calendar to intl

2012-04-19 Thread Gustavo Lopes
n. Is there an easy way to get from DateTimeZone to intl one and back (at least for standard ones, custom ones probably won't work)? Again, I'm working on that: https://github.com/cataphract/php-src/commit/361cf32 I'll post something to this list for review when I have someth

Re: [PHP-DEV] Re: internals Digest 24 Apr 2012 22:20:08 -0000 Issue 2675

2012-04-25 Thread Gustavo Lopes
your situation was introduced in this premise; it doesn't follow from the mechanisms of read-only. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] considering to remove ext/imap from master

2012-04-27 Thread Gustavo Lopes
i#Zawinski.27s_law_of_software_envelopment -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] readfile() memory usage

2012-05-01 Thread Gustavo Lopes
nfiguration and make sure ob_get_level() returns 0. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [off] PHP: a fractal of bad design

2012-05-07 Thread Gustavo Lopes
convinced it's necessary and I some have consistency concerns (though float overflows already get a similar treatment). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] bug 54547

2012-05-13 Thread Gustavo Lopes
" 09223372036854775810" (false -- floats are the same, memcmp) In both cases (incorporating the test for B or not), there's no escaping a discontinuity in behavior, unless we revert not to memcmp() but to a custom string comparison function that strips whitespace and leading zeros, compares the size of the input and finally calls memcpy(). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

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

2012-05-13 Thread Gustavo Lopes
ot;. 13 votes in 20 is not 2/3 of the votes. So the question is whether any of the persons that voted for "both empty() and isset()" prefers "only empty()" to "none. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

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

2012-05-13 Thread Gustavo Lopes
nstance empty(UNDEFINED_CONSTANT)/isset(UNDEFINED_CONSTANT) now returning false/true). And in any case, that voting was superseded by the new one. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

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

2012-05-14 Thread Gustavo Lopes
an of course create your own RFC for that purpose. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

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

2012-05-14 Thread Gustavo Lopes
. The examples were linked from the RFC page. I've made the link more obvious. In any case, here is the URL: https://gist.github.com/2660601#file_test.php -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

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

2012-05-14 Thread Gustavo Lopes
On Mon, 14 May 2012 13:23:27 +0200, Paul Dragoonis wrote: Am i correct in assuming this is basically substr() for arrays. No. That's a part of it. It also does indexes as keys (like array_slice) and multidimensional arrays, none of which have anything analogous in strings. -- Gu

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

2012-05-14 Thread Gustavo Lopes
can preserve keys, array_part() cannot because when collapsing levels this would mean the possibility of overwriting elements. I'll improve the RFC with inline examples and this information later. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] having an exception instance

2012-05-16 Thread Gustavo Lopes
call zend_throw_exception and pass runtime_exception_ptr pointer. For the RuntimeException class entry, you can just include and use spl_ce_RuntimeException. When the pointer is not exported, you can use zend_lookup_class_ex(). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailin

[PHP-DEV] IntlCalendar/IntlTimeZone and ext/date

2012-05-17 Thread Gustavo Lopes
the databases are out of sync. The changes are here: https://github.com/cataphract/php-src/compare/intl_calendar If no one objects, I'll merge it soon. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] memory usage ouchy

2012-05-21 Thread Gustavo Lopes
using. Starting with PHP 5.4, the properties hash table is only created if you're storing dynamic properties (i.e. assigning undeclared properties) or if it otherwise requested. Otherwise, they're stored in an array. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development

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

2012-05-21 Thread Gustavo Lopes
28th May. Now my answer to Richard: On Mon, 21 May 2012 21:30:24 +0200, Richard Lynch wrote: On Mon, May 14, 2012 9:03 am, Gustavo Lopes wrote: * array_slice() can preserve keys, array_part() cannot because when collapsing levels this would mean the possibility of overwriting elements

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

2012-05-21 Thread Gustavo Lopes
ur question, please refer to how this works in virtually every election in the world. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] [VOTE] array_part()

2012-05-28 Thread Gustavo Lopes
I've opened the array_part() vote: https://wiki.php.net/rfc/array_part#vote The vote asks whether the branch at https://github.com/cataphract/php-src/tree/array_part should be merged. This implementation has been tested and has 100% code coverage on the reachable code. -- Gustavo

Re: [PHP-DEV] [VOTE] array_part()

2012-05-29 Thread Gustavo Lopes
[ ['col1', 'col2', 'col3'], ['line1', 0, 1 ], ['line2', 1, 0 ], ] To drop the headers, you'd now have to do: array_slice(array_map(function($a) { return array_slice($a,1); }, $arr), 1); With array_part, you can

Re: [PHP-DEV] PHP and two phase commit transactions

2012-05-29 Thread Gustavo Lopes
ere done, one would be able to plug the LIXA extension (or any similar extension). I don't think this approach would get objections from the extension maintainers and it is more versatile. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP and two phase commit transactions

2012-05-30 Thread Gustavo Lopes
and help you along the way. Note that stable branches generally do not receive new features, so you should develop against the development branch (master). If it's your thing, you can fork PHP on github: https://github.com/php/php-src -- Gustavo Lopes -- PHP Internals - PHP Runtime De

[PHP-DEV] BreakIterator

2012-05-31 Thread Gustavo Lopes
that function to intl_error.c. common_enum.cpp was also changed, mainly to expose previously static functions. This avoided code duplication when implementing the BreakIterator iterator and the IntlIterator returned by BreakIterator::getPartsIterator(). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] NEWS again (was: PHP 5.4.4RC2 Released)

2012-06-01 Thread Gustavo Lopes
ously can only work if these changes are then merged to the most recent branches on release. If the RMs are unwilling to do such merging, we should change the policy to require updating the NEWS files in every stable branch to which the fix was merged. -- Gustavo Lopes -- PHP Internal

Re: [PHP-DEV] BreakIterator

2012-06-01 Thread Gustavo Lopes
e symbol BreakIterator can only used in contexts where it's obvious it's a class name, as in BreakIterator::createWordInstance('en'). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] BreakIterator

2012-06-01 Thread Gustavo Lopes
nd it very hard to believe that "BreakIterator" is "a very common name", but I'm open to evidence that points otherwise. This argument could maybe be made for 'Transliterator', which was added in 5.4. -- Gustavo Lopes -- PHP Internals - PHP Runtime Develo

Re: [PHP-DEV] BreakIterator

2012-06-01 Thread Gustavo Lopes
On Fri, 1 Jun 2012 15:37:30 +0200, Pierre Joye wrote: On Fri, Jun 1, 2012 at 1:34 PM, Gustavo Lopes wrote: So would you have RuleBasedBreakIterator renamed IntlRuleBasedBreakIterator too?... Ideally we would yes, while they are less common and less aimed to be seen as part of another API

Re: [PHP-DEV] BreakIterator

2012-06-01 Thread Gustavo Lopes
On Fri, 1 Jun 2012 15:56:59 +0200, Nikita Popov wrote: On Fri, Jun 1, 2012 at 9:57 AM, Gustavo Lopes wrote: We currently don't use namespaces in any of the core extensions. Does anything prevent us from starting to do so? other symbols in ext/intl are in the global namespace; t

Re: [PHP-DEV] BreakIterator

2012-06-01 Thread Gustavo Lopes
xtension prefix, but this convention has not been as marked for class names -- perhaps because there were so not many of them and so there were less collision/confusion problems. In any case, I'll rename the classes before merging. -- Gustavo Lopes -- PHP Internals - PHP Runtime De

Re: [PHP-DEV] BreakIterator

2012-06-01 Thread Gustavo Lopes
does not implement Iterator, people would expect next() and current() return the next and current iterator value, while they would be returning the iteration key. By the way, you can look at the test cases in the tree on github for examples: https://github.com/cataphract/php-src/commit/d289c39

Re: [PHP-DEV] 答复: [PHP-DEV] full LFS support

2012-06-03 Thread Gustavo Lopes
). I'll offer to review it then. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] full LFS support

2012-06-04 Thread Gustavo Lopes
On Mon, 4 Jun 2012 09:32:51 +0200, Pierre Joye wrote: On Sun, Jun 3, 2012 at 1:55 PM, Gustavo Lopes wrote: This most likely would be doable only in the next version as it requires changing the signatures of extension API functions. I suggest that you make a pull request *with some tests

Re: [PHP-DEV] BreakIterator

2012-06-04 Thread Gustavo Lopes
ation" Again, having some full description of proposed API would be nice. For example, what hashCode() does? The ICU docs only say "Compute a hash code for this BreakIterator." If I'm not mistaken from my quick glance at the source, it just returns the length of the forward rules. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Generators in PHP

2012-06-06 Thread Gustavo Lopes
exceptions. What to do if the generator returns function. If the generator can be a function method. * There are missing sections I suppose this is a work in progress and that you just want to gauge the general interest, and I hope you take these considerations into account. -- Gustavo Lopes

Re: [PHP-DEV] boolval() again

2012-06-06 Thread Gustavo Lopes
a language change (unless they have some special treatment like Iterator), unless you consider all the core functions and classes to be part of the language, at which point everything is a language change. An RFC for such a trivial change is an utter waste of time IMO. -- Gustavo Lopes -- PHP

Re: [PHP-DEV] Generators in PHP

2012-06-07 Thread Gustavo Lopes
t? * Generators can be methods, as shown in the example in the Introduction section. Closures can also be generators. I suppose this is a work in progress and that you just want to gauge the general interest, and I hope you take these considerations into account. Yup, thanks for your comments! Nikita -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Generators in PHP

2012-06-07 Thread Gustavo Lopes
he generator? Does it work like a final yield? Is the return value ignored? * Generators can be methods, as shown in the example in the Introduction section. Closures can also be generators. Can other callable classes be generators? Are you planning on any internal API for functions to implement gen

Re: [PHP-DEV] Generators in PHP

2012-06-08 Thread Gustavo Lopes
internal and userspace implementations would be markedly different. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Subdomain Set Up

2012-06-16 Thread Gustavo Lopes
don't see why we should be in the business of, among other things, deciding whether code should be indented or otherwise formatted. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] BreakIterator

2012-06-22 Thread Gustavo Lopes
I've made several changes to accommodate several issues raised on this list. See https://github.com/cataphract/php-src/compare/break_iterator All but the first two commits are new. Please see the test cases for doubts concerning usage. -- Gustavo Lopes -- PHP Internals - PHP Ru

Re: [PHP-DEV] json_encode() behavior for incorrectly encoded strings

2012-06-23 Thread Gustavo Lopes
is and for inf/NAN. We already can get the error from json_last_error() if we want to) -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API

2012-06-27 Thread Gustavo Lopes
nd, hashes computed with the old default method could still be checked without any modification as the hash itself stores information about the method. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   3   4   >