Re: [PHP-DEV] Zend Engine 3

2014-11-24 Thread Kalle Sommer Nielsen
2014-11-24 6:29 GMT+01:00 Xinchen Hui larue...@php.net: I don't understand why you rush for it. any work of you depends the number bumping? I don't see what makes it so different that we cannot do it now instead of later, not like it will be a game changer +1 for the change -- regards,

Re: [PHP-DEV] Zend Engine 3

2014-11-24 Thread Ferenc Kovacs
On Mon, Nov 24, 2014 at 10:24 AM, Kalle Sommer Nielsen ka...@php.net wrote: 2014-11-24 6:29 GMT+01:00 Xinchen Hui larue...@php.net: I don't understand why you rush for it. any work of you depends the number bumping? I don't see what makes it so different that we cannot do it now instead

Re: [PHP-DEV] [RFC] Default constructors

2014-11-24 Thread Dmitry Stogov
I like the last patch. I think ZEND_ACC_STATIC flag must not make any problems. However, I thought about one more inconsistent. Your patch works fine for parent:: methods but not for grandparents:: In the following code default constructor won't work. class A { } class B extends A { } class C

Re: [PHP-DEV] Zend Engine 3

2014-11-24 Thread Nikita Popov
On Mon, Nov 24, 2014 at 1:10 AM, Andrea Faulds a...@ajf.me wrote: Good evening, Since phpng, int64, and perhaps other future changes in PHP 7 are a pretty big change, I think we ought to bump the major version number of the Zend Engine, from Zend Engine 2 to Zend Engine 3. I have a pull

Re: [PHP-DEV] Zend Engine 3

2014-11-24 Thread Paul Dragoonis
On 24 Nov 2014 12:18, Nikita Popov nikita@gmail.com wrote: On Mon, Nov 24, 2014 at 1:10 AM, Andrea Faulds a...@ajf.me wrote: Good evening, Since phpng, int64, and perhaps other future changes in PHP 7 are a pretty big change, I think we ought to bump the major version number of the

Re: [PHP-DEV] Zend Engine 3

2014-11-24 Thread Paul Dragoonis
On 24 Nov 2014 12:32, Paul Dragoonis dragoo...@gmail.com wrote: On 24 Nov 2014 12:18, Nikita Popov nikita@gmail.com wrote: On Mon, Nov 24, 2014 at 1:10 AM, Andrea Faulds a...@ajf.me wrote: Good evening, Since phpng, int64, and perhaps other future changes in PHP 7 are a

Re: [PHP-DEV] enhance fget to accept a callback

2014-11-24 Thread Thomas Hruska
On 11/23/2014 2:47 PM, Rowan Collins wrote: For JSON, newlines aren't the delimiter you want, but with nested structures, I'm not sure how you'd parse a partial structure anyway. Are there JSON equivalents of SAX (event-based) parsers? If JSON is encoded into another format, newlines can be

[PHP-DEV] Re: Use zend_string* for op_array-arg_info[].name and class_name

2014-11-24 Thread Nikita Popov
On Mon, Nov 17, 2014 at 10:25 AM, Dmitry Stogov dmi...@zend.com wrote: Hi, Please review the patch https://gist.github.com/dstogov/47a39aff37f0a6441ea0 Thanks. Dmitry. Hi Dmitry, sorry for late reply. The problem we're trying to solve here is lack of ability to create a zend_string at

[PHP-DEV] Re: Use zend_string* for op_array-arg_info[].name and class_name

2014-11-24 Thread Dmitry Stogov
Hi Nikita, Thanks for review. I already thought about both approaches and failed as well (the second also doesn't work with C++). The proposed patch doesn't complicate engine a lot (may be only the inheritance code), but I afraid about problems in some edge cases. Thanks. Dmitry. On Mon, Nov

Re: [PHP-DEV] [RFC] Default constructors

2014-11-24 Thread Rowan Collins
Dmitry Stogov wrote on 24/11/2014 09:56: However, I thought about one more inconsistent. Your patch works fine for parent:: methods but not for grandparents:: In the following code default constructor won't work. class A { } class B extends A { } class C extends B { function __constructor()

Re: [PHP-DEV] [VOTE][RFC] Safe Casting Functions

2014-11-24 Thread Patrick ALLAERT
Le Wed Nov 19 2014 at 10:57:39 PM, Levi Morrison le...@php.net a écrit : - PHP suffers a lot from function bloat and this RFC provides multiple functions that do the same thing but differ only in how they handle errors. A simple validation of can this be safely cast to an integer without

Re: [PHP-DEV] [VOTE][RFC] Safe Casting Functions

2014-11-24 Thread Andrea Faulds
On 24 Nov 2014, at 16:08, Patrick ALLAERT patrickalla...@php.net wrote: Le Wed Nov 19 2014 at 10:57:39 PM, Levi Morrison le...@php.net a écrit : - PHP suffers a lot from function bloat and this RFC provides multiple functions that do the same thing but differ only in how they handle

Re: [PHP-DEV] [RFC] Default constructors

2014-11-24 Thread Stanislav Malyshev
Hi! However, I thought about one more inconsistent. Your patch works fine for parent:: methods but not for grandparents:: In the following code default constructor won't work. Yes, this is OK - the support is only for one pattern, calling the parent, because it's what you're supposed to do.

RE: [PHP-DEV] enhance fget to accept a callback

2014-11-24 Thread Rowan Collins
On 23 November 2014 23:36:30 GMT, Bill Salak b...@devtemple.com wrote: The callback would be given the string as returned by fgets today. The functional equivalent to fgetjson today is handled by something like $handle = fopen(~some file~, 'r'); while (($data = fgets($handle)) !== FALSE) {

[PHP-DEV] AV on PHP 5.5.18 + Zend Opcache in accel_chdir

2014-11-24 Thread Eric Stenson
Internals folks-- Who owns Zend Opcache these days? I've got a crash dump that appears to be a double-free of ZCG(cwd) during accel_chdir on PHP 5.5.18. Does this crash look familiar to anyone? [windbg output] 0:000 .ecxr eax= ebx=01b47cb0 ecx=77b12240 edx=01b0 esi=01b12f08

[PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Andrea Faulds
Good evening, Here’s a new RFC: https://wiki.php.net/rfc/unicode_escape It has a rationale section explaining why certain decisions were made, that I’d recommend you read in full. Thanks! -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Andrea Faulds
On 24 Nov 2014, at 22:09, Andrea Faulds a...@ajf.me wrote: Here’s a new RFC: https://wiki.php.net/rfc/unicode_escape My apologies to you all, a small correction: The title of that email should’ve been “[RFC] Unicode Codepoint Escape Syntax” to match the title of the RFC, I missed out the

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Sara Golemon
On Mon, Nov 24, 2014 at 2:09 PM, Andrea Faulds a...@ajf.me wrote: Here’s a new RFC: https://wiki.php.net/rfc/unicode_escape I'm okay with producing UTF-8 even though our strings are technically binary. As you state, UTF-8 is the de-facto encoding, and recognizing this is pretty reasonable. You

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Andrea Faulds
On 24 Nov 2014, at 22:21, Sara Golemon poll...@php.net wrote: On Mon, Nov 24, 2014 at 2:09 PM, Andrea Faulds a...@ajf.me wrote: Here’s a new RFC: https://wiki.php.net/rfc/unicode_escape I'm okay with producing UTF-8 even though our strings are technically binary. As you state, UTF-8 is

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Adam Harvey
On 24 November 2014 at 14:21, Sara Golemon poll...@php.net wrote: On Mon, Nov 24, 2014 at 2:09 PM, Andrea Faulds a...@ajf.me wrote: Here’s a new RFC: https://wiki.php.net/rfc/unicode_escape I'm okay with producing UTF-8 even though our strings are technically binary. As you state, UTF-8 is

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Andrea Faulds
On 24 Nov 2014, at 22:30, Adam Harvey ahar...@php.net wrote: On 24 November 2014 at 14:21, Sara Golemon poll...@php.net wrote: On Mon, Nov 24, 2014 at 2:09 PM, Andrea Faulds a...@ajf.me wrote: Here’s a new RFC: https://wiki.php.net/rfc/unicode_escape I'm okay with producing UTF-8 even

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Adam Harvey
On 24 November 2014 at 14:35, Andrea Faulds a...@ajf.me wrote: On 24 Nov 2014, at 22:30, Adam Harvey ahar...@php.net wrote: I'm also OK with this, although I do wonder if we should be respecting the user's default_charset setting instead. (Since default_charset defaults to UTF-8, in practice

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Sara Golemon
We would have to require ICU, but that might be worthwhile for PHP 7 anyway. Having at least one i18n API that's guaranteed to be available would be nice. It's 2014. I think requiring ICU is reasonable at this point. Orthogonal to this RFC, but I'd be in favor of deprecating all the non-ICU

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Andrea Faulds
On 24 Nov 2014, at 23:19, Sara Golemon poll...@php.net wrote: We would have to require ICU, but that might be worthwhile for PHP 7 anyway. Having at least one i18n API that's guaranteed to be available would be nice. It's 2014. I think requiring ICU is reasonable at this point. I also

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Alain Williams
On Mon, Nov 24, 2014 at 02:21:37PM -0800, Sara Golemon wrote: On Mon, Nov 24, 2014 at 2:09 PM, Andrea Faulds a...@ajf.me wrote: Here’s a new RFC: https://wiki.php.net/rfc/unicode_escape I'm okay with producing UTF-8 even though our strings are technically binary. As you state, UTF-8 is the

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Andrea Faulds
On 24 Nov 2014, at 23:29, Alain Williams a...@phcomp.co.uk wrote: There is a big difference with \u or \U and \x or \o and that is the number of characters that follow the escape. \x has 2, \o has 3 - both are short and easy to count with the eye. \U012345 is quite long and it is not so

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Alain Williams
On Mon, Nov 24, 2014 at 11:36:28PM +, Andrea Faulds wrote: On 24 Nov 2014, at 23:29, Alain Williams a...@phcomp.co.uk wrote: echo \U{arabic letter alef}\n”; Ooh, that’s an interesting idea. I believe Perl actually has this already, although it uses the \N syntax:

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Sara Golemon
On Mon, Nov 24, 2014 at 2:09 PM, Andrea Faulds a...@ajf.me wrote: Here’s a new RFC: https://wiki.php.net/rfc/unicode_escape I've linked a provisional HHVM implementation from that page. Planning to match whatever PHP7 does, of course, but for the moment I've added named entity support since it's

[PHP-DEV] [RFC] IntlChar class and intl_char_*() functions

2014-11-24 Thread Sara Golemon
While playing around with Andrea's unicode literals syntax proposal, I was reminded of just how little of ICU is exposed. I've put up a short proposal for adding IntlChar exporting these APIs as static methods (with a matching non-oop interface). https://wiki.php.net/rfc/intl.char -- PHP

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Ivan Enderlin @ Hoa
Le 24/11/2014 23:09, Andrea Faulds a écrit : Good evening, Here’s a new RFC: https://wiki.php.net/rfc/unicode_escape It has a rationale section explaining why certain decisions were made, that I’d recommend you read in full. Excellent RFC, thank you for this proposal. I would suggest this