Re: [PHP-DEV] PROPOSAL: temp stream for post_data

2013-09-16 Thread Gustavo Lopes
On Mon, 16 Sep 2013 09:01:02 +0200, Michael Wallner m...@php.net wrote: On 10 September 2013 13:29, Michael Wallner m...@php.net wrote: On 28 August 2013 08:14, Michael Wallner m...@php.net wrote: On 27 August 2013 23:17, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: I think it's generally

Re: [PHP-DEV] [RFC] Named parameters

2013-09-07 Thread Gustavo Lopes
On 06-09-2013 23:54, Nikita Popov wrote: On Fri, Sep 6, 2013 at 11:23 PM, Gustavo Lopes glo...@nebm.ist.utl.ptwrote: I think the correct course of action is just to drop support for extra named arguments. Just add an extra array argument to the function and you have equivalent functionality

Re: [PHP-DEV] [RFC] Named parameters

2013-09-06 Thread Gustavo Lopes
arguments), this would ease the implementation and the transition, especially for userland code. Regards -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PROPOSAL: temp stream for post_data

2013-08-27 Thread Gustavo Lopes
a pointer). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] New handler for retrieving properties when object is serialized

2013-07-26 Thread Gustavo Lopes
with yet another way of doing something for edge cases for which we have a good solution for the general case already. Alternatively, could the problem perhaps be mitigated by making available some utility functions for serializing native types? -- Gustavo Lopes -- PHP Internals - PHP Runtime

Re: [PHP-DEV] New handler for retrieving properties when object is serialized

2013-07-26 Thread Gustavo Lopes
for serialization. I think not using PHP_VAR_SERIALIZE_INIT() would always be an error in the extension anyway. However, you are right this method is not nice by any means. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] New handler for retrieving properties when object is serialized

2013-07-25 Thread Gustavo Lopes
instead of keeping adding these. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: PHP 5.5.1 released

2013-07-19 Thread Gustavo Lopes
binaries in http://pecl.php.net/package/intl with ICU 51 with no problem and the codebase is very similar to that of ext/intl. But if you did find a bug, please report it. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net

[PHP-DEV] Re: IntlTimeZone::getOffset?

2013-06-30 Thread Gustavo Lopes
that would yield the same UTC date/time as the local wall time at issue. This has the usual problems at DST transitions, see this comment: http://lxr.php.net/xref/THIRD_PARTY/ICU4C/source/i18n/timezone.cpp#661 -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe

[PHP-DEV] Re: IntlTimeZone::getOffset?

2013-06-30 Thread Gustavo Lopes
-- namely, it's in a stable release. At this point, the reliance interest is small because 5.5.0 (and intl v3) has been out for little time, but perhaps, if anything is to be done, other options such as introducing an object type just for encapsulating timestamps would be preferable. -- Gustavo

Re: [PHP-DEV] ENT_ALL or similar option for htmlspecialchars[_decode]?

2013-06-27 Thread Gustavo Lopes
of that of a dedicated algorithm, though. And it only supports UTF-8. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: #53437

2013-06-07 Thread Gustavo Lopes
conversion -- or the absence of it). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: strtr() performance degradation

2013-06-04 Thread Gustavo Lopes
, as its preprocessing step is much cheaper. It will require some experimentation in order to determine the cutoff, but if you think it's important I can do it (you're welcome to do it as well). Regards -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe

[PHP-DEV] Re: strtr() performance degradation

2013-06-04 Thread Gustavo Lopes
cases is always an option. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] how to determine errno on user space?

2013-04-03 Thread Gustavo Lopes
for this purpose is unprecedented in the PHP codebase. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Fix for bug #63437

2013-03-09 Thread Gustavo Lopes
being stored, so you can share the serialized data between machines with different endianness. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] NEWS file rename

2013-03-03 Thread Gustavo Lopes
(such as the tzdb update). How does that fix anything? You'll still have a conflict because you'll be changing a file that doesn't exist in the other branch. Besides, the solution is well documented on the wiki: https://wiki.php.net/vcs/gitfaq#mandatory_git_settings -- Gustavo Lopes -- PHP Internals

Re: [PHP-DEV] [RFC] send/recvmsg() wrappers in ext/socket

2013-02-21 Thread Gustavo Lopes
Em 2013-02-21 4:06, Ferenc Kovacs escreveu: On Tue, Jan 22, 2013 at 6:23 PM, Gustavo Lopes glo...@nebm.ist.utl.ptwrote: https://wiki.php.net/rfc/**sendrecvmsghttps://wiki.php.net/rfc/sendrecvmsg The module ext/sockets, a wrapper around the sockets API, does not include support to recvmsg

Re: [PHP-DEV] Question on hash api

2013-02-20 Thread Gustavo Lopes
php_hash_hmac_round), which has an int for the length and therefore is not a problem. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Questions regarding DateTimeImmutable

2013-02-20 Thread Gustavo Lopes
data: http://code.google.com/codesearch#search/q=%5C$date-%3Emodify%20lang:phptype=cssq= As you can see, your assumption is false. In the majority of cases, there is no assignment. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http

Re: [PHP-DEV] double val to long val conversion issue

2013-02-20 Thread Gustavo Lopes
though; for the others, the doubles outside the long range have no fractional part. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Questions regarding DateTimeImmutable

2013-02-20 Thread Gustavo Lopes
a toDateTime() on DateTimeImmutable for interoperability purposes. One wouldn't need to go through Atom libraries code to know this is a solution that can't cause problems. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net

Re: [PHP-DEV] Questions regarding DateTimeImmutable

2013-02-19 Thread Gustavo Lopes
guarantees can be extracted. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] double val to long val conversion issue

2013-02-19 Thread Gustavo Lopes
significant bytes are preserved. Take int(-2056257536) and int(2943463994971652096): In[6]:= BitAnd[2^32 - 1, {-2056257536, 2943463994971652096}] Out[6]= {2238709760, 2238709760} -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net

[PHP-DEV] Re: mcast patch breaks mac build for 5.5

2013-02-17 Thread Gustavo Lopes
for Apple as Mac OS X lags one decade behind its competitors. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] double val to long val conversion issue

2013-02-17 Thread Gustavo Lopes
for 5.4. If we do it, I'm afraid we may change some scenario, so I'd prefer to make it 5.5 only. If no one objects, I'll merge this into 5.5 and master: https://github.com/cataphract/php-src/compare/dval_to_lval -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List

Re: [PHP-DEV] double val to long val conversion issue

2013-02-11 Thread Gustavo Lopes
On Mon, 11 Feb 2013 09:43:36 +0100, Remi Collet r...@fedoraproject.org wrote: Le 10/02/2013 20:27, Gustavo Lopes a écrit : Any reservations? For which values ? Outside LONG_MIN .. ULONG_MAX ? It should be valid for the whole domain, but for performance reasons it would be better

Re: [PHP-DEV] double val to long val conversion issue

2013-02-10 Thread Gustavo Lopes
long range, the behavior is undefined. If we want more predictability, we have to do the conversion ourselves and probably take a small performance hit. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] double val to long val conversion issue

2013-02-10 Thread Gustavo Lopes
On Sun, 10 Feb 2013 12:00:01 +0100, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: My concern is that we may also have different behavior when we go outside the unsigned long range. As to whether ppc64 or x86_64 is correct when casting (double)LONG_MAX to a signed long, the answer

Re: [PHP-DEV] double val to long val conversion issue

2013-02-10 Thread Gustavo Lopes
On Sun, 10 Feb 2013 16:19:46 +0100, Remi Collet r...@fedoraproject.org wrote: Le 10/02/2013 15:58, Gustavo Lopes a écrit : Can you test this program on ppc64: $ gcc -O3 -lm conv.c ./a.out 9223372036854775808 -9223372036854775808 -9223372036854775808 $ gcc -O3 -lm conv.c ./a.out 4e21

Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-08 Thread Gustavo Lopes
On Fri, 08 Feb 2013 20:04:35 +0100, hakre hanskren...@yahoo.de wrote: - Ursprüngliche Message - Von: Gustavo Lopes glo...@nebm.ist.utl.pt So the question is only whether +0 or -0 (or +0, etc.) should be accepted as integers by FILTER_VALIDATE_INT. I think they should, because we also

Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-08 Thread Gustavo Lopes
On Fri, 08 Feb 2013 22:09:22 +0100, hakre hanskren...@yahoo.de wrote: - Ursprüngliche Message - Von: Gustavo Lopes glo...@nebm.ist.utl.pt A special case still left is ±0. It is with the 'PLUS-MINUS SIGN' (U+00B1). By special case, I meant a deviation to the general rule on how

Re: [PHP-DEV] ArrayAccess/ArrayObject return by reference

2013-02-06 Thread Gustavo Lopes
ArrayObject's offsetGet and return by reference. Those would be compatible with the modification in ArrayObject. We've allowed overrides to return by reference when the parent doesn't for quite a while now. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe

Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-04 Thread Gustavo Lopes
. See http://lxr.php.net/xref/PHP_TRUNK/README.MAILINGLIST_RULES#67 -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 5.4.11 tests: floating point diff

2013-02-04 Thread Gustavo Lopes
-tests.php if you have any doubt. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 5.4.11 tests: floating point diff

2013-02-04 Thread Gustavo Lopes
the rule. Therefore, I would be inclined to suggest that this is indeed a bug in math library, but this was just a quick check (may depend on which standards and which versions are followed, etc). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit

[PHP-DEV] Re: Non-pointer params, zend_parse_parameters, and the ! modifier

2013-02-02 Thread Gustavo Lopes
to reset it to the default value (assuming that was our intent). [...] Thoughts? You raise a good point. From my part, feel free to modify it so the passed long is not changed. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net

Re: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Gustavo Lopes
(stream_get_contents($f)); }, [$f1, $f2]); string(6) foobar string(0) -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposal: php://memory/id ( ://temp/id)

2013-01-31 Thread Gustavo Lopes
a user wrapper that delegates to static php://memory streams kept statically. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] send/recvmsg() wrappers in ext/socket

2013-01-30 Thread Gustavo Lopes
On Tue, 22 Jan 2013 18:23:59 +0100, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: https://wiki.php.net/rfc/sendrecvmsg The module ext/sockets, a wrapper around the sockets API, does not include support to recvmsg() and sendmsg(). This RFC addresses this shortcoming by support introducing

Re: [PHP-DEV] [VOTE] Deprecate and remove calls from incompatible context

2013-01-28 Thread Gustavo Lopes
On Sun, 20 Jan 2013 20:17:05 +0100, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: I've opened the vote for the remove calls from incompatible context RFC: https://wiki.php.net/rfc/incompat_ctx#vote The RFC has been accepted unanimously. I'll implement it shortly. The change is trivial

Re: [PHP-DEV] [VOTE] Deprecate and remove calls from incompatible context

2013-01-28 Thread Gustavo Lopes
, but note that by the time this feature is removed, no PHP version without traits will be maintained anymore. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [VOTE] Deprecate and remove calls from incompatible context

2013-01-28 Thread Gustavo Lopes
introduced pretty disruptive BC breaks like eliminating call-time pass-by-ref and changing the default encoding for htmlentities/htmlspecialchars and new keywords. 5.5 will also introduce a few (look at UPGRADING). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List

Re: [PHP-DEV] Re: com php-src: fix bug #63462 (Magic methods called twice for unset protected properties): NEWS Zend/tests/bug63462.phpt Zend/zend_object_handlers.c

2013-01-22 Thread Gustavo Lopes
On Tue, 22 Jan 2013 09:38:11 +0100, Stas Malyshev smalys...@sugarcrm.com wrote: this appears to break tests/classes/unset_properties.phpt on 5.5 branch, can you please look into this? Thanks, fixed. Seems to be failing on 5.4 as well. -- Gustavo Lopes -- PHP Internals - PHP Runtime

[PHP-DEV] [RFC] send/recvmsg() wrappers in ext/socket

2013-01-22 Thread Gustavo Lopes
. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [VOTE] Alternative typehinting syntax for accessors

2013-01-21 Thread Gustavo Lopes
argument. Slippery slopes are a real phenomenon. People interested in this topic can read this reference [1]. [1] https://www.law.ucla.edu/volokh/slippery.pdf -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [VOTE] Alternative typehinting syntax for accessors

2013-01-21 Thread Gustavo Lopes
in the language in an incremental backdoor fashion. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [VOTE] Property Accessors for 5.5

2013-01-20 Thread Gustavo Lopes
that throw exceptions or have side effects (the code behaves differently when add a var_dump()?!). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [VOTE] Property Accessors for 5.5

2013-01-20 Thread Gustavo Lopes
; } function __construct($scale) { $this-scale = (double)$scale; } } -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] [VOTE] Deprecate and remove calls from incompatible context

2013-01-20 Thread Gustavo Lopes
I've opened the vote for the remove calls from incompatible context RFC: https://wiki.php.net/rfc/incompat_ctx#vote -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [VOTE] zend_parse_parameters() improvements

2013-01-16 Thread Gustavo Lopes
On Wed, 09 Jan 2013 17:19:10 +0100, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: I've opened voting for the zend_parse_parameters() improvements RFC. You can now go to https://wiki.php.net/rfc/zpp_improv#voting The RFC was unanimously accepted. I've merged it to 5.5 in b8603035. Thank you

Re: [PHP-DEV] strtr vs. str_replace runtime

2013-01-15 Thread Gustavo Lopes
On Mon, 14 Jan 2013 22:55:33 +0100, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: OK, so now the plan is to merge this onto 5.4: https://github.com/cataphract/php-src/compare/php:PHP-5.4...cataphract:strtr_wu94_54 And this to 5.5: https://github.com/cataphract/php-src/compare/php:PHP-5.5

Re: [PHP-DEV] strtr vs. str_replace runtime

2013-01-14 Thread Gustavo Lopes
: 1.2030 str_replace: 0.0850 results match! Replacements: 2 total, smallest 7 largest 2500 ^C (got tired of waiting after a few minutes) -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] strtr vs. str_replace runtime

2013-01-14 Thread Gustavo Lopes
On Wed, 09 Jan 2013 23:45:03 +0100, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: On Thu, 03 Jan 2013 11:40:31 +0100, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: The algorithm behaves very poorly in this case because at each position of the text, all the substrings starting

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Gustavo Lopes
the power to condition the vote on a specific choice of name. Personally, I don't care about the name as long as only one is chosen (no alias). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-14 Thread Gustavo Lopes
propose) usually include a final global vote at the end. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Add a zend_qsort_r/zend_qsort implementation

2013-01-10 Thread Gustavo Lopes
( microtime( true ) - $start, 4 ) . \n; -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] [VOTE] zend_parse_parameters() improvements

2013-01-09 Thread Gustavo Lopes
I've opened voting for the zend_parse_parameters() improvements RFC. You can now go to https://wiki.php.net/rfc/zpp_improv#voting Regards -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] strtr vs. str_replace runtime

2013-01-09 Thread Gustavo Lopes
On Thu, 03 Jan 2013 11:40:31 +0100, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: The algorithm behaves very poorly in this case because at each position of the text, all the substrings starting there and with size between m and n (where m is the size of the smallest pattern and n

Re: [PHP-DEV] strtr vs. str_replace runtime

2013-01-03 Thread Gustavo Lopes
. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] [RFC] zend_parse_parameters() improvements

2013-01-02 Thread Gustavo Lopes
Em 2012-07-18 23:05, Gustavo Lopes escreveu: Some deficiencies in zpp have been constrai ning the implementation of common scenarios such as 'allow integer or NULL'* or the more general 'allow different types for an argument'**. I've written an RFC. It's available on: https://wiki.php.net

Re: [PHP-DEV] PHP-5.5 unpack change broke pecl/pear

2012-12-24 Thread Gustavo Lopes
people than the htmlentities() change in 5.4) for one that will exist indefinitely and I consider that a poor choice. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] zend_parse_parameters() improvements

2012-12-20 Thread Gustavo Lopes
Em 2012-12-19 22:07, Nikita Popov escreveu: On Wed, Jul 18, 2012 at 11:05 PM, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: Some deficiencies in zpp have been constrai ning the implementation of common scenarios such as allow integer or NULL* or the more general allow different types

Re: [PHP-DEV] Incomprehension with preg_match and utf8

2012-11-05 Thread Gustavo Lopes
of the POSIX character classes.) but I've got 1 in some case : The documentation is simply out-of-date. We have set PCRE_UCP if the 'u' modifier is present for some time now (since 87a237342, 3 Oct 2010). Look for PCRE_UCP in http://www.pcre.org/pcre.txt to know the implications. -- Gustavo

Re: [PHP-DEV] [RFC] ICU UConverter implementation for ext/intl

2012-10-30 Thread Gustavo Lopes
null). Unusual as this may be, it would be a bad idea to introduce inconsistency here. See the implementations in the other modules. * The tests have poor coverage. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] stream_get_line behaviour Bug #63240

2012-10-11 Thread Gustavo Lopes
(!feof($handle)) -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-09-04 Thread Gustavo Lopes
to repeatedly iterate over it. I disagree that this is a normal iteration scenario. And AFAIK all SPL iterators are rewindable, so it's normal we can't find examples on point. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-09-03 Thread Gustavo Lopes
: http://www.mail-archive.com/internals@lists.php.net/msg60706.html -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-09-03 Thread Gustavo Lopes
an E_STRICT does not signal, by itself, a bug. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-09-03 Thread Gustavo Lopes
established. So it's not really analogous. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-09-02 Thread Gustavo Lopes
cost a business money -- or in far more destructive manners (for instance, if the iterator was to return a set of files or database entities to keep when deleting others). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Exceptions Vs Errors

2012-09-02 Thread Gustavo Lopes
, except maybe by using checked exceptions (which most people hate, with good reason). Writing bad exception-based code and bad error-code-based code is always easy. See the tables here: http://blogs.msdn.com/b/oldnewthing/archive/2005/01/14/352949.aspx -- Gustavo Lopes -- PHP Internals - PHP

Re: [PHP-DEV] Re: [VOTE] Generators

2012-09-01 Thread Gustavo Lopes
be adjudicated by the community through an RFC that establishes either a clear general policy for exception throwing or handles just this particular case. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-09-01 Thread Gustavo Lopes
attractive because there are few built-in classes in the core. To be sure, there's one important distinction between core and ext/spl. ext/spl should depend on core, not the other way around. Which has little relevance for this discussion. -- Gustavo Lopes -- PHP Internals - PHP Runtime

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-09-01 Thread Gustavo Lopes
On Sun, 02 Sep 2012 02:27:02 +0200, Rasmus Lerdorf ras...@lerdorf.com wrote: On 09/01/2012 04:51 PM, Gustavo Lopes wrote * In fact, if there is a unifying theme in the usage of exceptions in PHP, is that exceptions are used when OOP interfaces are involved (see Zend interfaces, SPL

Re: [PHP-DEV] Re: Are exceptions allowed in php core?

2012-09-01 Thread Gustavo Lopes
inconsistent with the other Zend interfaces), but definitely a warning is not. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [VOTE] Generators

2012-08-29 Thread Gustavo Lopes
the iterators throw exceptions on similar situations. Generators are iterators, so I see no deviation from the norm here. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: [VOTE]Call for voting: support use list in foreach

2012-08-26 Thread Gustavo Lopes
could make more sense. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-24 Thread Gustavo Lopes
to take a look nevertheless; this is the weld (CDI reference implementation) documentation: * http://docs.jboss.org/weld/reference/latest/en-US/html/interceptors.html * http://docs.jboss.org/weld/reference/latest/en-US/html/decorators.html -- Gustavo Lopes -- PHP Internals - PHP Runtime

Re: [PHP-DEV] shared mysqlnd extension ...

2012-08-21 Thread Gustavo Lopes
you're having that points to it not working when built properly. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] shared mysqlnd extension ...

2012-08-21 Thread Gustavo Lopes
Em 2012-08-21 14:10, Lester Caine escreveu: Gustavo Lopes wrote: So should I be updating that bug to the current state of play? That this is actually by design? Or create a new bug that states that '--enable-mysqlnd=shared' should not be allowed? Or is there some third position in this jigsaw

Re: [PHP-DEV] register_globals work arounds

2012-08-02 Thread Gustavo Lopes
that yourself, this is clearly off-topic. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] [RFC] Remove calls with incompatible Context

2012-07-30 Thread Gustavo Lopes
https://wiki.php.net/rfc/incompat_ctx An RFC for deprecating and removing $this from incompatible context. Comments are welcome. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-07-30 Thread Gustavo Lopes
) a little more definitive. As much as I'd like to have an error at call site here, the most sensible option is to just have $this === null inside the callee, like when you do: class A { function foo() {} } A::foo(); // E_STRICT I'll update the RFC with this. -- Gustavo Lopes -- PHP Internals

Re: [PHP-DEV] [RFC] Remove calls with incompatible Context

2012-07-30 Thread Gustavo Lopes
Em Mon, 30 Jul 2012 21:11:58 +0200, Todd Ruth tr...@proposaltech.com escreveu: On Mon, 2012-07-30 at 19:31 +0200, Gustavo Lopes wrote: https://wiki.php.net/rfc/incompat_ctx An RFC for deprecating and removing $this from incompatible context. Comments are welcome. I'm just a user

Re: [PHP-DEV] Run-tests.php JUnit format issue

2012-07-28 Thread Gustavo Lopes
with a different byte sequence in UTF-8. Of course, the underlying problem is that many tests are not encoded in UTF-8. I think Anthony's solution is fine. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Generators in PHP

2012-07-24 Thread Gustavo Lopes
of that object is inside the body of the function. Maybe this helps you reason about the feature. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] zend_parse_parameters() improvements

2012-07-21 Thread Gustavo Lopes
would need: function userland_wrapper($a, $b=null) { $args = func_get_args(); $args[0] *= 2; if (isset($args[1])) { $args[1] *= 2; } else { unset($args[1]); } call_user_func_array('internal_func', $args); } -- Gustavo Lopes -- PHP Internals - PHP Runtime

Re: [PHP-DEV] zend_parse_parameters() improvements

2012-07-19 Thread Gustavo Lopes
one less local variable. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] zend_parse_parameters() improvements

2012-07-19 Thread Gustavo Lopes
length_is_null == 0 = $length was not passed or NULL was its value (just like the userland check above). -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] zend_parse_parameters() improvements

2012-07-19 Thread Gustavo Lopes
and the pointer types) should not be redefined to parameter was passed. But it's my understanding that that's not what you're planning. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Implicit isset in ternary operator

2012-07-18 Thread Gustavo Lopes
-isset-isempty-check-on-short-ternary-operator -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] zend_parse_parameters() improvements

2012-07-18 Thread Gustavo Lopes
::createEnumeration((int32_t) l); } else if (zend_parse_parameter(ZEND_PARSE_PARAMS_QUIET, 1 TSRMLS_DC, arg, s, s, s_len) == SUCCESS) { TimeZone::createEnumeration(s); } else { //raise errror } } -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List

Re: [PHP-DEV] zend_parse_parameters() improvements

2012-07-18 Thread Gustavo Lopes
consistent manner - right now I know there are some functions that return different error messages than zpp does when they parse arguments, for example - this can be fixes. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net

Re: [PHP-DEV] Pseudo-objects (methods on arrays, strings, etc.)

2012-07-17 Thread Gustavo Lopes
On Tue, 17 Jul 2012 12:07:09 +0200, Pierre Joye wrote: On Tue, Jul 17, 2012 at 2:12 AM, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: Adding method call syntax to arrays hardly makes PHP more object oriented. Syntax is unimportant. There's no substantial difference between array_slice($arr

Re: [PHP-DEV] New String Function: str_replace_limit

2012-07-16 Thread Gustavo Lopes
On Sun, 15 Jul 2012 20:59:10 +0100, Paul Dragoonis wrote: The 4th param to str_replace is a by-ref param, so you can't just skip over it, can you ? I don't think so, but we could make it so that you could by using optional passing by reference. -- Gustavo Lopes -- PHP Internals - PHP

Re: [PHP-DEV] Pseudo-objects (methods on arrays, strings, etc.)

2012-07-16 Thread Gustavo Lopes
tough. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: array_last_key() function

2012-07-14 Thread Gustavo Lopes
the array successively. But in that case the argument about end() + key() having side effects is irrelevant because you are changing the array anyway. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: array_last_key() function

2012-07-14 Thread Gustavo Lopes
copying parts you the array, it is not a problem to change those copies. -- Gustavo Lopes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Iterable Type Hint

2012-07-12 Thread Gustavo Lopes
property. * Example: class A { public static function foo(callable $r) { B::foo($r); } private static function test() {} } class B { public static function foo(callable $r) {} } A::foo(['A', 'test']); -- Gustavo Lopes -- PHP Internals - PHP

  1   2   3   4   >