Re: [PHP-DEV] [VOTE] jsond

2015-02-01 Thread Pascal MARTIN, AFUP
On 25/01/2015 18:29, Jakub Zelenka wrote: Voting on jsond is now open: https://wiki.php.net/rfc/jsond Hi, After talking about this RFC with other people at AFUP, we are +1. Basically, fixing licensing problems is important in itself. This should also help having the same official JSON

Re: [PHP-DEV] [RFC] Immutable variables and objects

2015-02-01 Thread Crypto Compress
The with*() methods in PSR-7 are documented to return a new instance, not modify the existing instance. Yes, there's no way in PHP itself to force that syntactically, which is why documentation exists. :-) Also, in the benchmarks we've run the performance cost of all those new objects is

Re: [PHP-DEV] [RFC] Immutable variables and objects

2015-02-01 Thread Lester Caine
On 01/02/15 09:38, Larry Garfield wrote: (Someone feel free to declare this thread off topic now, as we're basically just rehashing discussions had weeks ago on the FIG list.) Just as HHVM is not PHP neither is FIG ... so any discussion on ether list is not relevant here since many people will

Re: [PHP-DEV] [RFC] Immutable variables and objects

2015-02-01 Thread Larry Garfield
On 02/01/2015 02:55 AM, Crypto Compress wrote: The with*() methods in PSR-7 are documented to return a new instance, not modify the existing instance. Yes, there's no way in PHP itself to force that syntactically, which is why documentation exists. :-) Also, in the benchmarks we've run the

Re: [PHP-DEV] [RFC] Immutable variables and objects

2015-02-01 Thread Matteo Beccati
Hi Larry, Il 01/02/15 10:38, Larry Garfield ha scritto: On 02/01/2015 02:55 AM, Crypto Compress wrote: - If the old object is not thrown away, then memory consumption is doubled and the fast argument is wrong. (Performance, of cloning an object without copying values and of some method calls,

Re: [PHP-DEV] [RFC] Fix foreach behavior

2015-02-01 Thread Lester Caine
On 01/02/15 03:39, Dmitry Stogov wrote: I also thought about similar approach for object by value case. I think, first we should accept the proposed in thic RFC behavior. It's consistent, and more comatible with PHP5. Later, if we decide to merge zend_array with HashTable we may try to change

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

2015-02-01 Thread Patrick Schaaf
Am 01.02.2015 01:15 schrieb S.A.N ua.san.a...@gmail.com: $holder-object-call($holder); The way I solve this in the very few places (*) where it makes sense, is to use __call in the holder class to implement forwarding methods that pass on the holder object reference. The member property is NOT

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

2015-02-01 Thread Tony Marston
S.A.N wrote in message news:CALW=WEDFmUXap7Bx=chhx5vyhcoi1kbahgdkjif2adlx6yt...@mail.gmail.com... 2015-02-01 1:52 GMT+02:00 Stanislav Malyshev smalys...@gmail.com: Hi! The reason for creating circular references, usually due to the need to bind objects. But this relationship can often be

Re: [PHP-DEV] Re: OpenSSL ext. improvements for authenticated cipher modes.

2015-02-01 Thread Daniel Lowrey
On Sun, Feb 1, 2015 at 1:07 PM, Jakub Zelenka bu...@php.net wrote: Hey, On Sun, Feb 1, 2015 at 5:49 PM, Daniel Lowrey rdlow...@php.net wrote: - openssl_decrypt() now returns mixed ... if $options['get_tag'] == true then return [$decryptedString, $tag], otherwise return $decrypted string

[PHP-DEV] Re: OpenSSL ext. improvements for authenticated cipher modes.

2015-02-01 Thread Daniel Lowrey
Hi list, A couple of bug reports have highlighted the fact that our openssl_encrypt and openssl_decrupt functions have no way of getting or setting tags required for authenticated cipher modes (i.e. GCM, CCM, OCB (not sure if this is available in OpenSSL)).

Re: [PHP-DEV] OpenSSL ext. improvements for authenticated cipher modes.

2015-02-01 Thread Jakub Zelenka
Hey On Sat, Jan 31, 2015 at 4:21 PM, Leigh lei...@gmail.com wrote: On 31 January 2015 at 16:13, Jason Gerfen jason.ger...@gmail.com wrote: On Sat, Jan 31, 2015 at 8:53 AM, Leigh lei...@gmail.com wrote: At the very basic end of the spectrum, we could have openssl_get_tag and

Re: [PHP-DEV] [RFC] Immutable variables and objects

2015-02-01 Thread Rowan Collins
On 01/02/2015 01:01, Andrea Faulds wrote: Given that PHP is dynamic, not compiled, and function calls can have side effects, though, this would be difficult to enforce. You’d need to check that all calls made within the function do not have any side effects on that value… I’m not sure how

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

2015-02-01 Thread Rowan Collins
On 31/01/2015 23:42, S.A.N wrote: Yes, you're right, in PHP you can solve this problem by other methods, I know... But the problem is that PHP is no nice and convenient for solving this problem. So I suggested to add new keyword, not to do manually bindTo($this) for each methods. Have a

[PHP-DEV] PHP 7: Odd behavior with exp/soap

2015-02-01 Thread Martin Jansen
Currently I'm seeing some odd behavior with PHP 7 and SoapClient embedded deep into a Symfony2 application. That same code works with 5.x. Unfortunately I cannot yet reproduce the issue with a short script. Basically it boils down to get_function in ext/soap/soap.c returning NULL because

[PHP-DEV] src karma request

2015-02-01 Thread Jakub Zelenka
Hello, I'd like to request src karma to merge recently accepted jsond to master and further maintain json extension and committing perf improvements into it. In addition I'd like to look to few other things (bug fixes, improvements) in the ext dir. If someone could grant it to me, that would be

Re: [PHP-DEV] PHP 7: Odd behavior with exp/soap

2015-02-01 Thread Martin Jansen
On 01.02.15 17:27, Martin Jansen wrote: Currently I'm seeing some odd behavior with PHP 7 and SoapClient embedded deep into a Symfony2 application. That same code works with 5.x. Unfortunately I cannot yet reproduce the issue with a short script. Please ignore that one; I ran into the problem

Re: [PHP-DEV] Re: OpenSSL ext. improvements for authenticated cipher modes.

2015-02-01 Thread Jakub Zelenka
Hey, On Sun, Feb 1, 2015 at 5:49 PM, Daniel Lowrey rdlow...@php.net wrote: - openssl_decrypt() now returns mixed ... if $options['get_tag'] == true then return [$decryptedString, $tag], otherwise return $decrypted string as before to preserve BC. - the encrypt function could use

Re: [PHP-DEV] [RFC] Immutable variables and objects

2015-02-01 Thread Rowan Collins
On 01/02/2015 01:06, Andrea Faulds wrote: the intermediate objects are useless and nobody needs 5 new objects when you do it. Am I missing something here? I assume the reason for doing this is so you can’t ever modify the object from a distance, you must always create a new one to avoid

[PHP-DEV] Re: [VOTE] jsond

2015-02-01 Thread Jakub Zelenka
On Sun, Jan 25, 2015 at 5:29 PM, Jakub Zelenka bu...@php.net wrote: Hi All! Voting on jsond is now open: https://wiki.php.net/rfc/jsond It's a simple Yes/No vote whether jsond should replace the current json extension in PHP 7. The RFC has been accepted 32:0 . I'm just requesting src

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-01 Thread Andrea Faulds
Good evening, The RFC has been updated to cover return types, since Levi’s Return Types RFC has passed. The patch is a work in progress: it works, but lacks tests for return types. Version 0.3 of the RFC can be found here: https://wiki.php.net/rfc/scalar_type_hints Thanks! -- Andrea Faulds

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

2015-02-01 Thread Yasuo Ohgaki
Hi all, On Sat, Jan 31, 2015 at 10:48 PM, Pierre Joye pierre@gmail.com wrote: On Jan 31, 2015 9:08 PM, Pavel Kouřil pajou...@gmail.com wrote: On Sat, Jan 31, 2015 at 1:41 PM, Pierre Joye pierre@gmail.com wrote: There is zero reason to discuss what has been approved and

Re: [PHP-DEV] [RFC][DISCUSSION] Deprecate INI set/get aliases.

2015-02-01 Thread Yasuo Ohgaki
Hi Lester, On Sun, Feb 1, 2015 at 9:05 AM, Lester Caine les...@lsces.co.uk wrote: it is important that the manual has a better means of identifying all of the ini_set keys. I agree. INI changes PHP behavior, it's better to be easily searchable with/without this RFC. Good addition for Future

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

2015-02-01 Thread S.A.N
2015-02-01 21:41 GMT+02:00 Rowan Collins rowan.coll...@gmail.com: On 31/01/2015 23:42, S.A.N wrote: Yes, you're right, in PHP you can solve this problem by other methods, i know... But the problem is that PHP is no nice and convenient for solving this problem. So i suggested to add new

Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Xinchen Hui
Hey: On Mon, Feb 2, 2015 at 3:35 PM, Anatol Belski anatol@belski.net wrote: Hi, On Mon, February 2, 2015 08:11, Xinchen Hui wrote: Hey: On Mon, Feb 2, 2015 at 2:51 PM, François Laupretre franc...@tekwire.net wrote: De : Xinchen Hui [mailto:larue...@php.net] we used to use lval of

Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Anatol Belski
Hi Hui, On Mon, February 2, 2015 08:40, Xinchen Hui wrote: Hey: On Mon, Feb 2, 2015 at 3:35 PM, Anatol Belski anatol@belski.net wrote: Hi, On Mon, February 2, 2015 08:11, Xinchen Hui wrote: Hey: On Mon, Feb 2, 2015 at 2:51 PM, François Laupretre franc...@tekwire.net wrote:

[PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Xinchen Hui
Hey: we used to use lval of zval as a handle to access resource type.. but now, we introduced a new type IS_RESOURCE, which make the handle(id) sort of redundant . further more, the common usage when handling resource is like: if (zend_parse_parameters(ZEND_NUM_ARGS(), rl,

Re: [PHP-DEV] Re: Improvements to array.c code base

2015-02-01 Thread Benjamin Coutu
Hi Dmitry, I think Xinchen Hui has already implemented the range-function suggestion. I very much appreciate that you are working on the for-each optimization/consistency, this will improve things quite a bit. Focusing on big improvements (thinking anything hashtable) is absolutely the way to

Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Xinchen Hui
Hey: On Mon, Feb 2, 2015 at 2:51 PM, François Laupretre franc...@tekwire.net wrote: De : Xinchen Hui [mailto:larue...@php.net] we used to use lval of zval as a handle to access resource type.. but now, we introduced a new type IS_RESOURCE, which make the handle(id) sort of

Re: [PHP-DEV] [RFC] Immutable variables and objects

2015-02-01 Thread Alexander Lisachenko
Hello, internals! 2015-02-01 4:01 GMT+03:00 Andrea Faulds a...@ajf.me: I think having some means to create value type classes (i.e. PHP 4-style classes) would be beneficial. These classes would have the same always-copy or copy-on-write behaviour that PHP’s scalar types and arrays have.

[PHP-DEV] Re: [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Xinchen Hui
On Mon, Feb 2, 2015 at 1:34 PM, Xinchen Hui larue...@php.net wrote: Hey: we used to use lval of zval as a handle to access resource type.. but now, we introduced a new type IS_RESOURCE, which make the handle(id) sort of redundant . further more, the common usage when

[PHP-DEV] Re: Improvements to array.c code base

2015-02-01 Thread Dmitry Stogov
Hi Benjamin, We are in the state, when we mainly have to concentrate on big improvements that we have to deliver till mid of March. I keep your ideas, but they are stuck at the end of my TODO list. Thanks. Dmitry. On Tue, Jan 20, 2015 at 11:30 AM, Benjamin Coutu ben.co...@zeyos.com wrote: Hi

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-02-01 Thread Dmitry Stogov
As I already told, in my opinion, version 0.1 was the perfect solution that fit into PHP semantic very well. declare(strict_types=1); - is really weird solution. It changes type hinting behavior per file scope, so, just to try strict type hinting in a big project, people will have to change every

Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Xinchen Hui
Hey: On Mon, Feb 2, 2015 at 3:11 PM, Xinchen Hui larue...@php.net wrote: Hey: On Mon, Feb 2, 2015 at 2:51 PM, François Laupretre franc...@tekwire.net wrote: De : Xinchen Hui [mailto:larue...@php.net] we used to use lval of zval as a handle to access resource type.. but now, we

Re: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread Anatol Belski
Hi, On Mon, February 2, 2015 08:11, Xinchen Hui wrote: Hey: On Mon, Feb 2, 2015 at 2:51 PM, François Laupretre franc...@tekwire.net wrote: De : Xinchen Hui [mailto:larue...@php.net] we used to use lval of zval as a handle to access resource type.. but now, we introduced a new type

RE: [PHP-DEV] [DICUSS]Cleanup resource handling APIs

2015-02-01 Thread François Laupretre
De : Xinchen Hui [mailto:larue...@php.net] we used to use lval of zval as a handle to access resource type.. but now, we introduced a new type IS_RESOURCE, which make the handle(id) sort of redundant . Wrong. The IS_RESOURCE type has nothing to do with PHP 7. Only zend_resource is