« first day (3570 days earlier)      last day (1361 days later) » 

1:05 AM
@DaveRandom no, yield from is its own opcode and does actually change the generator instance which is to be executed when continuing (or, for yield from array, handling it completely outside vm)
 
1:48 AM
"To learn to accept yourself, try farting in public, ideally a silent fart in a lift. It's wrong on so many levels." — @DaveRandom
I don't know why I linked to you
I'm too far gone
 
2:39 AM
ftr, I did not write that joke :-P I stole it from Stewart Francis, idk who he stole it from
 
 
6 hours later…
9:08 AM
@StatikStasis Am I too late? :P
 
9:34 AM
@LeviMorrison added the numbers, is my test setup correct? In the observer case, is the configure right to get the new code triggered? this is the scenario php-src clean + php-src with patch but no observer: github.com/php/php-src/pull/5857#issuecomment-663834291
 
9:50 AM
@Derick Do you commit php_xdebug.stub.php in Xdebug, don't you? I could only find the generated arginfo.h, but not the stub file itself.
 
10:04 AM
@PeeHaa just a bit
 
10:44 AM
@MátéKocsis hmm
@MátéKocsis I've forgotten to commit that file - thanks for pointing it out
It's also a generated file in my case though :-)
The following paths are ignored by one of your .gitignore files:
php_xdebug.stub.php
that was why
 
yeah *.php to avoid committing test generated stuff, this bites me regularly
 
11:10 AM
@PeeHaa a tad
 
11:51 AM
@Derick So meta ^^
@Derick I saw that some types are only defined in PHPDoc (e.g. void, mixed), and I guess that it's for compability with PHP 7.1 (?), however xdebug_var_dump() has mixed as a native parameter type. Is it intentional or just a small bug?
 
Why would that be a bug? The whole point is that it accepts everything
 
I thought that you have to be compatible with older PHP versions. But if it's not the case then I don't understand why the others are in PHPDoc :)
Either way, it's not a problem at all for me. :) The only reason why I had a look in Xdebug's repo was that I was curious how much effort it took for you to make it compatible with PHP 8. :)
 
How does SplFileObject compare to using fopen?
(I haven't checked the manual for SplFileObject yet, just came across the class on Reddit)
If the answer is just RTFM, then I'll go do that
 
@MátéKocsis All the tests work on PHP 7.2 and higher
 
I'm more or less curious because I've heard multiple times how terrible SPL is and I'm wondering if that class is bad and should be avoided
 
12:04 PM
@MátéKocsis Is it because it's ZEND_ARG_VARIADIC_TYPE_INFO ?
 
12:41 PM
@Tiffany the api of that class and the internals of it are very very bad.
it turns out that trying to abstract away a posix style filehandle into something similar but not quite the same is a bad idea.
 
@PeeHaa Check out this special (sort of cinematic) production I put together on my channel and let me know what you think. youtube.com/watch?v=dQw4w9WgXcQ
 
1:14 PM
@Danack harder to write clean code, or it does weird and unexpected things?
Or something else
 
 
1 hour later…
2:28 PM
Just re-watched this video from 2016- youtube.com/watch?v=ecIWPzGEbFc&t=74m45s (start time set for specific spot) Uncle Bob was right: bbc.com/news/business-50177788
 
3:07 PM
Here in the UK we had laws passed which basically ban security research... because the gov had no idea what they were doing
 
3:21 PM
@MarkR wat
 
3:36 PM
@Tiffany The anti-hacking laws were so badly written that most security researchers are breaking the law
 
3:49 PM
Sigh... not sure why I am racking my brain over this. I have a supply order system. I have some users who can only order for themselves. I have another group of users who are responsible for ordering for multiple locations. I am creating a table that will hold a list of users that is assigned to a group.
Any user who has the permission to place an order for multiple users/locations will have a drop down box of locations they can order for which populates from this table. What should I call this table other than... supply_order_multi_location_group_list ...thingy-whatsit
 
Based on common naming i'd read that as the multi location group list belongs to a supply order... In which case i'd be more inclined to have a 'locations' table as its own top-level entity and then a 'location_user_role' with one which includes ordering
 
We have regional managers who have the capability to order product for their assigned stores in their respective region. We have other "managers" who are responsible for ordering products for other locations (not stores, just departments.) I have a table where those assignments will take place. This table is just for creating those group names.
ex. region_1, region_22, etc.
In the sub table it will have:
0 | region_1 | store20
1 | region_1 | store34
2 | region_22 | accountspayable
 
4:12 PM
@DaveRandom I like it! Reminds me of something that would have came out in the 90s, along with albums by The Verve, Counting Crows, Blur, and Placebo.
I guess I will just go with supply_order_group
I have a mosquito in my office that I cannot find. It appears suddenly and by the time I see it and try to kill it, I cannot locate it. I've took my fan and tried pointing it at different areas of my office to see if I can force it to move out of hiding, to no avail.
 
4:47 PM
Just bring a house cat into your office...
It'll kill the mosquito for you, and provide stress-relief cuddles afterwards. Though it may also lay on your keyboard.
 
 
2 hours later…
7:03 PM
@MátéKocsis question about dom stubs, you added append/before etc with @var docblock for DOMNode|string - is there a reason this is not a union type?
 
> áé
wtf SO chat, butchering encodings...
Unless he changed his name in SO to that 😅
 
yeah something is broken
 
Seems to be only chat, going into SO main shows his name correctly
Odd
 
I completely missread that xD
Taken me the better part of 3 days but I finally installed security camera, wired it in myself, external cat5e PoE all the way to my switch rack \o/ task achieved
Just need to eventually find a time to rip up all the floorboards so I can run all the cables internally
 
7:27 PM
@beberlei Probably because until he worked on the OpenSSL resource to object conversion there was no way ZPP could handle a string|ClassName union
 
@MátéKocsis Your name was already slightly hard to pronounce. This is a bit too much.
 
@Girgias Glad you make it. I'll have a slide on my talks to talk about php-internals devs that ppl can sponsor :)
 
@Derick not as offensive as mktime ([ int $hour = date("H") [, int $minute = date("i") [, int $second = date("s") [, int $month = date("n") [, int $day = date("j") [, int $year = date("Y") [, int $is_dst = -1 ]]]]]]] )
(I know I'm replying to an ancient comment, but couldn't miss the chance to whine about how awful that function signature is!)
 
That one is really going to benefit from named args
 
oh, I hadn't actually thought of it that way around!
OTOH, it's probably going to need patching to work right, if it hasn't been tidied recently, because last I checked it does a whole bunch of magic with the internal equivalent of func_num_args
ah, looks like it has indeed been sorted, awesome!
 
7:42 PM
@PeeHaa About to stream!
 
I'd still like to slap whoever originated that signature with a wet fish, though; "please give me an integer representing precisely 13:59:28 in March; any year, any day, no worries"
 
@Girgias would $filename be this or $fileName naming convnetion wise?
 
my preference would be to treate "filename" as a single word, as with "timezone"
 
@beberlei aaaaaaaaaaaaaa, IDK, weirdly enough I would go with fileName, but maybe mention this on the issue github.com/php/php-tasks/issues/16
@GabrielCaruso Neat :D
 
random data point: Google n-grams shows "filename" overtaking "file name" in 1987 and never looking back: books.google.com/ngrams/…
thinking about it, should named params even be case sensitive?
or, are they already not and it's only error messages where it would matter?
I guess the question would still arise for snake case file_name vs filename though
 
7:59 PM
@beberlei I was also thinking about it earlier :) But it seemed to me that filename is also a valid word (based on a Google search). Can any native speaker second that?
 
@Girgias next q, camel case or snake case? :D
 
@Danack Hahaha :D I'll probably change my name to Mate Kocsis here so that you don't have to deal with the accents when pinging me.
 
YES PLEASE
 
@beberlei so if the function is snake_case it should be snake_case if the method/class is camelCase then it should be camelCase, IIRC what Nikita and @MátéKocsis came up with
 
snake case allll the way
 
8:04 PM
yes, Nikita had this idea. :)
 
Does the RFC force them all to lowercase (including reflection?)
 
@Derick Now I see that you defined IS_MIXED as 0 in src/lib/compat.h for PHP 7
 
@Girgias your snake / camel case rule breakes on things like simplexml, see github.com/php/php-src/blob/master/ext/simplexml/… it has functions that have $ns and $is_prefix and methods in camel case class. that would be rather incosistent to name it $isPrefix in half the API
 
@beberlei I mean I didn't think about this a lot, just telling you what seems to have been agreed upon D:
BTW, is there a super light weight CMS for just editing content, i.e. no need for comments?
 
8:20 PM
probably dumb idea: make parameter names not only case insensitive, but also "underscore insensitive"
like GMail addresses
 
ThW
hehe
 
@IMSoP reasonable suggestion
 
Not sure I'm personally a fan of that ._.
 
IMO universal snake_case avoids the problem entirely, case is irrelevant.
 
@MarkR you still need to decide what's one word and what's two, though
file_name vs filename etc etc
 
8:22 PM
Which API is that in again?
 
DOM
 
well, everywhere we have a filename as a parameter
 
@MarkR i am in DOM and simplexml at the moment with @ThW
cleainng up the names
 
I'd say dump it entirely and use $path ... our own SplFileInfo treats filename as just the post-directory portion
 
@Girgias but just think, then you could write $parts = explode(s__t__r__i__n__g: $input, delimiter: '__') :P
 
8:25 PM
@IMSoP reeeeeeeeeeeeeeeeeee
 
@IMSoP that could be made part of a unified number seperator
 
@beberlei Actually, the reason of putting it into only PHPDoc is that stub types has to be completely in line with the ZPP implementation, otherwise you get a "Arginfo / Zpp mismatch" error. But George is also right, I've just recently added support for the object-of-type + string ZPP, and Nikita added support for the object-of-type + any type in the stub generator.
 
@MátéKocsis will play with it then in the next days
 
Cool! Although those DOM methods use "+" in ZPP, so I'm not sure that the conversion is possible. :(
BTW I've already changed my name, but apparently stackoverflow's caches need to be cleared before it takes effect ^^
 
@MátéKocsis its fixed for me with the name
there are acents on the vowels though
how do you pronounce your name btw?
like "mate" in english?
 
Ma Tea? Could be British after all.
 
has the stub file generation script moved again?
 
You can listen to it. It's a bit weird pronounciation (too slow), but still accurate
 
cant find it
 
no, it's still ./build/gen_stub.php
 
8:36 PM
How am I supposed to sort an array by value first, and then by key
 
ta
 
@MátéKocsis Is it a soft t?
 
There is no function which gets key and value at once, right?
 
@IluTov Uh, no idea. :D But I pronounced my name in the Derick & Nikita show: phpinternals.news/44 (0:38)
 
Probably have to build an intermediary array and then do ($a['value'] <=> $b['value'] ?: $a['key'] <=> $b['key'])
 
8:39 PM
@bwoebi There's each but I'm not sure that's what you mean.
 
@MarkR yeah, that's what I was just thinking; but array_map doesn't get keys either, so I can't think of a one-liner to make the intermediate array
 
@MátéKocsis Ah I see. It sounds similar to the Croatian "Mate" except for the e.
(I'm half Croatian)
 
could always do the horribad way:

usort(array_keys($src), fn($a, $b) use ($src) => $src[$a] <=> $src[$b] ?: $a <=> $b);
... actually no that's nonsense, would still need the second step to pull the values back
 
bonus fun: PHP's sort functions are all by-ref, so you can't actually use them in one-liners :(
 
@IluTov Really? :) You guys have very exciting family history :) (George too)
Do you usually travel to Croatia?
Our flight to Paris has just been cancelled by the airlines, so we're considering to visit Croatia instead. My GF absolutely loves it, especially the northern parts (Istria). It would be my first time there though
 
8:46 PM
@MátéKocsis Yeah I've visited Croatia almost every year until I was like 20, we've actually planned to go this Summer before the whole Corona thing happened :/
 
@IluTov well, pre PHP 8.0 sorting is unstable and gives different results on versions if I first sort by key, then by value for example
 
@MátéKocsis My family is whack :')
 
i was in dubrovnik two years ago, what an amazing city
 
@MarkR yeah, guess will do that…
@MarkR also: you mean uksort($src, ...)
 
@MátéKocsis It's all lovely (but of course I'm a little biased :P). Sadly I haven't really even seen that much of it. We usually used to go visit family and stay at the same places. There's so much beautiful stuff to see.
 
8:48 PM
@beberlei You're a Berliner, right? I have German friends there, and I'm in love with the city :)
 
@MátéKocsis no Bonn, i cant stay longer than a few days in berlin, too crazy the city :D
 
@bwoebi we patched uksort to just return the constant ['England', 'Scotland', 'Wales']
.. or was that gbsort, one tends to forget
 
No northern Ireland?
 
@bwoebi ugly as sin, but: 3v4l.org/FMirS
 
@IMSoP wrong ping :D
 
8:51 PM
@beberlei oops, sorry
array_walk is the only way I can think of to work with keys and values in a functional way
 
@IMSoP yeah
 
the results of the dom/simplexml namings github.com/php/php-src/pull/5893
 
@beberlei :D Ah, Germany is so huge. BTW my most surreal experience in Germany was that after 12+ hours of train travel to Hamburg, my friends brought me directly to St. Pauli's night life. I remember that I felt a bit insecure there. :D So for me Berlin is calm place compared to that district ^^
 
have never been to st. pauli, but would be unconformtable myself
 
 
2 hours later…
10:31 PM
@beberlei Haven't checked yet; thanks for looking into benchmarks!
@DaveRandom It actually is handled differently
 
 
1 hour later…
11:38 PM
@MateKocsis I looked for that earlier, but couldn't find that ... but, yeah :-)
 

« first day (3570 days earlier)      last day (1361 days later) »