RE: [PHP-DEV] [RFC][List/Assoc\unique]

2022-12-05 Thread CHU Zhaowei
especially I cannot think of anything that we may add to these two namespace in the future. Regards, CHU Zhaowei -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Adding new closing tag =?> for keeping trailing newline

2022-06-07 Thread CHU Zhaowei
eful to introduce a new one. (Personlly I was a supporter for runtime configuration as well, but I'm not able to convince myself to ignore or defeat that argument.) Regards, CHU Zhaowei -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

RE: [PHP-DEV] [VOTE] Readonly properties

2021-07-02 Thread CHU Zhaowei
gards, CHU Zhaowei -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

RE: [PHP-DEV] [RFC] Add Random Extension (before: Add Random class)

2021-07-02 Thread CHU Zhaowei
other question for nextInt(). What's the range of its return? It's not clear in the RFC. The range of mt_rand() (without min and max) is 0 to mt_getrandmax(), so how about nextInt()? is there any equivalent method/constant for it? Regards, CHU Zhaowei -- PHP Internals - PHP R

RE: [PHP-DEV] [RFC] [Draft] Final constants

2021-04-21 Thread CHU Zhaowei
ParentClassName::` can do the job as well. Regards, CHU Zhaowei

RE: [PHP-DEV] [RFC] [Draft] Final constants

2021-04-19 Thread CHU Zhaowei
Hi Mate, Can I ask why you use late static binding while you don't want your constant value to be changed/overridden by child classes? IMHO, `self::FOO` is all you need. Regards, CHU Zhaowei -Original Message- From: Máté Kocsis Sent: Sunday, April 18, 2021 10:20 PM To: PHP Inte

RE: [PHP-DEV] [VOTE] Direct execution opcode file without php source code file

2021-04-05 Thread CHU Zhaowei
Voted no as well. As point out during discussion, we are still not clear about the advantages of this proposal. There are other competitive, if not better, alternatives for the scenarios that the author suggested. Regards, CHU Zhaowei > -Original Message- > From: ��C ”k”k > Sen

RE: [PHP-DEV] Changes to Git commit workflow

2021-04-01 Thread CHU Zhaowei
Hi Nikita, Can I check with you if the hook integrating with bugs.php.net still works? I just committed a bug fix on doc-zh repo, and the bug report has been updated. Thanks. Regards, CHU Zhaowei -Original Message- From: Nikita Popov Sent: Monday, March 29, 2021 6:52 AM To: PHP

RE: [PHP-DEV] Draft RFC: foreach iteration of keys without values

2020-09-03 Thread CHU Zhaowei
Regarding the unused variable, I think OPCache should be able to identify and eliminate it. I don't think it's necessary to add a new syntax here. Array destructuring sounds like a similar case to me. If you don't like [, , $v] =$arr, you can use [$_, $_, $v]=$arr instead. Regar

RE: [PHP-DEV] [RFC] Amendments to Attributes

2020-05-20 Thread CHU Zhaowei
Hi Benjamin, It's good to hear that `PhpCompikerAttribute` can be merged, could you include it in the RFC as well? Thus I think people who support `UserlandAttribute` can agree with `Attribute` now as well. Regards, CHU Zhaowei -Original Message- From: Benjamin Eberlei

RE: [PHP-DEV] Update coding standards wrt. C99?

2020-05-08 Thread CHU Zhaowei
> IMO, mixing variables and codes are always not a good practice I think it depends. For example, modern languages recommend to declare i inside the for loop block instead of in the function block. -Original Message- From: Xinchen Hui Sent: Wednesday, May 6, 2020 6:20 PM To: Christoph

RE: [PHP-DEV] A Standard PHAR library included with PHP?

2020-05-08 Thread CHU Zhaowei
back to php. For new functions, it means more workload. The RFC's author has to convince others that this feature is better to implement in PHP rather than in C. Regards, CHU Zhaowei -Original Message- From: Mike Schinkel Sent: Friday, May 8, 2020 10:03 AM To: Dan Ackroyd

RE: [PHP-DEV] [RFC] <> Attribute

2020-05-08 Thread CHU Zhaowei
you clarify when the deprecated message will come up. But for the methods/functions this is missing. I think it would be better if you make it more clear. Thanks, CHU Zhaowei -Original Message- From: Benjamin Eberlei Sent: Thursday, May 7, 2020 3:22 PM To: PHP Internals Subject: [PHP-DE

RE: [PHP-DEV] Renaming PhpAttribute to Attribute

2020-05-02 Thread CHU Zhaowei
It will make "attribute" a reserved keyword, which caused more BC break comparing to Attribute class. Regards, CHU Zhaowei -Original Message- From: Aleksander Machniak Sent: Sunday, May 3, 2020 1:38 AM To: internals@lists.php.net Subject: Re: [PHP-DEV] Renaming PhpAt

RE: [PHP-DEV] opcache.jit directive should be split up

2020-05-02 Thread CHU Zhaowei
tions. E.g. what does "minimal" mean in this context? Regards, CHU Zhaowei -Original Message- From: tyson andre Sent: Saturday, May 2, 2020 9:59 PM To: Benjamin Eberlei ; PHP Internals Subject: Re: [PHP-DEV] opcache.jit directive should be split up Hi Benjamin, > > I

RE: [PHP-DEV] [RFC] "arrayable" pseudo type hint

2019-11-24 Thread CHU Zhaowei
cannot implement or very difficult to implement. IMO it will make php more complex if we include this in the core. Actually what you suggested has been totally covered by the future scopes of the union types RFC. If you really want to explore this idea, I think they are worth more attention, instead

RE: [PHP-DEV] Concept: "arrayable" pseudo type and \Arrayable interface

2019-11-18 Thread CHU Zhaowei
rface? I would suggest to find a way to make those built-in array_* functions support the arraylike objects, no matter which interface it requires, existing ArrayAccess, or any new interface. Regards, CHU Zhaowei > -Original Message- > From: Aimeos | Norbert Sendetzky > Sent:

RE: [PHP-DEV] Re: [RFC] Namespace-scoped declares, again

2019-07-27 Thread CHU Zhaowei
The introduction in this RFC says "A common complaint is that this directive has to be specified in every single file.". I think people will complain import_declares if we follow your design. Regards, CHU Zhaowei > -Original Message- > From: Mark Randall > Sent: Su

RE: [PHP-DEV] [VOTE] Strict operators directive

2019-07-09 Thread CHU Zhaowei
Although I like this idea, I'm wondering if such a big change should go for php 8 instead of 7.4. Regards, CHU Zhaowei > -Original Message- > From: Arnold Daniels > Sent: Tuesday, July 9, 2019 9:56 AM > To: PHP Internals > Subject: [PHP-DEV] [VOTE] Strict operato

RE: [PHP-DEV] Memory leak in eval()'d code

2019-06-30 Thread CHU Zhaowei
ry is needed to compile longer codes. Include several times just work like copy&paste several times. But since we are including the same file, is it possible to detect and reuse the space? Regards, CHU Zhaowei > -Original Message- > From: Stanislav Malyshev > Sent: Sunday,

RE: [PHP-DEV] [RFC] Desire to move RFC add_str_begin_and_end_functions to a vote

2019-06-29 Thread CHU Zhaowei
this should be considered as a potential BC break, which is not reflected in the RFC yet. Regards, CHU Zhaowei > -Original Message- > From: Nikita Popov > Sent: Saturday, June 29, 2019 6:07 AM > To: w...@wkhudgins.info > Cc: Ben Ramsey ; PHP internals > Subject: Re: [P

RE: [PHP-DEV] Memory leak in eval()'d code

2019-06-29 Thread CHU Zhaowei
number of methods to create such opaque references should be limited. __CLASS__, get_class(), reflections, clone. Did I miss any other way? With the help of this flag, we are able to know if it’s safe to remove the class definition during destruction. Regards, CHU Zhaowei From: Nikita Popov

RE: [PHP-DEV] Memory leak in eval()'d code

2019-06-29 Thread CHU Zhaowei
tself should be included in the GC as well. I guess the problem here is we didn't GC the space for definition of anonymous classes. Regards, CHU Zhaowei > -Original Message- > From: Stanislav Malyshev > Sent: Saturday, June 29, 2019 6:52 AM > To: Benjamin Morel > Cc: PHP

RE: [PHP-DEV] [RFC] [Vote] Base convert changes

2019-06-19 Thread CHU Zhaowei
Hi Scott, Could you clarify what will happen if multiple negative sign occurs. I didn't find it in the RFC. e.g. base_convert('--ff', 16, 10) Thanks, CHU Zhaowei > -Original Message- > From: Scott Dutton > Sent: Wednesday, June 19, 2019 3:24 PM > To: intern

RE: [PHP-DEV] Wiki display problem

2019-06-03 Thread CHU Zhaowei
Any chance to get https support for news.php.net? https://bugs.php.net/bug.php?id=67680 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] RE: [RFC][VOTE] Spread Operator in Array Expression v0.2

2019-05-08 Thread CHU Zhaowei
Sorry for the one day delay. This RFC has passed with 43 votes in favor and 1 against. Thanks & Regards, CHU Zhaowei

RE: [PHP-DEV] TCO: Tail Call Optimization

2019-04-29 Thread CHU Zhaowei
milar concept yet. In addition, if you check the compatibility for TCO, you will realize only safari provides support for it now. Regards, CHU Zhaowei > -Original Message- > From: David Rodrigues > Sent: Sunday, April 28, 2019 2:48 AM > To: PHP Internals > Subject:

[PHP-DEV] [RFC][VOTE] Spread Operator in Array Expression v0.2

2019-04-21 Thread CHU Zhaowei
Hi internals, Since there is no more questions for more than one week, I’ve opened the vote on the spread operator in array expression RFC. The vote lasts two weeks and it closes at 7-May. https://wiki.php.net/rfc/spread_operator_for_array#vote Regards, CHU Zhaowei

RE: [PHP-DEV] [RFC] Spread Operator in Array Expression v0.2

2019-04-21 Thread CHU Zhaowei
On Monday, April 8, 2019 9:22 PM Nikita Popov wrote: > This looks reasonable to me. My only concern would be the "by-reference > passing" section of the RFC. The current proposal states that [...$arr] will > preserve references in $arr, which is not the behavior I would expect. > > Is this cho

RE: [PHP-DEV] bool values and increment operators?

2019-04-07 Thread CHU Zhaowei
It there anyone working on this? If not, I'd like to prepare a RFC targeting PHP 8 to address this issue. In addition, I'm thinking whether it's possible and necessary to add a global strict mode (like "use strict" in js) in PHP 8 to deal with this kind of unexpected surprise. I know we have de

RE: [PHP-DEV] Parameter skipping

2019-04-06 Thread CHU Zhaowei
rams) was proposed in 2013. Does the problems which stopped us before still exist in 2019? Since we all agree named parameter should be a better solution, why not take a look at it first? Best regards, CHU Zhaowei -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] [RFC] Spread Operator in Array Expression v0.2

2019-04-05 Thread CHU Zhaowei
If we didn't provide support for string keys, we can add it back later. If we provide this feature, and later we passed named argument with a different way to handle string keys, then it will be a huge inconsistent and difficult to fix. Thanks, CHU Zhaowei -Original Message-

RE: [PHP-DEV] [RFC] Spread Operator in Array Expression v0.2

2019-04-05 Thread CHU Zhaowei
idn't see the same limit exists for arrays, so I didn't include this rule in my RFC. Thanks, CHU Zhaowei -Original Message- From: Claude Pache Sent: Friday, April 5, 2019 4:04 PM To: Stijn Peeters Cc: CHU Zhaowei ; PHP internals Subject: Re: [PHP-DEV] [RFC] Spread Op

RE: [PHP-DEV] [RFC] Spread Operator in Array Expression v0.2

2019-04-04 Thread CHU Zhaowei
pril 5, 2019 12:40 AM To: Derick Rethans Cc: CHU Zhaowei ; PHP internals Subject: Re: [PHP-DEV] [RFC] Spread Operator in Array Expression v0.2 On Thu, 4 Apr 2019 at 17:14, Derick Rethans wrote: > Could you add to the RFC what the exact pain point is that this is > trying to address? I

RE: [PHP-DEV] [RFC] Spread Operator in Array Expression v0.2

2019-04-04 Thread CHU Zhaowei
A recoverable error will be thrown once a string key is encountered. Thanks for raising this question, and I've updated the RFC accordingly. -Original Message- From: Stephen Reay Sent: Friday, April 5, 2019 12:40 AM To: CHU Zhaowei Cc: PHP internals Subject: Re: [PHP-DEV]

[PHP-DEV] [RFC] Spread Operator in Array Expression v0.2

2019-04-04 Thread CHU Zhaowei
operator consistent. I have also added Q&A to explain the questions I received. Thanks & best regards, CHU Zhaowei -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] [VOTE] New custom object serialization mechanism

2019-03-06 Thread CHU Zhaowei
time, I'd like to ask, is it possible to show warnings only if potential broken detected, e.g. serialize with reference, or parent:: serialize is called. Regards, CHU Zhaowei -Original Message- From: Nikita Popov Sent: Tuesday, March 5, 2019 8:35 PM To: Sebastian Bergmann Cc: PHP

Re: [PHP-DEV] print with newline

2019-03-03 Thread CHU Zhaowei
If you really believe you are proposing something meaningful, here [1] is a guide for you to make some changes in php kernel. However I don't think you can win the vote since the response is bad so far. [1]: https://wiki.php.net/rfc/howto Regards, CHU Zhaowei -邮件原件- 发件人: Steven

Re: [PHP-DEV] Disable PEAR by default

2019-02-01 Thread CHU Zhaowei
It's ok that you don't like Composer. You can find or even create a new tool which fit you needs. The reason we are talking about PEAR here, is it's bundled in the core, and no one is maintaining it. We are not saying Composer should be included into the core, at least not this thread. -

Re: [PHP-DEV] [RFC] Spread Operator in Array Expression

2018-11-19 Thread CHU Zhaowei
constant arrays vs variables than + or array_merge() are. Yes. The spread operator follows the semantics as `array_merge`, but besides brevity and better performance (no more overhead of function call, and constant array can be compiled at compiled time), this RFC also brings the support for objects implementing `Traversables`. Best regards, CHU Zhaowei -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] [RFC] Spread Operator in Array Expression

2018-11-19 Thread CHU Zhaowei
p-src/pull/3640). It's still WIP, but I'll finish it in the next following weeks. Thanks & Best regards, CHU Zhaowei

[PHP-DEV] Re:[PHP-DEV] [VOTE] array_key_first(), array_key_last(), array_value_first(),array_value_last()

2018-07-09 Thread CHU Zhaowei
made same mistake. Regards, CHU Zhaowei

[PHP-DEV] Re:[PHP-DEV] Weird destructor call order on stream wrappers

2018-03-21 Thread CHU Zhaowei
There is a related bug report: https://bugs.php.net/bug.php?id=75931 It also point out that the construcor method has been ignored. Best regards, CHU Zhaowei

Re: [PHP-DEV] Direct method call slower than method_exists()

2018-03-09 Thread CHU Zhaowei
What are you trying to prove? We all know method call is expensive. So definitely it will be slower when you make more calls. Best regards, CHU Zhaowei

Re: [PHP-DEV][RFC][DISCUSSION] Deprecate the backtick operator

2018-02-12 Thread CHU Zhaowei
plan for unicode string. Best regards, CHU Zhaowei

[PHP-DEV] spam on user notes

2017-12-21 Thread CHU Zhaowei
email or ip. In addition, we may need to improve the user notes with anti-spam system, maybe Akismet? Best regards, CHU Zhaowei

Re: [PHP-DEV] [RFC] Explicit call-site send-by-ref syntax

2017-12-08 Thread CHU Zhaowei
On Fri, Dec 8, 2017 06:16 PM, "li...@rhsoft.net" wrote: > >and it's much bader to use a not so long existed syntax which was now >changed to a fatal error - just type "php call-by-reference" in google > I know most people of this list using and contributing to PHP for a very long time, but I want

RE: [PHP-DEV] [RFC] Explicit call-site send-by-ref syntax

2017-12-07 Thread CHU Zhaowei
On Friday, December 8, 2017 12:42 PM, "Stephen Rea" < php-li...@koalephant.com> wrote: >> On 8 Dec 2017, at 08:54, "li...@rhsoft.net" wrote: >> >> >> >>> Am 08.12.2017 um 01:38 schrieb Björn Larsson: Den 2017-12-06 kl. 20:49, skrev Nikita Popov: Hi internals, I'd like prop

[PHP-DEV] Re:[PHP-DEV] [VOTE] Allow a trailing comma in function calls

2017-10-21 Thread CHU Zhaowei
Hello Sammy, I'd like to know if a trailing comma would affect the number of args or not. for example, ``` function foo(){ return func_num_args(); } foo('a','b',); ``` would return 2 or 3? best regards, CHU Zhaowei -- Original --