[PHP-DEV] PDO native JSON / array support

2017-07-26 Thread Michał
Most database systems have now native support for JSON format. Some of them, like PostgreSQL, also accepts arrays. I rememeber there was some fork of pgsql extension with native array support. Maybe it is time to extend PDO so it can accept at least one of these formats? What do You think? -

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

2017-07-26 Thread Rowan Collins
On 26 July 2017 11:25:00 BST, "Michał" wrote: >Most database systems have now native support for JSON format. Some of >them, like PostgreSQL, also accepts arrays. I rememeber there was some >fork of pgsql extension with native array support. > >Maybe it is time to extend PDO so it can accept at

Re: [PHP-DEV] PHP 7.2 forked

2017-07-26 Thread Nikita Popov
On Sun, Jul 23, 2017 at 9:19 PM, Sara Golemon wrote: > On Sun, Jul 23, 2017 at 7:58 AM, Anatol Belski > wrote: > > Ok, so seems I mistook the intention then and you were referring to > these only (or at least) > > > > http://git.php.net/?p=php-src.git;a=commitdiff;h= > dead4f0b1b9a555bbea970f539

RE: [PHP-DEV] PHP 7.2 forked

2017-07-26 Thread Anatol Belski
> -Original Message- > From: Nikita Popov [mailto:nikita@gmail.com] > Sent: Wednesday, July 26, 2017 2:48 PM > To: Sara Golemon > Cc: Anatol Belski ; PHP internals > > Subject: Re: [PHP-DEV] PHP 7.2 forked > > On Sun, Jul 23, 2017 at 9:19 PM, Sara Golemon

[PHP-DEV] LDAP controls support API

2017-07-26 Thread Côme Chilliet
Hello, I’m looking into adding control support to all ldap operations in php-ldap. You can see a WIP PR here: https://github.com/php/php-src/pull/2640 Next step is to add control support for ldap_modify, ldap_add, ldap_search, … The historic patch for this added functions like ldap_modify_ext, l

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

2017-07-26 Thread Michał
> > Hi, > > What would "support" exactly mean for a JSON type? Since JSON is a way of serialising data into a string, wouldn't all JSON values going into and out of the database just look like strings to the driver? > > For Postgres's array types, some support for serialising and unserialising

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

2017-07-26 Thread Nicolas Grekas
Hi, I'm hitting more and more the GC threshold in projects I work on (the "10k roots" one), leading to high CPU usage. Usually, the GC finds nothing to clean, so this is just a waste of CPU. By being super light and fast, objects are nice for many tasks, and the trend is to use them all over the

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

2017-07-26 Thread Johannes Schlüter
On Mi, 2017-07-26 at 15:02 +0200, Michał wrote: > > JSON should be automatically converted to proper type(s). > > $data = ['name' => 'John']; > $sth = $dbh->prepare('INSERT INTO table (json_column) values > (:data)'); > $sth->bindParam(':data', $data, PDO::PARAM_JSON); // new parameter > > > SE

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

2017-07-26 Thread Côme Chilliet
Hello again, I was able to easily add controls support to search operations since they already return the result object. (my previous message concerns modification operations) But I’m a bit stuck for EXOPs. Since ldap_exop generic method can return the result object I thought it would be easy

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

2017-07-26 Thread Sara Golemon
On Wed, Jul 26, 2017 at 12:11 PM, Côme Chilliet wrote: > As ldap_exop was merged in 7.2, is it possible to have a BC on it for 7.3 or > not? > It would be by adding options in the middle: > resource ldap_exop(resource link, string reqoid [, > string reqdata [, array servercontrols [, array client

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

2017-07-26 Thread Sara Golemon
On Wed, Jul 26, 2017 at 12:48 PM, Sara Golemon wrote: > On Wed, Jul 26, 2017 at 12:11 PM, Côme Chilliet wrote: >> As ldap_exop was merged in 7.2, is it possible to have a BC on it for 7.3 or >> not? >> It would be by adding options in the middle: >> resource ldap_exop(resource link, string reqoi

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

2017-07-26 Thread Rowan Collins
On 26 July 2017 14:02:03 BST, "Michał" wrote: >JSON should be automatically converted to proper type(s). > >$data = ['name' => 'John']; >$sth = $dbh->prepare('INSERT INTO table (json_column) values (:data)'); >$sth->bindParam(':data', $data, PDO::PARAM_JSON); // new parameter > > >SELECT json_colu

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

2017-07-26 Thread lp_benchmark_robot
Results for project PHP master, build date 2017-07-25 19:22:25-07:00 commit: 36865b3 previous commit:3964678 revision date: 2017-07-25 22:10:53+02:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

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

2017-07-26 Thread Michał
Encoding data to insert query is simple. But selecting data requires additional magic and processing. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php