Re: [PHP-DEV] [RFC][DISCUSSION] Allow default value in list() syntax

2016-01-21 Thread reeze
Bump this to continue discussion of this RFC ( https://wiki.php.net/rfc/list_default_value). In case some of you didn't follow it before. This RFC propose to allow set default value in list() assignment: list($a = 'default value') = $arr; On 10 November 2015 at 11:14, reeze wr

Re: [PHP-DEV] [RFC][DISCUSSION] Allow default value in list() syntax

2015-11-09 Thread reeze
Hey Dan, On 9 November 2015 at 23:24, Dan Ackroyd wrote: > Hi Reeze, > > On 9 November 2015 at 13:35, reeze wrote: > > Hi internals! > > > > I'd like to open a discussion on the RFC to allow set default values for > > list() assignment: https

[PHP-DEV] [RFC][DISCUSSION] Allow default value in list() syntax

2015-11-09 Thread reeze
Hi internals! I'd like to open a discussion on the RFC to allow set default values for list() assignment: https://wiki.php.net/rfc/list_default_value. What is your idea? Thanks. -- Reeze Xia http://reeze.cn

Re: [PHP-DEV] Request Feedback for Instance Variable Sugar RFC

2015-03-09 Thread reeze
} > } > > > = Backwards Compatibility = > > Leave `$this->` available. > > = Proposed PHP Version(s) = > > This is proposed for the next PHP x, currently PHP 7. > > -- > Shawn McCool | Big Name > sh...@heybigname.com > heybigname.com > -- Reeze Xia http://reeze.cn

Re: [PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-08 Thread reeze
On 9 March 2015 at 06:44, Pierre Joye wrote: > On Sun, Mar 8, 2015 at 2:51 AM, reeze wrote: > > Hi internals, > > > > I'd like to deprecate function: sizeof() [1][2], which is an alias of > > count(). some people > > expect it return the memory size of

Re: [PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-08 Thread reeze
kept. If "Consistent function names" RFC passes, aliases will be > Yes, I think so, it didn't remove the alias, but propose use use count() instead. > listed in main function page only. It may reduce confusions hopefully. > That might helps. > > Regards, > > -- > Yasuo Ohgaki > yohg...@ohgaki.net > -- Reeze Xia http://reeze.cn

Re: [PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-08 Thread reeze
Hi, On 8 March 2015 at 00:41, Kalle Sommer Nielsen wrote: > Hi > > 2015-03-07 16:51 GMT+01:00 reeze : > > Hi internals, > > > > I'd like to deprecate function: sizeof() [1][2], which is an alias of > > count(). some people > > expect it return the

[PHP-DEV] [Discussion] Deprecate function sizeof()

2015-03-07 Thread reeze
ub.com/php/php-src/pull/1161 [3] http://stackoverflow.com/questions/3974385/php-array-count-or-sizeof -- Reeze Xia http://reeze.cn

Re: [PHP-DEV] Use behavior thoughts

2015-03-06 Thread reeze
ecific code path (or bugs related to it). > > > > I like this way, because it's more logical and readable. There aren't > unpredictable effects and misunderstanding with interpretation of source > code. > +1 -- Reeze Xia http://reeze.cn

[PHP-DEV] [Disccusion] Introduce error_clear_last() function

2015-03-03 Thread reeze
https://github.com/mathnerd3141/doeqs_new/blob/ba23c478a0c819dc6b2f8f96f9df35d16505eed2/errors.php#L20 2. https://github.com/benfinke/cargo_plane/blob/4911bc6a91d8345aa62c81fb52c8bed9d216c44e/Splunk/Util.php#L89 Request: https://bugs.php.net/bug.php?id=45235 -- Reeze Xia http://reeze.cn

Re: [PHP-DEV] Re: About optimization for compiler

2015-02-26 Thread reeze
ere might be some AST level optimizations, this not opcache's job too. > > > > thanks > > > > -- > > Xinchen Hui > > @Laruence > > http://www.laruence.com/ > > > > -- > Xinchen Hui > @Laruence > http://www.laruence.com/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Reeze Xia http://reeze.cn

Re: [PHP-DEV] [RFC] Void Return Type

2015-02-13 Thread reeze
doesn't worth it. > > François > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Reeze Xia http://reeze.cn

Re: [PHP-DEV] [RFC] Void Return Type

2015-02-13 Thread reeze
fc/void_return_type > > Please have a read over it. I think this would be a simple, yet useful > addition. > > Thanks! > -- > Andrea Faulds > http://ajf.me/ > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Reeze Xia http://reeze.cn

Re: [PHP-DEV] [DISCUSSION] Make empty() a Variadic

2015-02-13 Thread reeze
f the empty() means if any one of them is empty then result is TRUE, the advantage of it disappeared: if (empty($a, $b, $c)) { // you might want to check it again. if (empty($a)) { //blah blah. } else if (empty($b)) { } } > > But that's just my opinion. :) > -- > Andrea Faulds > http://ajf.me/ > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Reeze Xia http://reeze.cn

Re: [PHP-DEV][RFC][VOTE] Group Use Declarations

2015-02-12 Thread reeze
have it added other than on a major version > release. > > Thanks for your questions and your vote :) > -- Reeze Xia http://reeze.cn

[PHP-DEV] Re: Proposal: Introduce a new macro:php_error_docref_ex()

2015-02-11 Thread reeze
const char *format, ...)* *+{* *+* *va_list args;* *+* *+* *va_start(args, format);* *+* *php_error_docref0(NULL, type, format, args);* *+* *va_end(args);* *+}* *+* *+#define php_error_doc php_error_doc0* *+* > > Thanks. Dmitry. > > On Wed, Feb 11, 2015 at 6:01 PM,

[PHP-DEV] Re: Proposal: Introduce a new macro:php_error_docref_ex()

2015-02-11 Thread reeze
for that. > > > also macros with __VA_ARGS__ may be not portable, s it should be > implemented differently. > Yes I should use ##__VA_ARGS__ instead. > Thanks. Dmitry. > > > > On Wed, Feb 11, 2015 at 11:41 AM, Xinchen Hui wrote: > >> Hey: >> >> On W

[PHP-DEV] Re: Proposal: Introduce a new macro:php_error_docref_ex()

2015-02-11 Thread reeze
range TSRML_CC macro, it is hard to maintain. On 11 February 2015 at 16:16, Xinchen Hui wrote: > On Wed, Feb 11, 2015 at 4:07 PM, reeze wrote: > > Hi all, > > There are a lot of code use php_error_docref() macro, the first > > parameter > > mostly is

[PHP-DEV] Re: Proposal: Introduce a new macro:php_error_docref_ex()

2015-02-11 Thread reeze
PS: Github search result: https://github.com/search?l=c&q=php_error_docref&ref=searchresults&type=Code&utf8=%E2%9C%93 It seems that no one need the docref at all. On 11 February 2015 at 16:07, reeze wrote: > Hi all, > There are a lot of code use php_error_doc

[PHP-DEV] Proposal: Introduce a new macro:php_error_docref_ex()

2015-02-11 Thread reeze
ake code looks better and the extension maintainer's easier. Another option would be just update the php_error_docref() macro to remove the docref parameter, default to NULL but not add a new macro. What do you think about it? [1] https://github.com/php/php-src/pull/1075 -- Reeze Xia http://reeze.cn

Re: [PHP-DEV] Re: Annotated PHP 5->7 extension diff

2015-02-10 Thread reeze
Z_STRLEN_P(key)+1, (void**)&ce_ptr) == SUCCESS) { > + if ((func = zend_hash_find_ptr(ht, Z_STR_P(key))) != NULL) { > > Jan > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Reeze Xia http://reeze.cn

Re: [PHP-DEV] Re: [RFC] Support internal function return types

2015-02-05 Thread reeze
Thanks a lot! On 5 February 2015 at 16:03, Dmitry Stogov wrote: > merged into master with the proposed changes. > > Thanks. Dmitry. > > On Thu, Feb 5, 2015 at 9:37 AM, reeze wrote: > >> Hi Dmitry, >> >> On 5 February 2015 at 14:31, Dmitry Stogov wrote: &

Re: [PHP-DEV] Re: [RFC] Support internal function return types

2015-02-04 Thread reeze
Hi Dmitry, On 5 February 2015 at 14:31, Dmitry Stogov wrote: > Hi reeze, > > The original "return type" patch was designed to support internal > functions as well. > So I think, this is just a good addition. > Yes :) > > Only one note: > I'm

Re: [PHP-DEV] Re: [RFC][DISCUSSION] script() and script_once()

2015-02-04 Thread reeze
The name seems ambiguous , how about "require_script/once" to match "do_sth" pattern? On 5 February 2015 at 10:03, Yasuo Ohgaki wrote: > Hi all, > > On Thu, Feb 5, 2015 at 10:53 AM, Yasuo Ohgaki wrote: > > > I would like to discuss my "must have it in PHP 7" item. > > > > PHP RFC: script() and

[PHP-DEV] Re: [RFC] Support internal function return types

2015-02-04 Thread reeze
PS: There is no enough unit tests to cover all of the branches, if we want then I have to add a bunch of for testing functions and classes in ZEND_DEBUG, what is the better way? On 5 February 2015 at 11:54, reeze wrote: > Hi all, > > RFC: https://wiki.ph

[PHP-DEV] [RFC] Support internal function return types

2015-02-04 Thread reeze
Hi all, RFC: https://wiki.php.net/rfc/internal_function_return_types I noticed that return types RFC[1] didn't support internal functions, I just open a PR[2] to support it. There are some open issues we can discuss: 1. User land return types didn't stop the php, the current implementation ra

Re: [PHP-DEV] Question regarding stream wrappers and op code cache

2015-02-03 Thread reeze
Hi Cesar, On 4 February 2015 at 07:26, Cesar Rodas wrote: > Hi Guys, > > I have a doubt, is it efficient include/require files from a source > different than the "real file system" a stream wrapper class? My > question is, would the op-code cache work as it would when reading a > file form the f

Re: [PHP-DEV] Enable error_handler callback parameters to be passed by reference

2015-01-23 Thread reeze
Yeah, seem other want it it too, so I just updated the PR to allow the first four parameters been passed by reference. On 23 January 2015 at 16:23, Nicolas Grekas wrote: > > function myErrorHandler($errno, &$errstr, $errfile, $errline) {...} > > > > It would be awesome to also pass $errfile and

Re: [PHP-DEV] Enable error_handler callback parameters to be passed by reference

2015-01-22 Thread reeze
I like the idea, we have the similar scenario, we need to print request log id to the log, so I just made a PR to implement this: https://github.com/php/php-src/pull/1018 the PR is against master, but I think this could also been in 5.5. On 22 January 2015 at 18:41, Yasuo Ohgaki wrote: > Hi Th

Re: [PHP-DEV] [RFC] Extension Prepend Files

2015-01-04 Thread reeze
oblem opcache didn't allow streams except `file://` and `phar://`, @François created a RFC to support it [1], if that was accepted, it should work with full speed :) -- [1] https://github.com/php/php-src/pull/976/files On 4 January 2015 at 21:02, Benjamin Eberlei wrote: > Hey reeze, > >

Re: [PHP-DEV] [RFC] Extension Prepend Files

2015-01-04 Thread reeze
. --- [1] https://github.com/reeze/php-ext-embed On 4 January 2015 at 19:52, Benjamin Eberlei wrote: > Hey everyone, > > I want to open discussion on my RFC to strengthen the ability of extensions > to provide functionality to developers in both C **and** PHP code. > > For this exte

Re: [PHP-DEV] [RFC] Add is_cacheable() stream-wrapper operation

2015-01-03 Thread reeze
+1 for this PR. On 4 January 2015 at 09:36, François Laupretre wrote: > Hi, > > I just wrote this RFC to propose a clean way for opcode caches to decide if > a given URI is cacheable or not : > > https://wiki.php.net/rfc/streams-is-cacheable > > Please comment. > > Regards > > François > > > > -

Re: [PHP-DEV] New function: spl_object_id() or spl_object_handle()

2014-11-27 Thread reeze
Won't `$obj1 === $obj2` work for you ? On 28 November 2014 at 09:13, Bostjan Skufca wrote: > Hello everyone, > > this is a proposal to add new function to PHP core: spl_object_id() > > > The story: > > Recently I was debugging some larger libraries and sorely missed a function > that

Re: [PHP-DEV] [RFC] GitHub Pull Requests Triage Team

2014-10-30 Thread reeze
Big +1 for me. This is good a idea to make contributors' work easier. On 31 October 2014 05:57, John Bafford wrote: > Hi, > > I would like to propose the creation of a team to triage the pull requests > on GitHub, to help ensure that the pull requests are handled in a timely > manner. I am also

[PHP-DEV] 回复: [PHP-DEV] Internal object orientation documentation available!

2013-06-12 Thread Reeze
ER r q -- Reeze Sent with sparrow 在 2013年6月12日星期三,13:05,Michael Wallner 写道: > On 10 June 2013 20:33, Nikita Popov wrote: > > Hi internals! > > > > We just published some rather extensive documentation on internal object > > orientation: > > &g

[PHP-DEV] 回复: [PHP-DEV] Re: [VOTE] Allow non-scalar keys in foreach

2013-03-06 Thread Reeze Xia
Hi Nikita, I got some test failure with the patch, one test failure and some memory leaks. see: https://gist.github.com/reeze/5101596 -- reeze | reeze.cn 已使用 Sparrow (http://www.sparrowmailapp.com/?sig) 在 2013年3月7日星期四,上午1:28,Dmitry Stogov 写道: > On Wed, Mar 6, 2013 at 9:16 PM, Nik

[PHP-DEV] 回复: [PHP-DEV] Current Status of O+ on Windows

2013-03-02 Thread Reeze Xia
+1 s, Switch to a new opcode cacher is much easier than update PHP, and ZO+ is already compatible with <5.5. we could use ZO+ as soon as possible. -- reeze | reeze.cn 已使用 Sparrow (http://www.sparrowmailapp.com/?sig) 在 2013年3月2日星期六,下午4:43,Ferenc Kovacs 写道: > On Sat, Mar 2, 2013 at 9

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

2012-08-03 Thread Reeze Xia
在 2012年8月4日星期六,上午6:40,Andrew Faulds 写道: > On 03/08/12 23:36, Etienne Kneuss wrote: > > On Mon, Jul 30, 2012 at 7:31 PM, Gustavo Lopes > (mailto:glo...@nebm.ist.utl.pt)> wrote: > > > https://wiki.php.net/rfc/incompat_ctx > > > > > > An RFC for deprecating and removing $this from incompatible c

[PHP-DEV] 回复: [PHP-DEV] Re: 回复: [PHP-DEV] [RFC] Proposal namespace importing with from syntax

2012-07-24 Thread Reeze Xia
Hi, 在 2012年7月25日星期三,下午1:27,Laruence 写道: > Hi: > > is there any really usage? I didn't see before. I don't think every Yes, eg: https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/EntityRepository.php#L24 it could be: from Doctrine\Common\Collections use ExpressionBuilder, Cri

[PHP-DEV] 回复: [PHP-DEV] [RFC] Proposal namespace importing with from syntax

2012-07-24 Thread Reeze Xia
Hi Stas, 在 2012年7月25日星期三,上午2:33,Stas Malyshev 写道: > Hi! > > > from GlobalNamespace\SubSpace\ThirdSace use Class1, Class2 as Alias2, > > ForthSpace\Class3 as Alias3; > > I'm not sure it's necessary. If you import a real lot of the classes > from the same namespace, just import the parent na

[PHP-DEV] 回复: [PHP-DEV] [RFC] Proposal namespace importing with from syntax

2012-07-24 Thread Reeze
Hi Andrew, 在 2012年7月24日星期二,下午11:39,Andrew Faulds 写道: > On 24/07/12 16:35, Reeze wrote: > > Hi, internals, > > I'm proposing a improvement to namespace importing. when using 'use' > > statement to import > > many classes, we have to duplicate many time

[PHP-DEV] [RFC] Proposal namespace importing with from syntax

2012-07-24 Thread Reeze
t. here is the example: The above code should be self-explained. More info could be found at the RFC page and the patch. RFC: https://wiki.php.net/rfc/namespace-importing-with-from PATCH : https://github.com/reeze/php-src/compare/rfc-from-use Any Opinion, suggestion, improvement will be m

[PHP-DEV] 回复: [PHP-DEV] Make try/catch brackets optinal

2012-07-19 Thread Reeze
Hi, 在 2012年7月19日星期四,下午6:45,Rune Kaagaard 写道: > +1 for the consistency of it. It's surprising that: > > if ($foo) > return $bar; > else > return 42; > > works and: > > try > maybe_dangerous(); > catch(Dynamite $e) > handle_error(); > > There is no condition after `try`, it's really har

[PHP-DEV] 回复: [PHP-DEV] installing from source on mac osx 10.7.3

2012-07-15 Thread Reeze
Hi, I guess /usr/local/bin is writable. then: which version of php and autoconf? it may set the EXEEXT=.dSYM if so /usr/local/bin/php may becomes /usr/local/bin/php.dSYM will you take a look at the generated Makefile is there any value of this variable "EXEEXT =" ?

Re: [PHP-DEV] Re: [PHP-QA] running tests in parallel?

2012-05-03 Thread Reeze
look forward your futhur work! make test takes really long time, with valgrind is almost unacceptable。 -- Reeze Sent from my iphone On 2012年5月3日Thursday at 19:42, Olivier Doucet wrote: > Hi, > > 2012/5/3 zoe slattery : > > Hi > > > > Some years ago (in 2009) St

[PHP-DEV] Re: Bug/Req:#61422顛 enble Type Hint autoloading

2012-05-01 Thread reeze
E_CATABLE_FATAL, loaded class will be useful, since it will be used later. if loaded success everyone is happy. On 1 May 2012 20:25, Laruence wrote: > On Tue, May 1, 2012 at 8:03 PM, reeze wrote: > > Hi internals: > > danko reported this bug#61422: Lack of autoload on type

[PHP-DEV] Bug/Req:#61422顛 enble Type Hint autoloading

2012-05-01 Thread reeze
an instance of AX, integer given。 a simple patch attached request for comment. Finally, What do you guys think about it? Thanks. Best, -- reeze | simpie.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] [PATCH][Discussion] Ensure property name a valid label and properly handle array2object conversion&Req for bugfix review.

2012-04-08 Thread reeze
ust make sure numeric keys works consist since php is so flexible. Any thoughts? BTW: I sent bugfix for bug#61347 ArrayIterator misrewind and gives misleading notice when manipulating empty/moved to end array https://github.com/php/php-src/pull/38 thanks @nikic & @cataphract's great suggest

[PHP-DEV] 回复: [PHP-DEV] resume after exception

2012-04-03 Thread reeze
If just for exception recovery how about implement ruby's retry ? http://www.tutorialspoint.com/ruby/ruby_loops.htm Ruby retry statement section. 在 2012年4月2日星期一,下午8:44,Rasmus Schultz 写道: > I was just reading about the new async/await keywords in C# 5.0, and while > this has no particular re

[PHP-DEV] 回复: [PHP-DEV] Re: bugs needs fix before 5.4.1

2012-03-31 Thread reeze
在 2012年3月31日星期六,下午4:35,Stas Malyshev 写道: > Hi! > > > If is set to false does it means the first parameter can't be string? > > It can. But it won't be seen as a class name, but rather as a string, > that is not an object that is an instance of a subclass of anything, so > it will return false.

[PHP-DEV] 回复: [PHP-DEV] Re: bugs needs fix before 5.4.1

2012-03-31 Thread reeze
Hi, From the NEWS file : + . Fixed bug #55475 (is_a() triggers autoloader, new optional 3rd argument to + is_a and is_subclass_of). (alan_k) The 3rd argument is add to let user choose autoload or not, but not a string or not. so maybe we can make it more clear. -- reeze 已使用 Sparrow (http

[PHP-DEV] 回复: [PHP-DEV] Re: bugs needs fix before 5.4.1

2012-03-31 Thread reeze
在 2012年3月31日星期六,下午3:31,Stas Malyshev 写道: > On 3/30/12 7:27 PM, Yasuo Ohgaki wrote: > > Hi Stas, > > > > Just FYI. > > Following bugs are needed to be fixed before 5.4.1, I think. > > > > https://bugs.php.net/bug.php?id=61526 > > Which is right, doc or code? > > Both. The parameter means that

Re: [PHP-DEV] Call non-static method staticly raise E_STRICT, but why call a static method instancely won't

2011-04-25 Thread reeze
On 2011年4月26日星期二 at 上午10:31, David Muir wrote: On 26/04/11 09:37, Ben Schmidt wrote: > > > Back in PHP4 it was the only way to "simulate" an static call, but > > > nowadays it really don't make sense at all. > > > > > > class Foo { > > > static function toString(Bar $bar) { > > > return 'Foo::to

[PHP-DEV] Call non-static method staticly raise E_STRICT, but why call a static method instancely won't

2011-04-23 Thread reeze
Hi, I am not sure it's the right place to discuss this. someday I found I call a static method _instancely_. the method is just a helper method when reviewing my code. I know I do the wrong thing, but PHP doesn't complain about it. then I do some tests like below: staticFunc(); // Just static n