Re: [PHP-DEV] PHP 7 installation issues.

2015-01-29 Thread Ferenc Kovacs
On Thu, Jan 29, 2015 at 4:42 PM, Levi Morrison le...@php.net wrote: About the man page: what files do you have in php/man/man1 ? php.1 php-cgi.1 php-config.1 phpize.1 ^ Those four. Normally there are two more (phar.1 and phar.phar.1) from looking my 5.6.3 install. Aside from

[PHP-DEV] Re: Session: PS(mod)-create() or PS(mod)-read() parameter?

2015-01-29 Thread Yasuo Ohgaki
Hi all, On Thu, Jan 29, 2015 at 4:00 PM, Yasuo Ohgaki yohg...@ohgaki.net wrote: I would like to improve session save handler module API for PHP7. When new session data is created, some save handlers need to create new session data explicitly. e.g. RDBMS based save handler. New session

Re: [PHP-DEV] Session: PS(mod)-create() or PS(mod)-read() parameter?

2015-01-29 Thread Remi Collet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 29/01/2015 08:00, Yasuo Ohgaki a écrit : If there is no comment, I'll add new parameter since it's simpler. Changing a function prototype is very hard to detect at buildtime, especially when playing with pointer. A new API seems really cleaner.

Re: [PHP-DEV] [RFC] [VOTE] pecl_http

2015-01-29 Thread Andrey Andreev
Hi, On Thu, Jan 29, 2015 at 9:48 AM, Matteo Beccati p...@beccati.com wrote: Hi Andrey, On 28/01/2015 23:50, Andrey Andreev wrote: You're voting no because the FIG can't agree yet? They've been discussing this for *at least* an year and iirc the first PSR-7 coordinator gave up on it because

Re: [PHP-DEV] php7dev Vagrant box

2015-01-29 Thread Jan Schneider
Zitat von Rasmus Lerdorf ras...@lerdorf.com: As a follow-up to my PHP7 Homework post last week, here is a bit of spoon-feeding for all you lurkers on this list. https://atlas.hashicorp.com/rasmus/boxes/php7dev The description there should be fairly self-explanatory. If you have a computer

Re: [PHP-DEV] PHP 7 installation issues.

2015-01-29 Thread Florian Anderiasch
On 01/29/2015 03:49 AM, Levi Morrison wrote: When doing `make install` with a prefix of `/apps/php/7.0.0-dev` I get: Installing shared extensions: /apps/php/7.0.0-dev/lib/php/extensions/no-debug-non-zts-20141001/ Installing PHP CLI binary:/apps/php/7.0.0-dev/bin/ Installing PHP CLI

Re: [PHP-DEV] Session: PS(mod)-create() or PS(mod)-read() parameter?

2015-01-29 Thread Yasuo Ohgaki
Hi Remi, On Thu, Jan 29, 2015 at 5:17 PM, Remi Collet r...@fedoraproject.org wrote: If there is no comment, I'll add new parameter since it's simpler. Changing a function prototype is very hard to detect at buildtime, especially when playing with pointer. A new API seems really cleaner.

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

2015-01-29 Thread Yasuo Ohgaki
Hi Thomas, On Thu, Jan 29, 2015 at 4:55 PM, Thomas Bley ma...@thomasbley.de wrote: I think you mean: function myErrorHandler( int $errno , string $errstr [, string $errfile [, int $errline [, array $errcontext [, string $extra_errstr ) Yes. We have these empty-call-filled-on-return

Re: [PHP-DEV] php7dev Vagrant box

2015-01-29 Thread Ferenc Kovacs
On Thu, Jan 29, 2015 at 9:57 AM, Jan Schneider j...@horde.org wrote: Zitat von Rasmus Lerdorf ras...@lerdorf.com: As a follow-up to my PHP7 Homework post last week, here is a bit of spoon-feeding for all you lurkers on this list. https://atlas.hashicorp.com/rasmus/boxes/php7dev The

Re: [PHP-DEV] [RFC] [DISCUSSION] pecl_http

2015-01-29 Thread Yasuo Ohgaki
Hi Mike, Awesome work! On Thu, Jan 29, 2015 at 8:14 PM, Michael Wallner m...@php.net wrote: I’ve rewritten the RFC for pecl_http and hopefully addressed most of the things mentioned previously. I you still find anything lacking, please let me know, so I can expand the RFC accordingly.

Re: [PHP-DEV] [RFC] [DISCUSSION] pecl_http

2015-01-29 Thread Andrea Faulds
Hi Mike, On 29 Jan 2015, at 11:14, Michael Wallner m...@php.net wrote: I’ve rewritten the RFC for pecl_http and hopefully addressed most of the things mentioned previously. I you still find anything lacking, please let me know, so I can expand the RFC accordingly. The RFC is an

Re: [PHP-DEV] [RFC] [VOTE] pecl_http

2015-01-29 Thread Andrey Andreev
Hi, On Thu, Jan 29, 2015 at 12:52 PM, Matteo Beccati p...@beccati.com wrote: Hi Andrey, On 29/01/2015 10:41, Andrey Andreev wrote: It's not about whether we like the FIG's direction or what PSR stands for (which doesn't make sense btw) - that is indeed OT. My message was different: the

Re: [PHP-DEV] [RFC] [VOTE] pecl_http

2015-01-29 Thread Matteo Beccati
Hi Andrey, On 29/01/2015 10:41, Andrey Andreev wrote: It's not about whether we like the FIG's direction or what PSR stands for (which doesn't make sense btw) - that is indeed OT. My message was different: the PHP RFC process can't get blocked because of a third-party group, especially if your

[PHP-DEV] [RFC] [DISCUSSION] pecl_http

2015-01-29 Thread Michael Wallner
Hi! I’ve rewritten the RFC for pecl_http and hopefully addressed most of the things mentioned previously. I you still find anything lacking, please let me know, so I can expand the RFC accordingly. And of course, everything else is up for discussion. Thanks, Mike -- PHP Internals - PHP

Re: [PHP-DEV] [RFC] [VOTE] pecl_http

2015-01-29 Thread Martin Keckeis
2015-01-29 14:07 GMT+01:00 Pavel Kouřil pajou...@gmail.com: On Wed, Jan 28, 2015 at 1:17 PM, Michael Wallner m...@php.net wrote: Hi, Discussion has been very low on this topic since it was proposed on August 19th, so I just opened the vote on the RFC whether to add pecl_http to the

Re: [PHP-DEV] [RFC] [DISCUSSION] pecl_http

2015-01-29 Thread Michael Wallner
On 29/01/15 12:32, Yasuo Ohgaki wrote: Hi Mike, Awesome work! On Thu, Jan 29, 2015 at 8:14 PM, Michael Wallner m...@php.net mailto:m...@php.net wrote: I’ve rewritten the RFC for pecl_http and hopefully addressed most of the things mentioned previously. I you still find

Re: [PHP-DEV] [RFC] [DISCUSSION] pecl_http

2015-01-29 Thread Crypto Compress
* Why should we have our own HTTP API and not follow PSR-7? possible points: - PHP-FIG propose no implementations; pecl_http does - PHP-FIG focus on frameworks; pecl_http in core is useable without dependencies by every simple script - PSR-7 is a moving target; pecl_http exists for ten

Re: [PHP-DEV] [RFC] [DISCUSSION] pecl_http

2015-01-29 Thread Andrea Faulds
On 29 Jan 2015, at 12:18, Crypto Compress cryptocompr...@googlemail.com wrote: * Why should we have our own HTTP API and not follow PSR-7? possible points: - PHP-FIG propose no implementations; pecl_http does - native implementations should be faster I don’t see how that’s relevant:

Re: [PHP-DEV] php7dev Vagrant box

2015-01-29 Thread Jan Schneider
Zitat von Ferenc Kovacs tyr...@gmail.com: On Thu, Jan 29, 2015 at 11:03 AM, Jan Schneider j...@horde.org wrote: _Zitat von Ferenc Kovacs tyr...@gmail.com:_ _On Thu, Jan 29, 2015 at 9:57 AM, Jan Schneider j...@horde.org wrote:_ _Zitat von Rasmus Lerdorf ras...@lerdorf.com:_ _As a

Re: [PHP-DEV] [RFC] [DISCUSSION] pecl_http

2015-01-29 Thread Lester Caine
On 29/01/15 11:40, Andrea Faulds wrote: * Why do we need pecl/http? * Why should pecl/http be merged into PHP core? * Why should pecl/http be enabled by default? * Why should we have our own HTTP API and not follow PSR-7? * What does it offer over PHP’s existing HTTP capabilities? * Why

Re: [PHP-DEV] php7dev Vagrant box

2015-01-29 Thread Ferenc Kovacs
On Thu, Jan 29, 2015 at 11:03 AM, Jan Schneider j...@horde.org wrote: Zitat von Ferenc Kovacs tyr...@gmail.com: On Thu, Jan 29, 2015 at 9:57 AM, Jan Schneider j...@horde.org wrote: Zitat von Rasmus Lerdorf ras...@lerdorf.com: As a follow-up to my PHP7 Homework post last week, here is

Re: [PHP-DEV] [RFC] [VOTE] pecl_http

2015-01-29 Thread Pavel Kouřil
On Wed, Jan 28, 2015 at 1:17 PM, Michael Wallner m...@php.net wrote: Hi, Discussion has been very low on this topic since it was proposed on August 19th, so I just opened the vote on the RFC whether to add pecl_http to the core. The vote will be open until about 12:00 UTC on Friday, February

Re: [PHP-DEV] PHP 7 installation issues.

2015-01-29 Thread Ferenc Kovacs
On Thu, Jan 29, 2015 at 3:49 AM, Levi Morrison le...@php.net wrote: When doing `make install` with a prefix of `/apps/php/7.0.0-dev` I get: Installing shared extensions: /apps/php/7.0.0-dev/lib/php/extensions/no-debug-non-zts-20141001/ Installing PHP CLI binary:

Re: [PHP-DEV] [RFC] [DISCUSSION] pecl_http

2015-01-29 Thread Larry Garfield
On 1/29/15 6:40 AM, Andrea Faulds wrote: On 29 Jan 2015, at 12:18, Crypto Compress cryptocompr...@googlemail.com wrote: * Why should we have our own HTTP API and not follow PSR-7? possible points: - PHP-FIG propose no implementations; pecl_http does - native implementations should be

Re: [PHP-DEV] PHP 7 installation issues.

2015-01-29 Thread Levi Morrison
About the man page: what files do you have in php/man/man1 ? php.1 php-cgi.1 php-config.1 phpize.1 ^ Those four. Normally there are two more (phar.1 and phar.phar.1) from looking my 5.6.3 install. Aside from that I'm not sure what else could be different. I'm not very familiar with

Re: [PHP-DEV] Improvements to for-each implementation

2015-01-29 Thread Dmitry Stogov
Hi, I've solved most of the reported problems and started working on RFC. Nikta, please take a look into: https://wiki.php.net/rfc/php7_foreach https://github.com/php/php-src/pull/1034 and especially commit 15a23b1 Only iteration by value over plain objects is not completely consistent now.

[PHP-DEV] Re: [RFC] [DISCUSSION] pecl_http

2015-01-29 Thread Michael Wallner
On 29 01 2015, at 12:14, Michael Wallner m...@php.net wrote: Hi! I’ve rewritten the RFC for pecl_http and hopefully addressed most of the things mentioned previously. I you still find anything lacking, please let me know, so I can expand the RFC accordingly. And of course,

Re: [PHP-DEV] Use of {} with member.

2015-01-29 Thread Andrey Andreev
Hi, On Thu, Jan 29, 2015 at 11:32 PM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi all, I came across with bug #68947 https://bugs.php.net/bug.php?id=68947 and realized small inconsistency. http://3v4l.org/ldZKl $obj-${array[$key]}; // Syntax error $obj-{$array[$key]}; // Works

Re: [PHP-DEV] Use of {} with member.

2015-01-29 Thread Yasuo Ohgaki
Hi Andrey, On Fri, Jan 30, 2015 at 6:43 AM, Andrey Andreev n...@devilix.net wrote: Is somebody actually recommending the latter form? I'm surprised that it even works ... that should be a syntax error IMO. Do you mean echo ${array[$key]}; // Works should be errror? This form is common in

Re: [PHP-DEV] [RFC] [DISCUSSION] pecl_http

2015-01-29 Thread Yasuo Ohgaki
Hi all, On Thu, Jan 29, 2015 at 9:18 PM, Crypto Compress cryptocompr...@googlemail.com wrote: possible points: - PHP-FIG propose no implementations; pecl_http does - PHP-FIG focus on frameworks; pecl_http in core is useable without dependencies by every simple script - PSR-7 is a moving

[PHP-DEV] Use of {} with member.

2015-01-29 Thread Yasuo Ohgaki
Hi all, I came across with bug #68947 https://bugs.php.net/bug.php?id=68947 and realized small inconsistency. http://3v4l.org/ldZKl $obj-${array[$key]}; // Syntax error $obj-{$array[$key]}; // Works $obj-${key}; // E_NOTICE. Does not work $obj-{$key}; // Works echo ${array[$key]}; // Works

Re: [PHP-DEV] Use of {} with member.

2015-01-29 Thread Andrea Faulds
Hi Yasuo, On 29 Jan 2015, at 22:14, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Andrey, On Fri, Jan 30, 2015 at 6:43 AM, Andrey Andreev n...@devilix.net wrote: Is somebody actually recommending the latter form? I'm surprised that it even works ... that should be a syntax error IMO.

Re: [PHP-DEV] Use of {} with member.

2015-01-29 Thread Yasuo Ohgaki
Hi all, On Fri, Jan 30, 2015 at 8:51 AM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 01/29/2015 01:32 PM, Yasuo Ohgaki wrote: Hi all, I came across with bug #68947 https://bugs.php.net/bug.php?id=68947 and realized small inconsistency. http://3v4l.org/ldZKl $obj-${array[$key]};

Re: [PHP-DEV] Use of {} with member.

2015-01-29 Thread Yasuo Ohgaki
Hi Andrea, On Fri, Jan 30, 2015 at 7:17 AM, Andrea Faulds a...@ajf.me wrote: I would expect that anything within ${} works the same as it does outside it. Having $obj-${array[$key]} do something different to $key = array[$key], $obj-${$key} would make no sense to me. Good point! I forgot

Re: [PHP-DEV] Use of {} with member.

2015-01-29 Thread Rasmus Lerdorf
On 01/29/2015 01:32 PM, Yasuo Ohgaki wrote: Hi all, I came across with bug #68947 https://bugs.php.net/bug.php?id=68947 and realized small inconsistency. http://3v4l.org/ldZKl $obj-${array[$key]}; // Syntax error $obj-{$array[$key]}; // Works $obj-${key}; // E_NOTICE. Does not work

Re: [PHP-DEV] Use caller keyword, to access object caller.

2015-01-29 Thread Juan Basso
Usually it is solved sending the $this instance to class C constructor and C object storing it in some attribute, solving the problem. I don't think a new keyword would help. Juan Basso On Thu, Jan 29, 2015 at 9:53 PM, S.A.N ua.san.a...@gmail.com wrote: The reason for creating circular

Re: [PHP-DEV] Use caller keyword, to access object caller.

2015-01-29 Thread S.A.N
I will clarify the benefits of the keyword. Single instance of the class can reused in different contexts calls. ?php class A { public $object; } class B { public $object; } class C { public function getCaller() { return caller::class; } } $a = new A; $b = new B; $c =

[PHP-DEV] Use caller keyword, to access object caller.

2015-01-29 Thread S.A.N
The reason for creating circular references, usually due to the need to bind objects. But this relationship can often be obtained from the context of the call. It will be very convenient to have a keyword that will return reference to an object, which caused this object. Sorry for my English,

Re: [PHP-DEV] Use caller keyword, to access object caller.

2015-01-29 Thread S.A.N
Yes. But this creates a static link that will not be constantly changing context to the calls, the keyword will give a dynamic abstract communication. 2015-01-30 5:50 GMT+02:00 Juan Basso jrba...@gmail.com: Usually it is solved sending the $this instance to class C constructor and C object

[PHP-DEV] Is it a good idea to have a strict mode?

2015-01-29 Thread César Rodas
Hi! I'm wondering if it would be a good idea to have a `strict` mode in PHP. Many language have them and it is a good idea. I think it should be a bit different in PHP, it should encourage the following things: - Avoid deprecated things, it should throw an exception. - Avoid explicit

Re: [PHP-DEV] Is it a good idea to have a strict mode?

2015-01-29 Thread Yasuo Ohgaki
Hi Cesar, On Fri, Jan 30, 2015 at 2:16 PM, César Rodas ce...@rodas.me wrote: I'm wondering if it would be a good idea to have a `strict` mode in PHP. Many language have them and it is a good idea. I think it should be a bit different in PHP, it should encourage the following things: -

[PHP-DEV] Re: [RFC] [DISCUSSION] pecl_http

2015-01-29 Thread Daniel Lowrey
On Thu, Jan 29, 2015 at 8:14 PM, Michael Wallner m...@php.net wrote: I’ve rewritten the RFC for pecl_http and hopefully addressed most of the things mentioned previously. I you still find anything lacking, please let me know, so I can expand the RFC accordingly. And of course, everything

Re: [PHP-DEV] Use caller keyword, to access object caller.

2015-01-29 Thread Larry Garfield
On 01/29/2015 10:30 PM, S.A.N wrote: I will clarify the benefits of the keyword. Single instance of the class can reused in different contexts calls. ?php class A { public $object; } class B { public $object; } class C { public function getCaller() { return

RE: [PHP-DEV] Use caller keyword, to access object caller.

2015-01-29 Thread François Laupretre
De : Larry Garfield [mailto:la...@garfieldtech.com] Having an object that behaves differently depending on an implicit relationship with where it happened to be called from is full of all kinds of impossible to debug magic. I don't even know how you'd unit test it. I can think of no use

Re: [PHP-DEV] [RFC] [DISCUSSION] pecl_http

2015-01-29 Thread Michael Wallner
Hi Daniel! On 30 01 2015, at 07:28, Daniel Lowrey rdlow...@php.net wrote: Hi Mike :) I'd like to chime in on the discussion ... 1. There is a lot of *really* useful functionality in pecl/http that IMO should be bundled with the standard PHP distribution. This, to me, means things

[PHP-DEV] [RFC] Fix foreach behavior

2015-01-29 Thread Dmitry Stogov
Hi, I'd like to start discussion about fixing inconsistent foreach statement behavior. The implementation is almost done. It not only fixes inconsistencies in a defined by RFC way but also improves performance in most usual cases, because now foreach by value over array doesn't require array

Re: [PHP-DEV] Use of {} with member.

2015-01-29 Thread Andrey Andreev
Hi, On Fri, Jan 30, 2015 at 12:49 AM, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi Andrea, On Fri, Jan 30, 2015 at 7:17 AM, Andrea Faulds a...@ajf.me wrote: I would expect that anything within ${} works the same as it does outside it. Having $obj-${array[$key]} do something different to $key =