Hi Sam
2018-01-25 23:11 GMT+01:00 Sam Ding :
>
> The test case ext/sockets/tests/socket_recvmsg.php has following output
> on x86_64:
>
> ===
> ...
> 1 Array
> 2 (
> 3[name] => Array
> 4(
> 5[family] => 10
> 6[addr] => ::1
> 7
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 work, but array should only return true if it's an
> > array, not for anything that
On Thu, Jan 25, 2018 at 10:50 PM, Ryan McCullagh wrote:
> I have been browsing php-src and notice smart_string, and smart_str, each
> with their header files. Why is there two seemingly identical structures with
> the same name?
>
smart_string targets a raw char* buffer,
Hello internals,
I have been browsing php-src and notice smart_string, and smart_str, each with
their header files. Why is there two seemingly identical structures with the
same name?
--
Ryan McCullagh
ryanmccullagh.com
--
PHP Internals - PHP Runtime Development Mailing List
To
On Thu, Jan 25, 2018 at 3:04 PM, Niklas Keller wrote:
>
>>
>> $a instanceof array
>>
>
> That might work, but array should only return true if it's an
> array, not for anything that implements ArrayAccess.
>
>
Related:
On Thu, Jan 25, 2018 at 4:11 PM, Levi Morrison
On Thursday, January 25, 2018 4:11:02 PM CST Levi Morrison wrote:
> > IMPLEMENTATION STYLE #1: collectionof operator
> > The style of implementation I like the most is a collectionof operator in
> > parallel to the instance_of operator. It would be instanceof's plural
> > brother, so
> >
> >
Hi internals,
I'd like to request for php-src karma for my account (tpunt) in order to help
with the handling of PRs on GitHub. Having been contributing to PHP for
a few years now, I feel like I've got the hang of things well enough to make
more of an impact to the project now.
Thanks,
Tom
The test case ext/sockets/tests/socket_recvmsg.php has following output
on x86_64:
===
...
1 Array
2 (
3[name] => Array
4(
5[family] => 10
6[addr] => ::1
7[port] => 7001
8[flowinfo] => 0
9[scope_id] => 0
10)
11
> IMPLEMENTATION STYLE #1: collectionof operator
> The style of implementation I like the most is a collectionof operator in
> parallel to the instance_of operator. It would be instanceof's plural
> brother, so
>
> $arg collectionof \SomeClass
>
> To pass the check $arg must be of the iterable
On 25/01/2018 20:19, Michael Morris wrote:
He's getting the syntax from Java.
Actually, from C++, and possibly from somewhere before that; at this
point, it's pretty widely adopted.
The problem is that Java already has the policing
mechanics present in the runtime to police insertions
>
> On Thu, Jan 25, 2018 at 2:39 PM, Niklas Keller wrote:
>
>>
>> So, given `$a collectionof string` the operator returns whether or not $a
>>> is, at that time, a collection of strings (be it an array or other
>>> iterable). It doesn't insure $a will stay that way - it's just a
On Thu, Jan 25, 2018 at 2:39 PM, Niklas Keller wrote:
>
> So, given `$a collectionof string` the operator returns whether or not $a
>> is, at that time, a collection of strings (be it an array or other
>> iterable). It doesn't insure $a will stay that way - it's just a check of
Michael Morris schrieb am Do., 25. Jan. 2018, 21:19:
> On Thu, Jan 25, 2018 at 2:10 PM, Rowan Collins
> wrote:
>
> > On 25/01/2018 14:52, Derick Rethans wrote:
> >
> >> IMO, it makes a lot more sense to check integrity when creating the
> >> "array"
On Thu, Jan 25, 2018 at 2:16 PM, Rowan Collins
wrote:
> On 25/01/2018 18:56, Michael Morris wrote:
>
>> Ok, let's stay on topic please.
>> This RFC discussion is about an operator or family of functions to verify
>> that a given $var is a collection. Objects which
On Thu, Jan 25, 2018 at 2:10 PM, Rowan Collins
wrote:
> On 25/01/2018 14:52, Derick Rethans wrote:
>
>> IMO, it makes a lot more sense to check integrity when creating the
>> "array" structure. Instead, I would suggest to add a native Collection
>> type, that takes a
On 25/01/2018 18:56, Michael Morris wrote:
Ok, let's stay on topic please.
This RFC discussion is about an operator or family of functions to verify
that a given $var is a collection. Objects which enforce collection
integrity is a tangential but whole other topic outside the scope of what I
On 25/01/2018 14:52, Derick Rethans wrote:
IMO, it makes a lot more sense to check integrity when creating the
"array" structure. Instead, I would suggest to add a native Collection
type, that takes a "type" as argument. They aren't quite full generics,
but it does 1. fix something; 2. isn't
On Thu, Jan 25, 2018 at 10:14 AM, Bishop Bettini wrote:
>
> Agreed, and we can get *almost* there today with:
>
> $collection = collection_of('is_int', [ 1, 2 ]);
>
Ok, let's stay on topic please.
This RFC discussion is about an operator or family of functions to verify
that a
I will not
On 22 January 2018 at 22:11, Stanislav Malyshev wrote:
> Hi!
>
>> I want to see strict typing as an option, not a requirement.
>
> You seem to be under impression that this somehow makes things easier.
> It does not. To explain: let's say you design a strictly
On Thu, Jan 25, 2018 at 9:21 AM, Derick Rethans wrote:
> On Thu, 25 Jan 2018, Ryan Pallas wrote:
>
> > On Thu, Jan 25, 2018 at 7:52 AM, Derick Rethans wrote:
> >
> > > On Wed, 24 Jan 2018, Michael Morris wrote:
> > >
> > > > Ok, here's another idea I've been
On Thu, Jan 25, 2018 at 10:21 AM, Derick Rethans wrote:
>
> PHP owns the top-level namespace. It has always done that. It's even
> documented: http://docs.php.net/manual/en/userlandnaming.rules.php
>
>
That doesn't stop the bellyaching when the refactoring becomes necessary.
If
On Thu, 25 Jan 2018, Ryan Pallas wrote:
> On Thu, Jan 25, 2018 at 7:52 AM, Derick Rethans wrote:
>
> > On Wed, 24 Jan 2018, Michael Morris wrote:
> >
> > > Ok, here's another idea I've been mulling over. This I know is possible
> > > because I've done it using user land code,
On Thu, Jan 25, 2018 at 9:52 AM, Derick Rethans wrote:
> On Wed, 24 Jan 2018, Michael Morris wrote:
>
> > Ok, here's another idea I've been mulling over. This I know is possible
> > because I've done it using user land code, specifically Drupal 8's
> > Assertion\Inspector class.
On Thu, Jan 25, 2018 at 7:52 AM, Derick Rethans wrote:
> On Wed, 24 Jan 2018, Michael Morris wrote:
>
> > Ok, here's another idea I've been mulling over. This I know is possible
> > because I've done it using user land code, specifically Drupal 8's
> > Assertion\Inspector class.
On Wed, 24 Jan 2018, Michael Morris wrote:
> Ok, here's another idea I've been mulling over. This I know is possible
> because I've done it using user land code, specifically Drupal 8's
> Assertion\Inspector class.
>
>
25 matches
Mail list logo