« first day (3771 days earlier)      last day (1176 days later) » 

7:14 AM
Good morning.
 
8:10 AM
Hi, any idea when password_get_info() can return null? It's in PHP 8 stubs, but it doesn't return null even with a non-sense input: 3v4l.org/lIR2P
 
Wes
@Crell i would've preferred if UserStatus::cases() returned the enumset containing all cases and be a bit more high level than that. on the other hand, we don't have a native Set interface so that would've made it way harder
it's like the rest of php, it's ok, not great (sorry, i know it was a lot of effort, it's not your fault :P)
 
@AndrasDeak A bit early, no?
 
Wes
is it friday already?
it's the covid effect. i thought it was monday today
all the days looking the same
 
8:25 AM
well, it's neither ;)
 
9:17 AM
@OndřejMirtes github.com/php/php-src/blob/… but it doesn't really make sense
 
@NikiC Should I open a bug report so it's correctly filed?
 
@OndřejMirtes I've adjusted the signature in github.com/php/php-src/commit/…
 
@NikiC Awesome, thanks! Will it find its way to 8.0 branch?
 
@OndřejMirtes it already is on the 8.0 branch :)
 
OK, great :)
 
10:18 AM
@beberlei Should PHP accept null for DOMImplementation::createDocument() $qualifiedName? It's marked as [LegacyNullToEmptyString] in the spec (dom.spec.whatwg.org/#interface-domimplementation), but I'm not sure how that should translate to PHP
(This is in relation to wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg -- should a null parameter there throw a deprecation or not)
 
morns
 
10:58 AM
Sigh... I didn't want to do this, Tyson doesn't seem to want to collaborate with me, making it harder to work on similar things when he keeps rushing things to votes and such.
It makes no sense to propose CachedIterable in the global namespace if I'm proposing ReverseIterator in the Spl namespace.
Seems we're going to have to have some contention on list about it :/
Especially confused because "Too small in scope" is the currently highest item on the feedback vote on any()/all().
I'll try one more email.
 
@LeviMorrison I'm a little naive when it comes to the RFC process, but it seems a fair amount of votes seem to fail where the reasons are kinda discussed afterwards... it feels like there isn't much discussion before hand, and the rejections appear at the vote, with no prior warning?
 
There was discussion ahead of time on this one, including my own warnings that it's too small in scope, and surprise! the highest feedback item right now is "too small in scope."
But yes, it is a somewhat common issue.
 
And you were working together with Tyson on this one? (sorry, I'm a little out of the loop on this, and just a bit focused on my own RFC, and where things can go wrong).
 
No. I tried to get us to collaborate, but it seems he isn't interested. He hasn't directly said that, but hasn't taken me up on that. Sometimes on the Internet it's hard to know if you are mis-communicating or being brushed off.
 
Good point, hard to tell about text based responses (or the lack of)... is there a pride element here? as in, to say they did something, and thinking that the idea is perfect, and won't need input from others?
 
11:14 AM
I don't know in this case. The email I just sent is more direct, so hopefully they'll answer. If they brush off the direct email then they are probably actively ignoring me.
 
is that a direct email, or to the internals mailing list?
either way, it's understandably frustrating, but at least you can use the current vote to justify a larger scope.
 
@CraigFrancis Direct. If he doesn't want to collaborate then we're going to have RFCs in the same space without cohesion, which may doom them both :/
 
Yeah, that does kinda setup a 2 solution situation, then it becomes a battle over who's got the most supporters... which, if I understand correctly, doesn't end well if you need a 2/3 majority.
 
They aren't directly competing, at least. Still, they are competing on indirect issues like namespaces.
 
11:32 AM
ahh, ok, so having some consistency... I'm not sure what to suggest, it is frustrating, as I'd hope discussion over these things would be easier.
 
Shouldn't array destructuring work exactly the same as offset access? 3v4l.org/1etYh There's no warning in the second case.
 
@OndřejMirtes There was a huge discussion about this and tl;dr is that some people think that writing if ([$x] = foo()) is okay
Or rather while ([$key, $value] = each($array)) and similar
Those people are, of course, wrong, but special-casing destructuring was the only way forward at the time
 
Oh, what the whole assign expression returns is absolute unintuitive.
Alright, I'll try to behave the consistent way with offset accesses in PHPStan and see if someone complains. Otherwise I'd have to go back and return the "accessing offsets on null is fine" logic :(
Also this one surprised me: "Cannot mix keyed and unkeyed array entries in assignments". We have the semantics of how it should work: 3v4l.org/rAJGD
 
11:48 AM
I am setting -DZEND_TRACK_ARENA_ALLOC when I do asan builds. Should I be doing this? Anything else I should set for asan builds?
 
11:59 AM
@LeviMorrison It's optional but catches some additional issues
Apart from that no. Just the usual USE_ZEND_ALLOC=0 and USE_TRACKED_ALLOC=1 environment variables
@cmb Should the arguments of odbc_columnprivileges() be made nullable?
It's not really obvious to me why some of the odbc functions have all-nullable args and some only have nullable catalog
 
cmb
12:29 PM
@NikiC Off the top of my head, some of these parameters of the underlying functions actually trigger different behavior for NULL and empty string. :/
 
@NikiC Should BidirectionalIterator also extend Countable? It's basically implied that if you can go to either end you almost guaranteed know how many items there are...
 
@NikiC thanks 👌
 
12:52 PM
Any idea why my new stub file gets generated but rm'd? It's literally doing this at the end of make:
rm ext/spl/spl_bidirectionaliterator_arginfo.h
I guess it needs to exist before running make? Not sure why it does that, but okay.
 
cmb
I checked odbc_columnprivileges() with all params nullable. Calling with catalog and schema NULL gives results; calling with empty string does not. That may not be an issue in practice, though.
However, SQLColumnPrivileges docs explicitly state that TableName must not be NULL; that works for me, though, but may be driver (manager) specific.
 
1:18 PM
o/
 
@LeviMorrison I don't think so
@cmb Hm yeah, and the HY009 error code below lists a few more cases
Which require SQL_ATTR_METADATA_ID to be set, I don't know what that is though
 
@NikiC I'd say this is rather because we have no intrinsic "try destructuring" syntax … If we had something safely destructuring without explicitly checking count() or such, then I'd happily move to that
and say the default destructuring syntax should be warning instead
 
1:56 PM
@NikiC yeah I didn't expect it to be called OnUpdateReal either :|
 
cmb
@NikiC ext/odbc doesn't (allow to) change that, and for me (SQLServer) it is apparently set to SQL_FALSE. I don't know whether that is a common default, though. Obviously, the actual value affects the meaning of these arguments. sigh
apparently, some drivers allow to customize that :cry:
 
yay
 
Hello, I've created a Symfony API with JWT auth, however the password isn't being hashed when I create a user from postman, I've set the algorithm to auto inside the security.yaml how can I configure it to hash the password?
 
2:48 PM
Spaaaaaaaaaaaaace
 
space
 
@Wes Yeah, defining a new type of iterable just for enums would have opened up a can of worms that would have dwarfed the enums themselves. :-)
 
Why on Erf would Enums need a new kind of Iterable?
class EnumIterator implements Iterator { ... } // done. no?
also, words are hard
/me suddenly notices the random bit of German in the room description for the first time
 
@Sara Yes, you have been found in violation on multiple occasions. We were not amused.
 
And I woulda gotten away with it, if it weren't for you meddling kids!
 
3:03 PM
Sara banned from R11 after being banned from Twitter
What a sad story
 
escapeshellarg() silently corrupts "\xFF" on linux ・ *Data Exchange functions ・ #80731
 
3:19 PM
@Sara Iterable value vs iterable type. foreach (MyEnum as $case) {} can't work.
 
@IluTov yeah ... no, let's not do that
 
3:51 PM
> Yes, I'm opposed.
Well great, we're going to have multiple RFCs targeting the iterator spaces with different proposed namespaces.
 
cmb
4:12 PM
Well, PHP is consistently inconsistent.
 
So, a seemingly perniskity PR comment made me wonder about a is_array vs !== null test on a param with a type of ?array. In a 100M iteration loop of each, I see that one loop took ~1.2s, the other took ~1.18s. Is there some other aspect of this that the engine is optimising and I'm missing, or is the 'function call overhead' really that minor (relative to a null comparison check) in ~7.x + ?
 
4:30 PM
large integer operating addition error when overflow ・ *General Issues ・ #80732
 
actually when I only do one run at a time (i.e. a separate invocation so no existing memory usage etc) the times get really close.
 
@Stephen IIRC is_array is one of the fcalls that gets optimized into an opcode, isn't it?
 
@LeviMorrison If I knew that I wouldn't be asking :P
 
cmb
you can check that by calling as variable function
 
4:54 PM
@cmb as in $f = 'is_array'; $f($foo) ?
 
cmb
yes
 
Thanks. I didn't remember where that code is. I'll probably forget next time I need to know it anyway, but maybe I'll remember. 3rd time is a charm, right?
 
Compiles to ZEND_TYPE_CHECK.
I didn't remember exactly, but I felt compelled to look :-P
 
thanks
 
4:59 PM
I can't imagine there's any difference worth discussing between using is_array vs. !== null.
 
@MarkR Did you have to be so opinionated on the first reply? Sheesh.
Btw, data structures and iterators go together; many times iterators are for the data structures.
 
@LeviMorrison It's hardly a first reply considering I've already written dozens of posts and entire RFCs on the subject :-)
 
Second, the types aren't named SplDatastructureQueue, SplDataStructureFixedArray. They are named SplQueue and SplFixedArray. The effectively owned namespace is "Spl".
Doing anything else is crazy to me.
@MarkR False, you did not write dozens of posts and RFCs on specifically the SPL. The whole point was to limit it to the SPL.
 
@Trowski yeah no kidding. It came up because of a PR I submitted to a project. Never mind that the result of said call is about to be passed over the network and thus blow any function overhead out of the water. I wanted to know the specifics before responding, so thanks for the ref to that optimisation.
 
> Do you want a dumping ground? Because this is how you create a dumping
ground :-)
I addressed this in the post, and you ignored it. Or at least, you didn't pontificate or anything so it seems like you did.
I think that's why it irks me; it's like you typed up your reply based on your previous stances instead of proper thought. That's not how we move out of a stalemate situation.
 
5:05 PM
> Using just the SPL namespace (that is, SPL\any) makes the SPL namespace a dumping ground for everything, as you said. Once you introduce an additional meaningful namespace in the form of SPL\iterable\any, you are better off either dropping the SPL part and arriving at iterable\any, or replacing SPL with something more sensible and arriving at PHP\iterable\any.
 
That's explicitly out of scope. I specifically proposed we ignored functions.
It's in the main points.
 
I consider the same principle to apply to everything
 
Except it isn't.
You can't say SplFixedArray and SplQueue have amorphous and undefined prefixes. It's concrete. I'm just proposing we stick a namespace separator after the l.
And, consider this: if we don't adopt this proposal, what's the viable alternative?
It won't be Spl\iterable, or PHP\iterable -- that's under vote and it's not going well.
The alternative is SplNewThing.
See?
 
Burn the SPL datastructures to the ground and borg Ds\ into Ext\Ds :-D
 
"Spl" is the namespace, we just do it as a prefix instead of a namespace.
@MarkR They aren't even 1:1, so that won't happen.
 
5:10 PM
I like the idea of SPL\Iterators\
 
I don't, because Iterator is almost 100% going to be in the name already.
 
The idea to have aliases makes it a viable solution
 
And data-structures and iterators are tied together, and it would be weird to put FixedArray in SPL\Iterators\FixedArray.
 
Yes it would be weird, and downright stupid... so don't do that
 
The alternatives I see are 1. put them in the same namespace or 2. put them in different namespaces despite SplFixedArray and SplFixedArrayIterator being completely coupled and part of the same "module" or "unit".
 
5:12 PM
It's not only DS and iterators. There are also interfaces, exceptions, file handling, etc.
 
@Dharman Many interfaces are no longer in the SPL, FYI.
They are part of PHP proper.
Exceptions, yes, but they aren't a large part of it.
 
Yeah SPL in general is a complete mess, probably an unrecoverable mess IMO.
 
File handling... is it?
There are file handling related iterators, that's true.
Yeah, you are right, there is substantial file handling.
We could include that in the explicitly permitted part of the SPL.
SPL is home for new additions in 1. general purpose datastructures, 2. general purpose iterators or iterators related to the previous point, 3. File handling.
I don't propose accepting new exceptions.
I don't propose accepting new interfaces as a separate category; interfaces can be accepted if they are related to one of the accepted points (ds, iterators, file handling).
 
Are general purpose iterators limited in their application to use with the Spl datastructures?
 
isn't Countable still in SPL?
 
5:19 PM
It's aliased to something inside core, but documentation lists it in SPL
 
Also, I would really like to see things like RecursiveIteratorIterator go away
If we alias this to SPL\Iterators\RecursiveIteratorIterator then it's just a big no
 
It's common for projects to include the last segment in again, e.g. Events\ConsoleEvent
 
@MarkR But is it loved? I know more people who hate it than love it. I don't hear from the "meh" people, obviously.
There are two major points of view about what namespaces are for:
1. They are to prevent naming collisions.
2. They are to organize code.
 
I use PHPStorm so most namespaces are automatically use'd so I find it helpful personally. Moreso when I might have a lot of similar naming. e.g. 200+ different repository classes.
 
I'm definitely in camp 1.
 
5:27 PM
I'm in both, and I think that's a perfectly fine place to be. 1 solves a technical issue, 2 solves a human issue.
 
Using too many sub-namespaces makes more human issues, though. Balance is important, and I think too many projects strike the wrong balance.
Whenever I see 4 namespace segments it hurts me. I mean that, it literally triggers a painful feeling in my brain.
Having a top-level namespace that reflects the organization is normal. Then, there are different projects or spaces within an organization. If those projects cannot manage to avoid naming conflicts within their own code then there is an organizational issue, and putting more namespaces makes organization worse, not better.
 
$cls = \dlep\Sessions\Features\Communications\Chat\Dumping\ChatDumperV1()
 
However, use of another segment is fine if you need to bridge or adapt 3rd party code. Something like OpenTelemetry\Tracing\Zipkin where the organization is OTEL, the project is Tracing, and the 3rd party bridge is Zipkin.
 
You may think that's too many namespaces, but is perfectly hierarchical and sane to me :)
 
Yeah, hard disagree. The only way to find anything in such repositories is the search feature.
 
5:36 PM
Folder. Structure.
 
Sure, if I have the name.
 
Or know what it is
 
What if I don't? If you have that many namespaces then it's surely a large project? Will every person really be able to keep everything in their head?
 
But it's hierarchal, so by its very nature it can be 'mentally' searched
 
Only if you use the same hierarchical structure. There are many ways to categorize things.
 
5:38 PM
There's no way I'm going to try and cram 2500+ classes into 2 or 3 levels of namespaces
 
I think you would benefit immensely from the exercise. I seriously mean that, not because I fundamentally disagree.
A good but imperfect test is "If I put this namespace into its own project, what dependencies will it have? Are the repositories cohesive with few interdependencies?"
 
I think it would be an enormous waste of my time :D because it's how it originally started... when it was small.
If you want to argue about deep namespaces in code and frameworks, first argue about why .NET, Java etc are all wrong.
 
That's why I would never put FixedArray and FixedArrayIterator in different namespaces, never.
 
There's a difference between generic iterators, designed to be used with any iterator, and ones that are specific to a particular class.
 
@MarkR please don't use java as a good example when you try to make a point of naming things :P
 
5:43 PM
Usually this would be handled as something like Spl\ds\iterators
Just as class-specific exceptions often come in an Exceptions subns
 
@PeeHaa org, com, and such do not make good top-level namespaces, imo.
@MarkR They also often do not come in sub-namespaces.
 
@LeviMorrison Hey I am not saying they are doing a good job :D
 
Again, a good litmus is "can I pull this apart into different repositories with minimal interdependencies?" A class-specific exception being in its own repository does not meet this requirement.
 
I fail to see how that's a good litmus test.
Yes, a class specific exception being in its own repository would be stupid... so again, don't do that
 
You like hierarchical structures, but if you don't see how that's a good litmus test, then I have no idea how you are organizing things?
 
5:50 PM
Shared functionality does not need to be above in a hierarchy
 
@Stephen Typical… let's ignore the portion of the code that is a few orders of magnitude slower due to I/O waiting and focus on a few potential microseconds.
 
pecl install memcache fails telling me it needs PHP 8 ・ memcache ・ #80733
 
@IluTov Ah yes. Of course. Yeah, we have nothing like that and I wouldn't be convinced we need it here since foreach (MyEnum::cases() as $case) { is both sufficient and more expressive.
 
6:07 PM
@Sara Wel, that's what the RFC suggests.
 
6:21 PM
@NikiC What's the reasoning?
 
anyone know if this was ever true? it doesn't appear to be on any of the copies I have installed:
> Autoloading is not available if using PHP in CLI interactive mode.
- https://www.php.net/manual/en/language.oop5.autoload.php
php -a
Interactive mode enabled

php > spl_autoload_register(function($c) { echo "Autoloading $c"; eval("class $c{}"); });
php > $a = new Foo;
Autoloading Foo
php > var_dump($a);
object(Foo)#2 (0) {
}
 
I can't imagine why it would be true.
Nice autoloader btw ;)
 
lean code
no inheritance, no public methods to test, just nice, empty classes :P
huh, it appears to once upon a time have been true: bugs.php.net/bug.php?id=40775
 
6:41 PM
@IMSoP PHP 5.2, though. PHP 5.3 is considered by many to be one of the big epochs :)
 
yeah, I'm going to get rid of that note from the docs
it worked at least as far back as 5.6, which is the oldest I can easily install
 
6:53 PM
that took longer than it should have done; man, WSL 2 is slow at accessing host disks!
 
@IMSoP Yeah slow A.F. Highly recommend mounting it on the linux disk
 
@IMSoP Fixed at least as far back as PHP 5.4.
 
 
2 hours later…
9:05 PM
You had a list of PHP resources to learn from. Where can I find this list?
 
Yeah, but there was another one if I remember correctly
 
9:22 PM
phptherightway ?
 
I think there were YT llinks
 
9:41 PM
jellow
 
jink
 
Bonk.
 
@Dharman stackoverflow.com/questions/16356420/…? (Which is linked from the tutorials page :P)
 
Yeah, that was it. Thanks
 
9:58 PM
Hi @Tiffany how's the job?
Do you like it?
 
@samayo still love it, yes :P it's challenging and I'm learning, they're patient with me.
 
good to know
i'm happy for you
 
@NikiC i don't think DOMImplementation::createDocument $qualifiedName should accept null
 
@beberlei Thanks
 
10:15 PM
Incident on 2021-02-11 22:15 UTC
Incident on 2021-02-11 22:15 UTC ・ GitHub Pages has Partial Outage
Incident on 2021-02-11 22:15 UTC
Incident on 2021-02-11 22:15 UTC ・ GitHub Pages has Partial Outage
Incident on 2021-02-11 22:15 UTC
Incident on 2021-02-11 22:15 UTC ・ GitHub Pages has Partial Outage
 
@Tiffany or are you patient with them? lol
 
@Jeeves chillax dude
 
10:49 PM
@mega6382 today, it's really feeling like the former. Trying to break a method that used a callback into something that uses a generator, and it's a real struggle for me to understand what I'm doing. Co-workers who I can ask questions ftw
 
11:07 PM
@Tiffany From the generic description, it's a pretty good use case for using generators. Good luck!
 
11:18 PM
Thanks :) coworker helped me figure it out, it does use a generator too :D
 
@NikiC If I'm going to do BidirectionalArrayIterator+ReverseIterator instead of a ReverseArrayIterator+ForwardArrayIterator, how would you suggest dealing with the handlers part? Extend internal iterator handlers to have end() and prev()?
And allow them to be NULL, I presume?
Or add another handler type and use a flag to distinguish what is there, inheritance C-style?
Or, just ignore it and hurt performance of end() (not very consequential) and prev() (more consequential)?
 
@samayo how's life for you?
 
11:48 PM
@MarkR This was posted on Reddit yesterday, which I found today: Why Namespacing Matters in Public Open Source Repositories.
It's more like namespacing in things like packagist than code, but they are related.
Pretty good read.
 
So apparently I managed to make something work, even by totally ignoring the AST bit
Which I now need to fix
For peeps interested: https://github.com/php/php-src/compare/master...Girgias:error-silence-exception-adding-try-catch-opcodes?expand=1
@IluTov @MarkR @bwoebi (the extend @ to suppress exceptions, can even do @<class_list>)
 

« first day (3771 days earlier)      last day (1176 days later) »