Re: [PHP-DEV] Core functions throwing exceptions in PHP7

2015-07-14 Thread Dean Eigenmann
Would a PHP Error not work in this case? Or would the error then be interpreted as the result? On 14 Jul 2015, at 23:04, Sammy Kaye Powers m...@sammyk.me wrote: Hello lovely PHP nerds, There are two open PR's for PHP7 to modify the behavior of the CSPRNG's:

[PHP-DEV] JsonSerializable New Interface method Proposal

2015-07-13 Thread Dean Eigenmann
Ive just opened a new RFC https://wiki.php.net/rfc/jsonserializable regarding Json to Object unserialization.

Re: [PHP-DEV] JsonSerializable New Interface method Proposal

2015-07-13 Thread Dean Eigenmann
to the language, the third may include serious bc concerns. Wouldn't an additional function (maybe in addition to your proposed interface; example: json_decode_to(string $json, string $className, int $options)) solve the issue without changing the language? Regards, 2015-07-13 15:22 GMT+02:00 Dean Eigenmann

Re: [PHP-DEV] JsonSerializable New Interface method Proposal

2015-07-13 Thread Dean Eigenmann
AM, Dean Eigenmann dean.eigenm...@icloud.com wrote: The Additional function you have proposed seems like the easiest and best way to do it currently without changing the language. I was thinking of giving the cast syntax special meaning if used in connection with json_decode, but this would most

Re: [PHP-DEV] JsonSerializable New Interface method Proposal

2015-07-13 Thread Dean Eigenmann
I have updated the RFC with a new section showing the updates Sent from my iPhone On 13 Jul 2015, at 20:47, Benjamin Eberlei kont...@beberlei.de wrote: On Mon, Jul 13, 2015 at 3:22 PM, Dean Eigenmann dean.eigenm...@icloud.com wrote: Ive just opened a new RFC https://wiki.php.net/rfc

Re: [PHP-DEV] JsonSerializable New Interface method Proposal

2015-07-13 Thread Dean Eigenmann
I will update the spec for it to be a function, called something like json_decode_to($json, $class, $mapping = []); With mapping you could then specify with array keys map to which class property. Sent from my iPhone On 13 Jul 2015, at 16:59, Rowan Collins rowan.coll...@gmail.com wrote:

Re: [PHP-DEV] JsonSerializable New Interface method Proposal

2015-07-13 Thread Dean Eigenmann
Ryan, I think the usage of this won't support multidimensional arrays. However in the decode function, You could specify Foreach ($arr['permission'] as $permission) { $this-permissions[] = (permission) json_decode($permission); } Sent from my iPhone On 13 Jul 2015, at 17:03, Ryan Pallas

[PHP-DEV] RFC Karma

2015-07-13 Thread Dean Eigenmann
Hey, Could I please have RFC Karma for my wiki account, (user: decanus) as I would like to create an RFC for my concept  https://decanus.github.io/JsonSerializable-Proposal/ Thanks

[PHP-DEV] Concept for Json_decode

2015-07-10 Thread Dean Eigenmann
Hello, I have a proposal for PHP. The proposed interface would allow developers to decode json into a custom object directly. If given the approval I would possibly be able to implement it. Here is my github link with further details:  https://github.com/decanus/JSON-Aware/tree/master