[PHP-DEV] Passing HashTable data from php.ini to an extension method: corrupted values

2020-09-17 Thread Alexander Mashin
Dear all, I am trying to make a PHP (7.4) extension use in an extension method a setting from php.ini (like myext.map=key1=val1,key2=val2;) parsed as an associative array. I want the parsing to happen in PHP_MINIT_FUNCTION(myext) . So, I declared a php setting, uncommented REGISTER_INI_ENTRIES();

Re: [PHP-DEV] The case for transpiled generics

2020-09-17 Thread Brent Roose
Hi all To make myself clear, since I realise I used a confusing term in the subject of my mail. What I'm proposing is runtime-erased generics, the way Matthew describes them: PHP completely ignores them during runtime, and wouldn't do anything with them during compile time. It's up to third par

Re: [PHP-DEV] Namespace-private class properties

2020-09-17 Thread Mike Schinkel
> On Sep 17, 2020, at 8:28 AM, Olle Härstedt wrote: > > (NB: This idea is NOT about namespace visibility for classes, interfaces or > traits (already discussed here: > https://wiki.php.net/rfc/namespace-visibility). > It's about adding a *new* visibility qualifier, call it "internal", to > ma

Re: [PHP-DEV] The case for transpiled generics

2020-09-17 Thread Matthew Brown
I think the addition of runtime-erased generics would be a good thing for the language. I don’t think PHP should perform any sort of checking of generic parameters at compile time. No other equivalent interpreter performs those compile-time checks, and it’s also *very* complex — since adding su

Re: [PHP-DEV] The case for transpiled generics

2020-09-17 Thread Matthew Brown
> On Sep 17, 2020, at 3:25 PM, Levi Morrison > wrote: > >  >> >> On Thu, Sep 17, 2020 at 1:00 PM Matthew Brown >> wrote: On Sep 17, 2020, at 1:28 PM, Brent Roose wrote: >>> But I don't want to get stuck on phrasing, if elidiing is the right term as >>> Larry suggests, let's go with i

Re: [PHP-DEV] The case for transpiled generics

2020-09-17 Thread Levi Morrison via internals
On Thu, Sep 17, 2020 at 1:00 PM Matthew Brown wrote: > > On Sep 17, 2020, at 1:28 PM, Brent Roose wrote: > > But I don't want to get stuck on phrasing, if elidiing is the right term as > > Larry suggests, let's go with it! > > No, the correct term is “type erasure”: > https://en.m.wikipedia.org/

Re: [PHP-DEV] The case for transpiled generics

2020-09-17 Thread Matthew Brown
> On Sep 17, 2020, at 1:28 PM, Brent Roose wrote: > > But I don't want to get stuck on phrasing, if elidiing is the right term as > Larry suggests, let's go with it! No, the correct term is “type erasure”: https://en.m.wikipedia.org/wiki/Type_erasure Its opposite is called reification: https:

Re: [PHP-DEV] Git workflow, PRs and php-cvs ML

2020-09-17 Thread Nikita Popov
On Wed, Sep 16, 2020 at 1:20 PM Matteo Beccati wrote: > Hi Nikita, > > On 16/09/2020 12:46, Nikita Popov wrote: > > No, this just means that your CI is running tests that our CI doesn't. > > In this case, you are probably using a different MySQL version and thus > > run a different subset of test

Re: [PHP-DEV] The case for transpiled generics

2020-09-17 Thread Brent Roose
Hi Ilija > On 17 Sep 2020, at 19:01, Ilija Tovilo wrote: > > Hi Brent > >> Today I'd like to hear your thoughts on what might be a controversial topic, >> though I think it's worth having this discussion. I want to make the case >> for adding generic syntax, without actually enforing any addi

Re: [PHP-DEV] The case for transpiled generics

2020-09-17 Thread Brent Roose
Hi Matthew and Larry > On 17 Sep 2020, at 18:21, Larry Garfield wrote: > > On Thu, Sep 17, 2020, at 10:21 AM, Matthew Brown wrote: >> Quick thing before I get into my own reaction: >> >> Transpiling is normally thought of as the process of converting one >> language into another. Tools like Bab

Re: [PHP-DEV] The case for transpiled generics

2020-09-17 Thread Brent Roose
Hi George Thanks for the reply! > On 17 Sep 2020, at 14:34, G. P. B. wrote: > > Hello Brent, > > I'm going to make the argument I've already done on Reddit once [1], IMHO > TypeScript is just a nicer pipeline for a preprocessor and a static > analyser and not a language per say. > > Let me ex

Re: [PHP-DEV] The case for transpiled generics

2020-09-17 Thread Ilija Tovilo
Hi Brent > Today I'd like to hear your thoughts on what might be a controversial topic, > though I think it's worth having this discussion. I want to make the case for > adding generic syntax, without actually enforing any additional type checks > at runtime. Please hear me out. I think having

Re: [PHP-DEV] The case for transpiled generics

2020-09-17 Thread Larry Garfield
On Thu, Sep 17, 2020, at 10:21 AM, Matthew Brown wrote: > Quick thing before I get into my own reaction: > > Transpiling is normally thought of as the process of converting one > language into another. Tools like Babel transpile TypeScript to JavaScript. > > What's being proposed here (AFAICT) is

Re: [PHP-DEV] The case for transpiled generics

2020-09-17 Thread Matthew Brown
Quick thing before I get into my own reaction: Transpiling is normally thought of as the process of converting one language into another. Tools like Babel transpile TypeScript to JavaScript. What's being proposed here (AFAICT) is type erasure – the generic type information would be erased during

[PHP-DEV] PHP 8.0.0 Beta 4 available for testing

2020-09-17 Thread Sara Golemon
PHP 8.0.0 Beta 4 has just been released and can be downloaded from https://downloads.php.net/~pollita Or use the git tag: `php-8.0.0beta4 Windows binaries are available at https://windows.php.net/qa As discussed on list previously, we've added this fourth beta to allow for additional time to sta

Re: [PHP-DEV] Stubs in ext/ldap

2020-09-17 Thread tyson andre
Hi Côme Chilliet, > So in the example of ldap_bind: >     if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|ss", &link, &ldap_bind_dn, &ldap_bind_dnlen, &ldap_bind_pw, &ldap_bind_pwlen) != SUCCESS) > { RETURN_THROWS(); } > > With ldap_bind($link, NULL), ldap_bind_dn is not NULL but an empty strin

Re: [PHP-DEV] Stubs in ext/ldap

2020-09-17 Thread G. P. B.
On Thu, 17 Sep 2020 at 15:18, Côme Chilliet < come.chill...@fusiondirectory.org> wrote: > Le Thu, 17 Sep 2020 15:03:05 +0200, > "G. P. B." a écrit : > > A lot of the documentation is not up to date and will needs to be updated > > after > > there has been a check of the argument names for consis

Re: [PHP-DEV] Stubs in ext/ldap

2020-09-17 Thread Côme Chilliet
Le Thu, 17 Sep 2020 15:03:05 +0200, "G. P. B." a écrit : > A lot of the documentation is not up to date and will needs to be updated > after > there has been a check of the argument names for consistency with other > extensions in regards to named params, the stubs are the source of trust. I th

Re: [PHP-DEV] Stubs in ext/ldap

2020-09-17 Thread tyson andre
Hi Côme Chilliet and G. P. B., > Hello, > > After playing with phpstan and seeing their stubs for some LDAP functions > were >  wrong, I noticed that documentation for LDAP functions and stubs in >  ext/ldap/ldap.stub.php differs. Also see discussion in https://github.com/phan/phan/issues/4194 h

Re: [PHP-DEV] Stubs in ext/ldap

2020-09-17 Thread G. P. B.
On Thu, 17 Sep 2020 at 14:53, Côme Chilliet < come.chill...@fusiondirectory.org> wrote: > Hello, > > After playing with phpstan and seeing their stubs for some LDAP functions > were > wrong, I noticed that documentation for LDAP functions and stubs in > ext/ldap/ldap.stub.php differs. > A lot o

[PHP-DEV] Stubs in ext/ldap

2020-09-17 Thread Côme Chilliet
Hello, After playing with phpstan and seeing their stubs for some LDAP functions were wrong, I noticed that documentation for LDAP functions and stubs in ext/ldap/ldap.stub.php differs. Especially in a lot of functions, the documentation states "string $dn = NULL" but the stub states non-nulla

Re: [PHP-DEV] The case for transpiled generics

2020-09-17 Thread G. P. B.
On Thu, 17 Sep 2020 at 13:33, Brent Roose wrote: > Hello internals > > Today I'd like to hear your thoughts on what might be a controversial > topic, though I think it's worth having this discussion. I want to make the > case for adding generic syntax, without actually enforing any additional > t

[PHP-DEV] Namespace-private class properties

2020-09-17 Thread Olle Härstedt
(NB: This idea is NOT about namespace visibility for classes, interfaces or traits (already discussed here: https://wiki.php.net/rfc/namespace-visibility). It's about adding a *new* visibility qualifier, call it "internal", to make properties private inside a namespace. The purpose is to make compo

[PHP-DEV] The case for transpiled generics

2020-09-17 Thread Brent Roose
Hello internals Today I'd like to hear your thoughts on what might be a controversial topic, though I think it's worth having this discussion. I want to make the case for adding generic syntax, without actually enforing any additional type checks at runtime. Please hear me out. We've been disc

[PHP-DEV] PHP 7.3.23RC1 is available for testing

2020-09-17 Thread Christoph M. Becker
PHP 7.3.23RC1 has just been released and can be downloaded from: Or use the git tag: php-7.3.23RC1 Windows binaries are available at: Please test it carefully, and report any bugs in the bug system. 7.3.23 should be expected in