Re: [PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-03 Thread Andreas Heigl
Hey Andreas. Am 04.07.17 um 00:16 schrieb Andreas Treichel: > Hey Côme, hey Andreas. > >> string|FALSE ldap_exop_whoami(resource $link) - The returned string is >> the DN of the currently bound user. > > In my opinion the code is really ease to read with exceptions. > > try { > $user =

Re: [PHP-DEV] 7.2 behavior break, Bug #74836 isset on zero-prefixed numeric indexes in array broken

2017-07-03 Thread Dmitry Stogov
Hi, I agree with Stas and Sara. it's easier to revert the last optimization and return to 7.1 behavior (even if it's inconsistent). Fixing this inconsistency in PHP-Next would require RFC. Thanks. Dmitry. From: Stanislav Malyshev

Re: [PHP-DEV] 7.2 behavior break, Bug #74836 isset on zero-prefixed numeric indexes in array broken

2017-07-03 Thread Stanislav Malyshev
Hi! > > Please take a look at https://bugs.php.net/bug.php?id=74836 > > What is the best option to fix this? > > > The most consistent way, from my point of view - disabling zero-prefexed > numeric strings in all cases, but this is a new behavior break. I think this is very corner case, for

[PHP-DEV] /usr/bin/ld: cannot find -lmysqlclient | error: wrong mysql library version or lib not found

2017-07-03 Thread Guillermo Cespedes
Hi, I am compiling MariaDB 10.2.6 and PHP 7.1.6 I'm trying it on Debian 8.8 32x / x64 on DigitalOcean See the script: https://gist.github.com/dertin/8de14e458dd4f0d3acb5f0deff120951 But I have problems compiling PHP with

Re: [PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-03 Thread Andreas Treichel
Hey Côme, hey Andreas. > string|FALSE ldap_exop_whoami(resource $link) - The returned string is > the DN of the currently bound user. In my opinion the code is really ease to read with exceptions. try { $user = ldap_exop_whoami($link); } catch(Throwable $e) { } string|FALSE

[PHP-DEV] GOOD Benchmark Results for PHP Master 2017-07-02

2017-07-03 Thread lp_benchmark_robot
Results for project PHP master, build date 2017-07-02 19:23:14-07:00 commit: f066f59 previous commit:cf7ae70 revision date: 2017-07-02 10:41:38-04: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] Re: [RFC] LDAP EXOP

2017-07-03 Thread Andreas Heigl
Hey Côme, hey Andreas. Am 03.07.17 um 17:04 schrieb Andreas Treichel: > Hello, > > please change the signature form > > bool ldap_exop_whoami(resource $link, string &$result) > > to > > string ldap_whoami(resource $link); > > i dont see the benefit to return a single value with a reference.

Re: [PHP-DEV] Re: [RFC] Distrust SHA-1 Certificates

2017-07-03 Thread Niklas Keller
2017-07-03 19:24 GMT+02:00 Sara Golemon : > On Mon, Jul 3, 2017 at 1:12 PM, Niklas Keller wrote: > > Additionally there will be two INI options > > which are only added to PHP 7.1 and 7.0 to allow people to immediately > > upgrade to secure defaults without any

Re: [PHP-DEV] Re: [RFC] Distrust SHA-1 Certificates

2017-07-03 Thread Sara Golemon
On Mon, Jul 3, 2017 at 1:12 PM, Niklas Keller wrote: > Additionally there will be two INI options > which are only added to PHP 7.1 and 7.0 to allow people to immediately > upgrade to secure defaults without any risk of breaking other apps. > I understand what you're going for

Re: [PHP-DEV] Re: [RFC] Distrust SHA-1 Certificates

2017-07-03 Thread Sara Golemon
On Mon, Jul 3, 2017 at 12:49 PM, Anatol Belski wrote: > About how to proceed - I'd say the issue is clear and either way > should be fixed. The RFC chooses the explicit strength approach. > What I'm a bit concerned about is, that there's no implementation > by this time,

Re: [PHP-DEV] Re: [RFC] [Discussion] Class Naming

2017-07-03 Thread Fleshgrinder
On 7/3/2017 7:18 PM, Niklas Keller wrote: > While true, most applications actually depend on the case for class > names because of autoloaders. > > Regards, Niklas > Nobody is auto-loading internal classes, they are auto-loaded by PHP. That is the only thing this vote is about. PS: Note that

Re: [PHP-DEV] Re: [RFC] [Discussion] Class Naming

2017-07-03 Thread Niklas Keller
2017-07-03 17:53 GMT+02:00 Fleshgrinder : > On 7/3/2017 5:30 PM, Andreas Treichel wrote: > > With any exception from PascalCase you cannot e.g. generate class names > > from strings without a explicit mapping table: > > > > > > > function findParserByRootNode(DomDocument

Re: [PHP-DEV] "Reader" as alternative to Iterator

2017-07-03 Thread Niklas Keller
2017-07-03 17:50 GMT+02:00 Andreas Hennings : > On Mon, Jul 3, 2017 at 9:09 AM, Niklas Keller wrote: > > > > Hey Andreas, > > > > what you're trying to do here seems to be premature optimization. While > you > > save a bunch of method calls, your I/O will

Re: [PHP-DEV] Re: [RFC] Distrust SHA-1 Certificates

2017-07-03 Thread Niklas Keller
> > I haven't followed the discussion back then, but just read through. The > discussion seems unfinished yet, as far as I understood. The two > approaches - the one going by security levels, and the other using > strength bits as a argument. As for me, security levels were more future > oriented

RE: [PHP-DEV] Re: [RFC] Distrust SHA-1 Certificates

2017-07-03 Thread Anatol Belski
Hi, > -Original Message- > From: Niklas Keller [mailto:m...@kelunik.com] > Sent: Monday, July 3, 2017 3:14 PM > To: Jakub Zelenka > Cc: PHP Internals > Subject: [PHP-DEV] Re: [RFC] Distrust SHA-1 Certificates > > 2017-05-30 22:26 GMT+02:00 Jakub

Re: [PHP-DEV] "Reader" as alternative to Iterator

2017-07-03 Thread Andreas Hennings
On Mon, Jul 3, 2017 at 6:08 PM, Andreas Hennings wrote: > On Mon, Jul 3, 2017 at 5:53 PM, Johannes Schlüter > wrote: >> On Mo, 2017-07-03 at 17:32 +0200, Niklas Keller wrote: >> >>> > That distinction is the reason why next() and valid() are different

Re: [PHP-DEV] "Reader" as alternative to Iterator

2017-07-03 Thread Andreas Hennings
On Mon, Jul 3, 2017 at 5:53 PM, Johannes Schlüter wrote: > On Mo, 2017-07-03 at 17:32 +0200, Niklas Keller wrote: > >> > That distinction is the reason why next() and valid() are different >> > methods in iterators. I would rather say this is the reason why current() and

Re: [PHP-DEV] "Reader" as alternative to Iterator

2017-07-03 Thread Andreas Hennings
On Mon, Jul 3, 2017 at 5:27 PM, Johannes Schlüter wrote: > > Wouldn't SPL's NoRewindIterator be enough? > > $nit = new NoRewindIterator($it); > > foreach ($nit as $row) { > break; > } > foreach ($nit as $row) { > // continues same iteration > } I had not noticed this

Re: [PHP-DEV] Re: [RFC] [Discussion] Class Naming

2017-07-03 Thread Fleshgrinder
On 7/3/2017 5:30 PM, Andreas Treichel wrote: > With any exception from PascalCase you cannot e.g. generate class names > from strings without a explicit mapping table: > > > function findParserByRootNode(DomDocument $document) > { > $tagName = $document->documentElement->tagName; >

Re: [PHP-DEV] "Reader" as alternative to Iterator

2017-07-03 Thread Johannes Schlüter
On Mo, 2017-07-03 at 17:32 +0200, Niklas Keller wrote: > > That distinction is the reason why next() and valid() are different > > methods in iterators. > > Not really, Iterator::next() returns void, so could as well return > bool. Well, that story is a bit longer and I cut it short. Let's

Re: [PHP-DEV] "Reader" as alternative to Iterator

2017-07-03 Thread Andreas Hennings
On Mon, Jul 3, 2017 at 9:09 AM, Niklas Keller wrote: > > Hey Andreas, > > what you're trying to do here seems to be premature optimization. While you > save a bunch of method calls, your I/O will be the actual bottleneck there. > It's entirely fine to implement such logic in

Re: [PHP-DEV] "Reader" as alternative to Iterator

2017-07-03 Thread Andreas Hennings
Thanks everyone so far for the replies! I think I need to do some "homework", and come back with benchmarks and provide real examples. I remember that the overhead did make a difference in performance, but I should back that up with real data. For now just some inline replies. On Mon, Jul 3,

Re: [PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-03 Thread Côme Chilliet
Le lundi 3 juillet 2017, 17:04:02 Andreas Treichel a écrit : > i dont see the benefit to return a single value with a reference. > > Without a reference the function can used as an argument: > doSomethingWithTheUserName(ldap_whoami($link)); Where do you handle errors in this case? For me

Re: [PHP-DEV] "Reader" as alternative to Iterator

2017-07-03 Thread Niklas Keller
2017-07-03 17:27 GMT+02:00 Johannes Schlüter : > On Sa, 2017-07-01 at 19:38 +0200, Andreas Hennings wrote: > > Hello internals, > > (this is my first email to this list, hopefully I'm doing ok.) > > > > --- >

[PHP-DEV] Re: [RFC] [Discussion] Class Naming

2017-07-03 Thread Andreas Treichel
With any exception from PascalCase you cannot e.g. generate class names from strings without a explicit mapping table: documentElement->tagName; $className = ucfirst($tagName) . 'Parser'; if (!class_exists($className)) { throw new RuntimeException('Parser not found for

Re: [PHP-DEV] "Reader" as alternative to Iterator

2017-07-03 Thread Johannes Schlüter
On Sa, 2017-07-01 at 19:38 +0200, Andreas Hennings wrote: > Hello internals, > (this is my first email to this list, hopefully I'm doing ok.) > > --- > - > > Background / motivation: > > Currently in PHP we have an

Re: [PHP-DEV] [RFC] [Discussion] Retry functionality

2017-07-03 Thread Sammy Kaye Powers
On Tue, Jun 20, 2017 at 12:47 AM, Stanislav Malyshev wrote: > Hi! > > Also, having only 2 weeks to discuss about introducing a new language > keyword sounds like extremely short period. Especially at the summer > when many people go to vacations. There's no rush, really. 2

[PHP-DEV] Re: [RFC] LDAP EXOP

2017-07-03 Thread Andreas Treichel
Hello, please change the signature form bool ldap_exop_whoami(resource $link, string &$result) to string ldap_whoami(resource $link); i dont see the benefit to return a single value with a reference. Without a reference the function can used as an argument:

[PHP-DEV] Re: 7.2 behavior break, Bug #74836 isset on zero-prefixed numeric indexes in array broken

2017-07-03 Thread Sara Golemon
On Mon, Jul 3, 2017 at 3:03 AM, Dmitry Stogov wrote: > Please take a look at https://bugs.php.net/bug.php?id=74836 > > What is the best option to fix this? > I'm more curious *why* we throw out numeric strings starting with zeros in _zend_handle_numeric_str_ex() But since the

Re: [PHP-DEV] "Reader" as alternative to Iterator

2017-07-03 Thread Sara Golemon
On Sun, Jul 2, 2017 at 10:49 PM, Andreas Hennings wrote: > (I wanted dedicated reader classes for different return types, e.g. > one "RowReader", one "AssocReader", one "ObjectReader". So here I > would need one adapter class per type. But let's focus on the simple > case,

[PHP-DEV] Re: [RFC] Distrust SHA-1 Certificates

2017-07-03 Thread Niklas Keller
2017-05-30 22:26 GMT+02:00 Jakub Zelenka : > On Mon, May 29, 2017 at 9:16 PM, Niklas Keller wrote: > >> 2017-05-29 22:00 GMT+02:00 Jakub Zelenka : >> >>> On Mon, May 29, 2017 at 11:58 AM, Niklas Keller wrote: >>> Morning

[PHP-DEV] Re: 7.2 behavior break, Bug #74836 isset on zero-prefixed numeric indexes in array broken

2017-07-03 Thread Bob Weinand
Am 03.07.2017 um 09:03 schrieb Dmitry Stogov >: Hi, Please take a look at https://bugs.php.net/bug.php?id=74836 What is the best option to fix this? The most consistent way, from my point of view - disabling zero-prefexed numeric strings in all cases,

Re: [PHP-DEV] "Reader" as alternative to Iterator

2017-07-03 Thread Niklas Keller
2017-07-03 4:49 GMT+02:00 Andreas Hennings : > Well, on a current project I made an attempt to write different > adapters in userland. > I finally decided that the clutter is not worth. > So for this project I wrote everything as "readers", and not as iterators. > > With a

[PHP-DEV] 7.2 behavior break, Bug #74836 isset on zero-prefixed numeric indexes in array broken

2017-07-03 Thread Dmitry Stogov
Hi, Please take a look at https://bugs.php.net/bug.php?id=74836 What is the best option to fix this? The most consistent way, from my point of view - disabling zero-prefexed numeric strings in all cases, but this is a new behavior break. Thanks. Dmitry.