Re: [PHP-DEV] C++-like function-try-block proposal

2017-11-27 Thread Sara Golemon
On Sun, Nov 26, 2017 at 11:06 PM, wrote: > I am proposing a patch (see attachment) > php.net mailing lists don't like attachments (virus paranoia and similar). If you have a patch, the best thing to do is submit it as a PR on github. Then, we can all link to parts and

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Florian Anderiasch
On 27.11.2017 16:38, Sara Golemon wrote: > On Mon, Nov 27, 2017 at 10:34 AM, Florian Anderiasch > wrote: >> Also I'm really sorry that I disappointed you by not managing to finish >> testing on OpenBSD (which I actually started just before seeing this >> mail) and I already

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Niklas Keller
Hey Sara, I'm not sure about the naming, but I think such a function is a good idea. Why a `net_*` prefix when it's in ext/standard? I'd suggest `get_network_interfaces()` instead. As previously mentioned on Twitter [1], it could be really useful for us in amphp/socket [2]. [1]

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Sara Golemon
On Mon, Nov 27, 2017 at 12:23 PM, Matteo Beccati wrote: > I've just tested a NetBSD 7.0 i386 machine and I'm getting a few errors: > > ext/standard/net.c: At top level: > ext/standard/net.c:98:13: warning: ‘iface_append_unicast’ defined but > not used [-Wunused-function] >

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Florian Anderiasch
On 27.11.2017 12:15, Dan Ackroyd wrote: > On 26 November 2017 at 16:28, Florian Anderiasch wrote: > >> if this simply doesn't work on some OSes for >> no good reason.. that's a pretty leaky abstraction. > > Cool. Does that mean that we can drop support for 32bit builds if >

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Sara Golemon
On Mon, Nov 27, 2017 at 11:38 AM, Florian Anderiasch wrote: > Somehow it doesn't match the > +#if HAVE_NET_IF_H > in net.c > > I had to unconditionally include it (for testing), otherwise > IFF_BROADCAST and IFF_POINTOPOINT are undefined. (they are in > sys/net/if.h on

Re: [PHP-DEV] C++-like function-try-block proposal

2017-11-27 Thread Alexei Gerasimov
> Should be fixed now, please retry. Yes, this time it worked, thank you. I'd like to go ahead and write a better-phrased RFC out of what feedback I have gotten so far. The RFC howto speaks of some "karma". How do I get that? -Alexei -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Florian Anderiasch
On 27.11.2017 17:56, Sara Golemon wrote: > On Mon, Nov 27, 2017 at 11:38 AM, Florian Anderiasch > wrote: >> Somehow it doesn't match the >> +#if HAVE_NET_IF_H >> in net.c >> >> I had to unconditionally include it (for testing), otherwise >> IFF_BROADCAST and IFF_POINTOPOINT

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Sara Golemon
On Mon, Nov 27, 2017 at 10:34 AM, Florian Anderiasch wrote: > Also I'm really sorry that I disappointed you by not managing to finish > testing on OpenBSD (which I actually started just before seeing this > mail) and I already sent some results for FreeBSD yesterday, which >

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Matteo Beccati
Hi everyone, On 27/11/2017 17:56, Sara Golemon wrote: >> Can do a proper bug report if needed, but maybe I get around to test >> NetBSD as well. >> > Thanks! I've just tested a NetBSD 7.0 i386 machine and I'm getting a few errors: ext/standard/net.c: In function ‘php_inet_ntop’:

Re: [PHP-DEV] C++-like function-try-block proposal

2017-11-27 Thread Christoph M. Becker
On 27.11.2017 at 19:23, wrote Alexei Gerasimov: > I'd like to go ahead and write a better-phrased > RFC out of what feedback I have gotten so far. The RFC howto speaks of some > "karma". > How do I get that? You have to register for a Wiki account first, see

Re: [PHP-DEV] C++-like function-try-block proposal

2017-11-27 Thread Niklas Keller
Hey Alexei, > I did (using this e-mail address), and got the message: "The user has been > created and the password was sent by email." However, I did not receive any > e-mail with the password. > Sorry for the trouble, seems like nobody tested the sign up process after the server migration

Re: [PHP-DEV] C++-like function-try-block proposal

2017-11-27 Thread Alexei Gerasimov
> > I'd like to go ahead and write a better-phrased > > RFC out of what feedback I have gotten so far. The RFC howto speaks of some > > "karma". > > How do I get that? > > You have to register for a Wiki account first, see > . Then someone has to approve

Re: [PHP-DEV] C++-like function-try-block proposal

2017-11-27 Thread Alexei Gerasimov
> > Since PHP is partially influenced by C++, I believe this syntax would be > > a meaningful step in making PHP a little bit more intuitively compatible > > with C++ practices, which may prove useful for people who come to PHP from > > the C++ world (such as myself.) The expected benefit is PHP

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Dan Ackroyd
On 26 November 2017 at 16:28, Florian Anderiasch wrote: > if this simply doesn't work on some OSes for > no good reason.. that's a pretty leaky abstraction. Cool. Does that mean that we can drop support for 32bit builds if leaky abstractions are an important thing? > Looks

Re: [PHP-DEV] Changes in namespace importing

2017-11-27 Thread Michael Morris
I'm sure the internal coders will correct me if I'm wrong on this, but as I understand it PHP has no notion of packages, yet many calls to modify how namespace importing works seem to be under the illusion that packages exist. This is understandable, packages are namespaces are terms used somewhat

Re: [PHP-DEV] C++-like function-try-block proposal

2017-11-27 Thread Niklas Keller
Hey, > I have been referred to this mailing list by > https://wiki.php.net/rfc/howto > as the first step to propose a language change. I first tried to register > on wiki.php.net as per php-src/README.SUBMITTING_PATCH in order to > actually > make an RFC, only to be given an error: > >

[PHP-DEV] Packed Strings

2017-11-27 Thread Dmitry Stogov
Hi, I spent some time, reviewing an old Andrea's idea about packed strings. https://github.com/hikari-no-yume/php-src/tree/packedStrings The idea is simple. In every place were we use zend_string*, we may store characters directly. We use low byte to encode packed string marker and string