Re: [PHP-DEV] Enable Zend Signals Handler By Default

2015-03-05 Thread Xinchen Hui
On Fri, Mar 6, 2015 at 6:31 AM, Pierre Joye wrote: > On Thu, Mar 5, 2015 at 5:27 AM, Xinchen Hui wrote: >> Hey internal: >> >> >> There is also a problem we have been suffering from for a quite >> long time, that is signal raised at OOM/Timeout when execution is in a >> critical area will lea

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Sean Coates
> If PHP has macro or userspace aliasing! > This is one possible solution for this. The engine has support for aliases. See http://php.net/manual/en/internals2.ze1.zendapi.php If I thought this “consistency” was very important (I do not, and I fully expect an RFC on this to fail if this thread

[PHP-DEV] 回复: [PHP-DEV] Enable Zend Signals Handler By Default

2015-03-05 Thread Wei Dai
在 2015年3月5日 星期四,下午9:27,Xinchen Hui 写道: Hi, > Hey internal: > > > There is also a problem we have been suffering from for a quite > long time, that is signal raised at OOM/Timeout when execution is in a > critical area will lead PHP crash or even more big troubles if it is > in shared memory

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Rowan Collins
On 5 March 2015 23:22:35 GMT, Arvids Godjuks wrote: >Why not take advantage of namespaces and do the new API, building it up >version by version (sure it can't be done in one go), so probably the >extensions gonna follow too. >That allows you to use as OO interface, so do the functions. Well, yes,

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Rowan Collins
On 5 March 2015 22:05:05 GMT, Yasuo Ohgaki wrote: >Hi Rowan, > >On Fri, Mar 6, 2015 at 5:41 AM, Rowan Collins >wrote: > >> Yasuo Ohgaki wrote on 05/03/2015 20:20: >> >>> Hi Arvids, >>> >>> On Thu, Mar 5, 2015 at 9:32 PM, Arvids Godjuks >>> > wrote: >>> >>> 201

Re: [PHP-DEV][RFC][DISCUSSION] Strict Argument Count

2015-03-05 Thread Marcio Almada
Hi, 2015-03-05 20:08 GMT-03:00 Yasuo Ohgaki : > Hi Marcio, > > On Fri, Mar 6, 2015 at 6:36 AM, Marcio Almada > wrote: > >> It would be nothing new or weird. It's just a simple compile time check. >> We already "inspect" code in many other situations while compiling and a >> lot of behaviors duri

Re: [PHP-DEV] Re: [VOTE] Remove deprecated functionality in PHP 7

2015-03-05 Thread Lester Caine
On 05/03/15 22:14, Jan Ehrhardt wrote: >>> BTW: Piwik heavily uses $$ even in >>> >> the latest releases, so it is not as old-style-coding as you might >>> >> think. >> > >> >Thanks for that Jan ... my own port of piwik is on the todo list here! > Grep '\$\$' tricked me a little bit: most of the $$

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Arvids Godjuks
2015-03-05 22:20 GMT+02:00 Yasuo Ohgaki : > Hi Arvids, > > On Thu, Mar 5, 2015 at 9:32 PM, Arvids Godjuks > wrote: > >> 2015-03-05 13:49 GMT+02:00 Pierre Joye : >> > >> > >> > I will say it again a last time, in my opinion only a clean API; >> > object-like or real object as long as performance i

Re: [PHP-DEV][RFC][DISCUSSION] Strict Argument Count

2015-03-05 Thread Yasuo Ohgaki
Hi Marcio, On Fri, Mar 6, 2015 at 6:36 AM, Marcio Almada wrote: > It would be nothing new or weird. It's just a simple compile time check. > We already "inspect" code in many other situations while compiling and a > lot of behaviors during execution already depend on compile time checks. I > don

Re: [PHP-DEV] Enable Zend Signals Handler By Default

2015-03-05 Thread Pierre Joye
On Thu, Mar 5, 2015 at 5:27 AM, Xinchen Hui wrote: > Hey internal: > > > There is also a problem we have been suffering from for a quite > long time, that is signal raised at OOM/Timeout when execution is in a > critical area will lead PHP crash or even more big troubles if it is > in shared m

[PHP-DEV] Re: How do I detect a script failure in an extension's PHP_RSHUTDOWN_FUNCTION callback?

2015-03-05 Thread Jan Ehrhardt
Richard Quadling in php.internals (Thu, 5 Mar 2015 21:02:52 +): >There is a bug report for the win32service pecl extension ( >https://bugs.php.net/bug.php?id=69170). Quote from your reply in the bug report: "Unfortunately, I'm not on a windows environment anymore and don't have a license for a

Re: [PHP-DEV] [RFC][VOTE] Improve array to string conversion

2015-03-05 Thread Pascal Martin, AFUP
Le 23/02/2015 17:06, François Laupretre a écrit : Starting the vote for https://wiki.php.net/rfc/array-to-string. Hi, We talked about this with other people at AFUP and a great majority of us agrees that the current behavior of array to strings conversions is not quite useful -- and, for sev

Re: [PHP-DEV] Re: [VOTE] Remove deprecated functionality in PHP 7

2015-03-05 Thread Jan Ehrhardt
Lester Caine in php.internals (Thu, 05 Mar 2015 21:46:15 +): >On 05/03/15 21:19, Jan Ehrhardt wrote: >> BTW: Piwik heavily uses $$ even in >> the latest releases, so it is not as old-style-coding as you might >> think. > >Thanks for that Jan ... my own port of piwik is on the todo list here! G

Re: [PHP-DEV] [VOTE] Remove PHP 4 Constructors

2015-03-05 Thread Pascal Martin, AFUP
Le 23/02/2015 05:39, Levi Morrison a écrit : I have moved the RFC for removing PHP 4 constructors[1] into voting phase. Hi, After discussing this RFC with other people at AFUP, we would be on the +1 side, especially with the approach that goes in two steps, targeting both PHP 7 and PHP 8.

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Yasuo Ohgaki
Hi Rowan, On Fri, Mar 6, 2015 at 5:41 AM, Rowan Collins wrote: > Yasuo Ohgaki wrote on 05/03/2015 20:20: > >> Hi Arvids, >> >> On Thu, Mar 5, 2015 at 9:32 PM, Arvids Godjuks > > wrote: >> >> 2015-03-05 13:49 GMT+02:00 Pierre Joye >

Re: [PHP-DEV] Re: [VOTE] Remove deprecated functionality in PHP 7

2015-03-05 Thread Lester Caine
On 05/03/15 21:19, Jan Ehrhardt wrote: > BTW: Piwik heavily uses $$ even in > the latest releases, so it is not as old-style-coding as you might > think. Thanks for that Jan ... my own port of piwik is on the todo list here! -- Lester Caine - G8HFL - Contact - http://

Re: [PHP-DEV][RFC][DISCUSSION] Strict Argument Count

2015-03-05 Thread Marcio Almada
Hi, 2015-03-04 21:51 GMT-03:00 Yasuo Ohgaki : > > I don't think we need to deprecate func_get_args(). We may have > > function f($a, ...) { > var_dump(func_get_args()); > } > > f(1,2,3); > ?> > > "...$a" packs arguments. Using "..." as variable parameter indication may > be allowed. > Strictl

Re: [PHP-DEV] Re: [VOTE] Remove deprecated functionality in PHP 7

2015-03-05 Thread Jan Ehrhardt
Pierre Joye in php.internals (Thu, 5 Mar 2015 12:36:32 -0800): >On Thu, Mar 5, 2015 at 12:29 PM, Adam Harvey wrote: >> I'm on the fence about making a release for ereg and mysql: it would >> help in terms of code availability, but at the same time I feel like >> it undermines our message of "no, r

[PHP-DEV] How do I detect a script failure in an extension's PHP_RSHUTDOWN_FUNCTION callback?

2015-03-05 Thread Richard Quadling
Hi. There is a bug report for the win32service pecl extension ( https://bugs.php.net/bug.php?id=69170). As a past contributor to this extension, I want to offer some help, even though I'm not on Windows any more (nor have access to a license). What I would like to provide is the ability to detec

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Rowan Collins
Yasuo Ohgaki wrote on 05/03/2015 20:20: Hi Arvids, On Thu, Mar 5, 2015 at 9:32 PM, Arvids Godjuks mailto:arvids.godj...@gmail.com>> wrote: 2015-03-05 13:49 GMT+02:00 Pierre Joye mailto:pierre@gmail.com>>: > > > I will say it again a last time, in my opinion only a clean AP

Re: [PHP-DEV] Re: [VOTE] Remove deprecated functionality in PHP 7

2015-03-05 Thread Pierre Joye
On Thu, Mar 5, 2015 at 12:29 PM, Adam Harvey wrote: > On 5 March 2015 at 12:21, Pierre Joye wrote: >> It would be good to do a pecl release for each of them, and mark the >> package as deprecated/overseeded by mysqli (I let you choose). Doing >> so will trigger a build there, cleaner. > > I'm on

Re: [PHP-DEV] Re: [VOTE] Remove deprecated functionality in PHP 7

2015-03-05 Thread Adam Harvey
On 5 March 2015 at 12:21, Pierre Joye wrote: > It would be good to do a pecl release for each of them, and mark the > package as deprecated/overseeded by mysqli (I let you choose). Doing > so will trigger a build there, cleaner. I'm on the fence about making a release for ereg and mysql: it would

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Yasuo Ohgaki
Hi Arvids, On Thu, Mar 5, 2015 at 9:32 PM, Arvids Godjuks wrote: > 2015-03-05 13:49 GMT+02:00 Pierre Joye : > > > > > > I will say it again a last time, in my opinion only a clean API; > > object-like or real object as long as performance is not affected is > > the only way I could see to actual

Re: [PHP-DEV] Re: [VOTE] Remove deprecated functionality in PHP 7

2015-03-05 Thread Pierre Joye
On Thu, Mar 5, 2015 at 9:56 AM, Adam Harvey wrote: > On 5 March 2015 at 05:39, Jan Ehrhardt wrote: >> I had already built a php_ereg.dll and a php_mysql.dll for PHP7, using >> the sources of two days ago. The config.w32 for ereg needs some changes, >> if you want to enable shared builds on Window

[PHP-DEV] Use behavior thoughts

2015-03-05 Thread Anthony Ferrara
All, Currently, use has a few error cases that are rather fragile. For example: namespace Biz { class Bar {}; } namespace Foo { use Biz\Bar; $a = new Bar; var_dump($a); } namespace Foo { class Bar {}; } http://3v4l.org/IPTiQ That works 100% of the time, on 5.3.0 -> present

Re: [PHP-DEV] Is OpCache enabled by default in php 5.5 and later or not?

2015-03-05 Thread Rowan Collins
j adams wrote on 05/03/2015 17:46: Thank you so much for the generous clarity. Personally, I wish this sort of information was clearly visible in the docs. However, I don't want to introduce unnecessary complications there. Should I mention this to the docs team? It might help eliminate some of

Re: [PHP-DEV] Re: [VOTE] Remove deprecated functionality in PHP 7

2015-03-05 Thread Adam Harvey
On 5 March 2015 at 05:39, Jan Ehrhardt wrote: > I had already built a php_ereg.dll and a php_mysql.dll for PHP7, using > the sources of two days ago. The config.w32 for ereg needs some changes, > if you want to enable shared builds on Windows: > > http://git.php.net/?p=pecl/text/ereg.git;a=blob;f=

Re: [PHP-DEV] Is OpCache enabled by default in php 5.5 and later or not?

2015-03-05 Thread j adams
Thank you so much for the generous clarity. Personally, I wish this sort of information was clearly visible in the docs. However, I don't want to introduce unnecessary complications there. Should I mention this to the docs team? It might help eliminate some of the speculative/incorrect information

Re: [PHP-DEV] Is OpCache enabled by default in php 5.5 and later or not?

2015-03-05 Thread Rowan Collins
j adams wrote on 05/03/2015 16:12: I don't know if this is a question for the documentation team or not, but figured I'd start here. There does not appear to be any definitive, clear, reliable information on PHP's op caching functionality in recent 5.* versions and this problem needs to be remedi

Re: [PHP-DEV] Is OpCache enabled by default in php 5.5 and later or not?

2015-03-05 Thread Rasmus Lerdorf
On 03/05/2015 08:12 AM, j adams wrote: > I don't know if this is a question for the documentation team or not, but > figured I'd start here. There does not appear to be any definitive, clear, > reliable information on PHP's op caching functionality in recent 5.* > versions and this problem needs to

[PHP-DEV] Is OpCache enabled by default in php 5.5 and later or not?

2015-03-05 Thread j adams
I don't know if this is a question for the documentation team or not, but figured I'd start here. There does not appear to be any definitive, clear, reliable information on PHP's op caching functionality in recent 5.* versions and this problem needs to be remedied. Question 1: Is OpCache enabled b

Re: [PHP-DEV] function signatures in XML

2015-03-05 Thread Rowan Collins
Robert Stoll wrote on 05/03/2015 13:44: Heya, Does PHP store somewhere meta-information of all internal functions (and operators) in a portable format such as XML? I would like to extract information such as - parameters including types - return type automatically. Preferably each overload of

[PHP-DEV] function signatures in XML

2015-03-05 Thread Robert Stoll
Heya, Does PHP store somewhere meta-information of all internal functions (and operators) in a portable format such as XML? I would like to extract information such as - parameters including types - return type automatically. Preferably each overload of a function but I guess that does not ex

Re: [PHP-DEV] [PR] DateTime::createFromImmutable() method

2015-03-05 Thread Dennis Birkholz
Hi Trevor, I had no look to the code as I am no C or internals guru. I just wanted to add that I would prefer a generic DateTimeInterface::createFromInstance(DateTimeInterface $copyFrom) method, so you do not need to distinguish between DateTime and DateTimeImmutable when creating a new instance.

Re: [PHP-DEV] Re: [VOTE] Remove deprecated functionality in PHP 7

2015-03-05 Thread Jan Ehrhardt
Adam Harvey in php.internals (Wed, 4 Mar 2015 17:21:54 -0800): >On 16 January 2015 at 09:16, Nikita Popov wrote: >> I'll land the minor removals sometime soon; the unbundling of ext/ereg and >> ext/mysql should probably be done by someone else who's more into the PECL >> business. > >They gone. >

[PHP-DEV] Enable Zend Signals Handler By Default

2015-03-05 Thread Xinchen Hui
Hey internal: There is also a problem we have been suffering from for a quite long time, that is signal raised at OOM/Timeout when execution is in a critical area will lead PHP crash or even more big troubles if it is in shared memory. You may still remember we disabled zend signal hand

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Arvids Godjuks
2015-03-05 13:49 GMT+02:00 Pierre Joye : > > > I will say it again a last time, in my opinion only a clean API; > object-like or real object as long as performance is not affected is > the only way I could see to actually solve this problem. > > Changing the names, argument order (pointless once we

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Rowan Collins
Pierre Joye wrote on 05/03/2015 11:49: On Thu, Mar 5, 2015 at 3:21 AM, Rowan Collins wrote: Yasuo Ohgaki wrote on 05/03/2015 09:24: I would love to have new OO APIs for variables. I also like to write procedural code for simple scripts. Therefore, even if we have new OO APIs, I would like to i

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Pierre Joye
On Thu, Mar 5, 2015 at 3:21 AM, Rowan Collins wrote: > Yasuo Ohgaki wrote on 05/03/2015 09:24: >> >> I would love to have new OO APIs for variables. I also like to write >> procedural >> code for simple scripts. Therefore, even if we have new OO APIs, I would >> like to >> improve/maintain procedu

Re: [PHP-DEV] Re: [RFC] [DISCUSSION] Consistent Function Names

2015-03-05 Thread Lester Caine
On 05/03/15 09:40, Rowan Collins wrote: >> > >> >Good point! >> >I'll update documents so that main function is prefered name/function >> >to be >> >used. > This would be fine if all the users read the manual, and only the manual. > What about the thousands of books, tutorials, blog posts, Stack O

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Rowan Collins
Yasuo Ohgaki wrote on 05/03/2015 09:24: I would love to have new OO APIs for variables. I also like to write procedural code for simple scripts. Therefore, even if we have new OO APIs, I would like to improve/maintain procedural functions and make them not legacy functions. I don't see scalar

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Yasuo Ohgaki
Hi Christian, On Thu, Mar 5, 2015 at 7:15 PM, Christian Stoller wrote: > From: yohg...@gmail.com [mailto:yohg...@gmail.com] On Behalf Of Yasuo > Ohgaki, Sent: Thursday, March 05, 2015 9:45 AM > > > On Thu, Mar 5, 2015 at 4:34 PM, Christian Stoller > wrote: > > From: yohg...@gmail.com [mailto:yo

Re: [PHP-DEV] Re: [RFC] [DISCUSSION] Consistent Function Names

2015-03-05 Thread Jordi Boggiano
On 05/03/2015 08:07, Yasuo Ohgaki wrote: So array functions are subject to be changed. bool in_array ( mixed $needle , array $haystack [, bool $strict ] ) Renamed to array_in() and fix order. mixed array_search ( mixed $needle , array $haystack [, bool $strict ] ) Renamed to array_find(

RE: [PHP-DEV] Consistent function names

2015-03-05 Thread Christian Stoller
From: yohg...@gmail.com [mailto:yohg...@gmail.com] On Behalf Of Yasuo Ohgaki, Sent: Thursday, March 05, 2015 9:45 AM > On Thu, Mar 5, 2015 at 4:34 PM, Christian Stoller wrote: > From: yohg...@gmail.com [mailto:yohg...@gmail.com] On Behalf Of Yasuo Ohgaki, > Sent: Thursday, March 05, 2015 > 7:21

Re: [PHP-DEV] Re: [RFC] [DISCUSSION] Consistent Function Names

2015-03-05 Thread Rowan Collins
On 5 March 2015 08:50:12 GMT, Yasuo Ohgaki wrote: >Hi Niklas, > >On Thu, Mar 5, 2015 at 5:29 PM, Niklas Keller wrote: > >> If we introduce those new aliases, it should be clearly stated in the >docs >> which function should be used, maybe we can remove the old one in the >far >> future then. But

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Grégory Planchat
Le 03/03/2015 00:02, Larry Garfield a écrit : On 3/2/15 4:50 PM, Rowan Collins wrote: On 02/03/2015 22:36, Yasuo Ohgaki wrote: I like scalar objects, but it does not resolve that PHP has non standard function names. It does not change old names, therefore it's impossible to resolve issue. This

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Yasuo Ohgaki
Hi Rowan, On Thu, Mar 5, 2015 at 5:51 PM, Rowan Collins wrote: > On 5 March 2015 03:59:00 GMT, Yasuo Ohgaki wrote: > >Hi Rowan, > > > >On Thu, Mar 5, 2015 at 10:16 AM, Rowan Collins > > > >wrote: > > > >> On 4 March 2015 21:27:53 GMT, Yasuo Ohgaki > >wrote: > >> >We cannot remove all issue at

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Rowan Collins
On 5 March 2015 03:59:00 GMT, Yasuo Ohgaki wrote: >Hi Rowan, > >On Thu, Mar 5, 2015 at 10:16 AM, Rowan Collins > >wrote: > >> On 4 March 2015 21:27:53 GMT, Yasuo Ohgaki >wrote: >> >We cannot remove all issue at once. We are better to adopt >incremental >> >improvement, aren't we? >> >> I think th

Re: [PHP-DEV] Re: [RFC] [DISCUSSION] Consistent Function Names

2015-03-05 Thread Yasuo Ohgaki
Hi Niklas, On Thu, Mar 5, 2015 at 5:29 PM, Niklas Keller wrote: > If we introduce those new aliases, it should be clearly stated in the docs > which function should be used, maybe we can remove the old one in the far > future then. But the more important point is, that it's not that confusing >

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Yasuo Ohgaki
Hi Christian, On Thu, Mar 5, 2015 at 4:34 PM, Christian Stoller wrote: > From: yohg...@gmail.com [mailto:yohg...@gmail.com] On Behalf Of Yasuo > Ohgaki, Sent: Thursday, March 05, 2015 7:21 AM > > > For example, ctype extension has "ctype_" prefix. It replaces > > "is" to "ctype_". > > we may hav

Re: [PHP-DEV] Consistent function names

2015-03-05 Thread Yasuo Ohgaki
Hi Rasmus, On Thu, Mar 5, 2015 at 4:57 PM, Rasmus Lerdorf wrote: > On 03/04/2015 10:21 PM, Yasuo Ohgaki wrote: > > The same could be done for new names. > > Manual pages for localtime()/mktime()/etc would look a lot nicer. > > I hope there will be more favored developers with the RFC. Since I'm

Re: [PHP-DEV] Re: [RFC] [DISCUSSION] Consistent Function Names

2015-03-05 Thread Niklas Keller
If we introduce those new aliases, it should be clearly stated in the docs which function should be used, maybe we can remove the old one in the far future then. But the more important point is, that it's not that confusing to users. Which one should I use? Why's there another one? We already have

Re: [PHP-DEV] Re: [RFC] [DISCUSSION] Consistent Function Names

2015-03-05 Thread Yasuo Ohgaki
Hi Benoit, On Wed, Mar 4, 2015 at 2:34 AM, Benoit Schildknecht wrote: > I think the new functions must have consistent parameters order too. I > think it is about the right time, so we'll have a cleaner and more logical > language. > > ATM, it's a real headache, we constantly have to read the do