Re: [PHP-DEV] RE: Requesting php-src Karma

2018-01-26 Thread Thomas Punt
Thank you Peter, Anatol, and Kalle! > Thomas, please check https://wiki.php.net/vcs/gitworkflow and ask if there's > something to be cleared out. Thanks for the link - I'll be sure to ask if there is anything that's not clear. Regards, Tom

Re: [PHP-DEV] Shorthand proposal for associative arrays

2018-01-26 Thread Richard Jennings
In my opinion this suggestion reduces readability and increases cognative burden and as such I hope it is not included. Regards On Fri, 26 Jan 2018 at 21:52, Fleshgrinder wrote: > On 1/26/2018 7:16 PM, Christian Schneider wrote: > > Hi there, > > I have a proposal for a

Re: [PHP-DEV] Shorthand proposal for associative arrays

2018-01-26 Thread Fleshgrinder
On 1/26/2018 7:16 PM, Christian Schneider wrote: > Hi there, > I have a proposal for a shorthand notation of associative arrays borrowed > from another language: > :$foo > would be equivalent to > 'foo' => $foo > and would work with array, list or [] > > Motivation behind it, maybe

Re: [PHP-DEV] Shorthand proposal for associative arrays

2018-01-26 Thread David Rodrigues
Sorry. I mean "compact()" instead of extract() (it basically does the oposite hehe), I confused everything in a hurry. Sorry. So the real example is: html::img(compact('src', 'alt')); 2018-01-26 19:39 GMT-02:00 Michael Morris : > Forgot something in the previous post... > >

Re: [PHP-DEV] Shorthand proposal for associative arrays

2018-01-26 Thread Michael Morris
Forgot something in the previous post... On Fri, Jan 26, 2018 at 12:16 PM, Christian Schneider wrote: > Hi there, > I have a proposal for a shorthand notation of associative arrays borrowed > from another language: > :$foo > would be equivalent to > 'foo'

Re: [PHP-DEV] Shorthand proposal for associative arrays

2018-01-26 Thread Michael Morris
On Fri, Jan 26, 2018 at 2:00 PM, David Rodrigues wrote: > Maybe you should see the extract() method. Uhm, what? You need to learn what extract does before you recommend it as an alternative to someone's proposal. Extract takes an array and moves their keys onto the

RE: [PHP-DEV] RE: Requesting php-src Karma

2018-01-26 Thread Anatol Belski
> -Original Message- > From: Peter Cowburn [mailto:petercowb...@gmail.com] > Sent: Friday, January 26, 2018 9:16 PM > To: Anatol Belski > Cc: Thomas Punt ; PHP internals list > > Subject: Re: [PHP-DEV] RE: Requesting php-src

Re: [PHP-DEV] RE: Requesting php-src Karma

2018-01-26 Thread Peter Cowburn
On 26 January 2018 at 20:02, Anatol Belski wrote: > Hi, > > > -Original Message- > > From: Thomas Punt [mailto:tp...@hotmail.co.uk] > > Sent: Thursday, January 25, 2018 11:41 PM > > To: PHP internals list > > Subject: [PHP-DEV] Requesting php-src

Re: [PHP-DEV] RE: Requesting php-src Karma

2018-01-26 Thread Kalle Sommer Nielsen
On 26 Jan 2018 21.02 <20%2018%2021%2002>, "Anatol Belski" wrote: Hi, > -Original Message- > From: Thomas Punt [mailto:tp...@hotmail.co.uk] > Sent: Thursday, January 25, 2018 11:41 PM > To: PHP internals list > Subject: [PHP-DEV] Requesting php-src

[PHP-DEV] RE: Requesting php-src Karma

2018-01-26 Thread Anatol Belski
Hi, > -Original Message- > From: Thomas Punt [mailto:tp...@hotmail.co.uk] > Sent: Thursday, January 25, 2018 11:41 PM > To: PHP internals list > Subject: [PHP-DEV] Requesting php-src Karma > > Hi internals, > > > I'd like to request for php-src karma for my

Re: [PHP-DEV] Shorthand proposal for associative arrays

2018-01-26 Thread David Rodrigues
Sorry, the extract() function will receives an array as first argument. html::img(extract(['src', 'alt']); 2018-01-26 18:00 GMT-02:00 David Rodrigues : > Maybe you should see the extract() method. It will receive strings as > varargs and will create an associative array

Re: [PHP-DEV] Shorthand proposal for associative arrays

2018-01-26 Thread David Rodrigues
Maybe you should see the extract() method. It will receive strings as varargs and will create an associative array with the string name and the value, similar to your first example. html::img(extract('src', 'alt')); 2018-01-26 16:16 GMT-02:00 Christian Schneider : > Hi

Re: [PHP-DEV] return values of socket_recvmsg

2018-01-26 Thread Sam Ding
The return data in PHP is "$data" which is an array with 4 elements, does it match to "zmsg" inside of c function "socket_recvmsg"(/home/work/php/php/ext/sockets/sendrecvmsg.c:214)? Here zmsg is struct with: (gdb) ptype zmsg type = struct _zval_struct { zend_value value; union {

Re: [PHP-DEV][RFC][DISCUSSION] Collection Inspection

2018-01-26 Thread Larry Garfield
On Friday, January 26, 2018 8:43:20 AM CST Christoph M. Becker wrote: > On 26.01.2018 at 00:28, Larry Garfield wrote: > > On the read side (which you'd want for a generator or similar), the logic > > you'd want is essentially: > > > > class Ints extends ArrayObject { > > > > public function

[PHP-DEV] Shorthand proposal for associative arrays

2018-01-26 Thread Christian Schneider
Hi there, I have a proposal for a shorthand notation of associative arrays borrowed from another language: :$foo would be equivalent to 'foo' => $foo and would work with array, list or [] Motivation behind it, maybe someone else finds more good uses: 1) Emulating named

Re: [PHP-DEV][RFC][DISCUSSION] Collection Inspection

2018-01-26 Thread Rowan Collins
On 26 January 2018 at 14:20, Michael Morris wrote: > On Thu, Jan 25, 2018 at 11:59 PM, Niklas Keller wrote: > >> >> $b instanceof SomeClass > >> >> > >> >> Returns true if SomeClass can be iterated and contains only strings. > >> >> > >> > > >> > This would

Re: [PHP-DEV] return values of socket_recvmsg

2018-01-26 Thread Sam Ding
Thank Kalle, I knew the implementaion of socket_recvmsg(), but want to know the return data structure. The test on Big_endian (s390x) got a little different return result than on x86_64, try to dig out where the problem is. Thanks, Sam kalle@gmail.com wrote on 01/26/2018 01:58:23 AM: >

Re: [PHP-DEV][RFC][DISCUSSION] Collection Inspection

2018-01-26 Thread Christoph M. Becker
On 26.01.2018 at 00:28, Larry Garfield wrote: > On the read side (which you'd want for a generator or similar), the logic > you'd want is essentially: > > class Ints extends ArrayObject { > public function current() : int { > return parent::current(); > } > } > > Which lints

Re: [PHP-DEV][RFC][DISCUSSION] Collection Inspection

2018-01-26 Thread Michael Morris
On Thu, Jan 25, 2018 at 11:59 PM, Niklas Keller wrote: > Michael Morris schrieb am Fr., 26. Jan. 2018, 02:06: > >> On Thu, Jan 25, 2018 at 3:04 PM, Niklas Keller wrote: >> >> > >> >> >> >> $a instanceof array >> >> >> > >> > That might

Re: [PHP-DEV] threadsafe php crashes too easily

2018-01-26 Thread Hajo Locke
Hello, thank you all for your suggestions. Am 26.01.2018 um 13:21 schrieb Johannes Schlüter: On Fr, 2018-01-26 at 12:43 +0100, Hajo Locke wrote: Hello List, i hope this is the right place to get helped. I have a promising setup for testing purposes, but unfortunately i ran quick into

RE: [PHP-DEV] threadsafe php crashes too easily

2018-01-26 Thread Anatol Belski
Hi, > -Original Message- > From: Hajo Locke [mailto:hajo.lo...@gmx.de] > Sent: Friday, January 26, 2018 12:43 PM > To: internals@lists.php.net > Subject: [PHP-DEV] threadsafe php crashes too easily > > Hello List, > > i hope this is the right place to get helped. I have a promising

Re: [PHP-DEV] threadsafe php crashes too easily

2018-01-26 Thread Johannes Schlüter
On Fr, 2018-01-26 at 12:43 +0100, Hajo Locke wrote: > Hello List, > > i hope this is the right place to get helped. I have a promising > setup  > for testing purposes, but unfortunately i ran quick into problems. > >   I compiled a minimal libphp7.so (7.2.1)  using this line: > ./configure

Re: [PHP-DEV] threadsafe php crashes too easily

2018-01-26 Thread Rowan Collins
On 26 January 2018 at 11:43, Hajo Locke wrote: > the idea is to support php_value/php_flag etc. in .htaccess files for my > users even if they use a fastcgi-setup > Just a thought, but if I understand you rightly, you just need to have Apache completely ignore the php_value

[PHP-DEV] threadsafe php crashes too easily

2018-01-26 Thread Hajo Locke
Hello List, i hope this is the right place to get helped. I have a promising setup for testing purposes, but unfortunately i ran quick into problems.  I compiled a minimal libphp7.so (7.2.1)  using this line: ./configure --disable-all  --enable-static --prefix=/usr

Re: [PHP-DEV][RFC][DISCUSSION] Collection Inspection

2018-01-26 Thread Rowan Collins
On 26 January 2018 at 01:06, Michael Morris wrote: > > On Thu, Jan 25, 2018 at 4:11 PM, Levi Morrison wrote: > > > > Our iterators cannot always be reliably rewound, such as > > when using generators. Checking that the generator returns only > > strings would