[PHP-DEV] [Request][Discussion] Introduce interfaces PDOInterface and PDOStatementInterface

2017-07-27 Thread Andrew Nester
Hello! I’ve been working on request introduced here https://bugs.php.net/bug.php?id=74957 related to implementing new PDOInterface and PDOStatementInterfaces. At this point of time classes PDO and PDOStatement do not implement any interfaces that’s why co

[PHP-DEV] NEUTRAL Benchmark Results for PHP Master 2017-07-26

2017-07-27 Thread lp_benchmark_robot
Results for project PHP master, build date 2017-07-26 19:22:32-07:00 commit: d615a92 previous commit:36865b3 revision date: 2017-07-26 18:56:50-04:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

[PHP-DEV] session_start() should not reset $_SESSIOn if it's not empty

2017-07-27 Thread li...@rhsoft.net
currently i try to optimize our system so that the landing-page if it does not contain forms and when no user is logged in could be cached with APCu which works fine so far there is still a early session_start(); and while delay that would be probably possible like it's happening currently wit

Re: [PHP-DEV] Don't add simple objects to GC's roots

2017-07-27 Thread ??????????
On 26 Jul 2017, at 22:57, ?? <0...@lvht.net> wrote:>> There is a way to work around: just call gc_disable(). But this means >> dealing with side effects of the engine in userland. Moreover, this also >> means leaking memory, since meanwhile roots are not populated. >Maybe we could make gc_dis

Re: [PHP-DEV] json_encode() / json_decode() warnings

2017-07-27 Thread Craig Duncan
On 27 July 2017 at 16:57, Niklas Keller wrote: > It should rather just throw exceptions. Warnings do not really allow error > handling, they just allow error reporting. > > Agreed, but I can't see Exceptions passing the vote. Warnings can be silenced by those that don't care and converted to Exce

Re: [PHP-DEV] json_encode() / json_decode() warnings

2017-07-27 Thread Niklas Keller
2017-07-27 17:41 GMT+02:00 Craig Duncan : > Hi internals, > > When using `json_encode()` and `json_decode()` it is required that you > manually check for errors after every call, eg: > > ```php > $data = json_decode("false"); > if (json_last_error() !== JSON_ERROR_NONE) { > throw new Unexpecte

[PHP-DEV] json_encode() / json_decode() warnings

2017-07-27 Thread Craig Duncan
Hi internals, When using `json_encode()` and `json_decode()` it is required that you manually check for errors after every call, eg: ```php $data = json_decode("false"); if (json_last_error() !== JSON_ERROR_NONE) { throw new UnexpectedValueException(json_last_error_msg()); } ``` This isn't _

Re: [PHP-DEV] Don't add simple objects to GC's roots

2017-07-27 Thread 吕海涛
Hi, > On 26 Jul 2017, at 22:57, Nicolas Grekas wrote: > > There is a way to work around: just call gc_disable(). But this means > dealing with side effects of the engine in userland. Moreover, this also > means leaking memory, since meanwhile roots are not populated. Maybe we could make gc_disab

Re: [PHP-DEV] PDO native JSON / array support

2017-07-27 Thread Philip Hofstetter
Hi, I few years ago, I did a throwaway implementation for this for reading: https://github.com/pilif/php-src/tree/pdo_pgsql-improvements This supports columns of type jsonb, json and text[] and I was considering also adding support for the various timestamps, date and so on. Generally, interest

Re: [PHP-DEV] PDO native JSON / array support

2017-07-27 Thread Johannes Schlüter
On Do, 2017-07-27 at 08:14 +0200, Michał wrote: > Encoding data to insert query is simple. But selecting data requires  > additional magic and processing. The magic while reading is quite limited - at least for MySQL the protocol contains a flag in the meta data telling whether a field is a "arbit

Re: [PHP-DEV] LDAP controls support API [Question for the RM at the end]

2017-07-27 Thread Côme Chilliet
Hello, The problem with your changes seems to be that when using "z/!" for retdata, if I call the method with a unset var, which will be the most common case as it’s an out parameter, the test if (retdata) will fail and the method will behave as if I passed NULL. Côme -- PHP Internals - PHP R

Re: [PHP-DEV] LDAP controls support API [Question for the RM at the end]

2017-07-27 Thread Côme Chilliet
Le mercredi 26 juillet 2017, 12:48:04 CEST Sara Golemon a écrit : > The current return value for 4 or more args is simply `true`, so the > BC break would be trivial to make that a resource (which evaluates as > true), but I think we can make that even simpler. Just fix it before > beta3 (or beta2