« first day (3702 days earlier)      last day (1228 days later) » 

12:49 AM
Thanks! that's ok for me if only a subset of the files is merged
The script only didn't update the parameter name reference in this case because it couln't identify the extra parameter that the manualsynopsis has, but the stub doesn't. But neverheless, I'll double-check the descriptions next time. 🙂
 
 
5 hours later…
5:42 AM
morns
 
good morning + friday
 
Good Friday and morning.
 
6:27 AM
 
6:52 AM
mornings
 
7:14 AM
posted on December 04, 2020

 
 
1 hour later…
Wes
8:34 AM
\o
 
@Dharman Nope, there's too little to go on there
@cmb I'd stick with the current documentation approach
 
DateTime Object with 5-digit year can't unserialized ・ Date/time related ・ #80483
 
9:12 AM
Uh, anyone know where in configure the -O2 for release mode gets added?
Can't find it...
 
Wes
so this chrome api
they've been using the word "chrome" to refer both to chrome the software, and also to chrome as not headless
capital letter used inconsistently..... i hate having to poke stuff to understand how they work
 
9:28 AM
@NikiC I know where I turn it off for Xdebug :-D
@NikiC I think it's from a bulit-in macro: AC_PROG_CC([cc gcc])
 
@Derick oooh thanks
-O2 -g, such a weird default...
 
why weird?
 
@Derick Release builds with full debug symbols are unusual
You'd usually either do an unoptimized build with full debug symbols, or an optimized build with line tables only
 
I'm glad there are full debug symbols though, makes it a lot easier to debug stuff. Of course, these often get stripped off and for most distributions, placed in their own -dbg packages.
 
Wes
i.stack.imgur.com/u1c3d.gif BEHOLD AMPHP CHROME DEVTOOLS PROTOCOL
5
DP is for devtools protocol, in case you are wondering @DaveRandom
 
9:52 AM
@NikiC didn't -g only turn on minimalistic stuff like stabs and not full debug symbols? Enough to get a useful stacktrace, not enough for debugging.
 
@Wes that's pretty cool.
 
Wes
i like to reinvent wheels
 
10:10 AM
@cmb I am trying to figure out a bug, and I notice in the max_execution_time docs that it says "the time is not affected by system calls, stream operations, etc." — I thought that on Windows it does do wall time, not CPU time. Is that something that changed?
 
Hello guys,

sorry if I return back of this issue,
https://github.com/php/php-src/pull/3570
but seems also present in PHP 8.0
it's correct ? https://3v4l.org/4Yaoj

btw I isn't the user of the PR
 
cmb
@Derick manual is sloppy as usual; the note on php.net/manual/en/function.set-time-limit.php clarifies that Windows behaves differently
 
@Wes shiny
 
Wes
:D
 
are you packaging it up into a lib @Wes?
 
10:24 AM
@BruceStackOverFlow it looks bogus to me...
@BruceStackOverFlow though also, it's not clear if < is allowed inside attribute value - w3resource.com/xml/prohibited-character-literals.php
 
Wes
@DaveRandom yes
 
that says no, other things have said yes.
 
json_encode() without converting string to float ・ *General Issues ・ #80484
 
Wes
@Danack that depends on whether it's html or xml
html is more lenient and probably allows < and > in attributes
the whole html non-xml-compatible existence is a mystery
 
s/mystery/misery/
 
Wes
10:32 AM
also
 
Does anyone know a website that allows you to sketch a graph, that then suggests a formula that gives that result? I want a function that behaves a certain way for altering colours for a demo....and know what the function should look like.
 
Is it a polynomal, or something more complicated... cause I might have some code for that
 
So
1) We need to update the list of PHP BUG?
2) It's possible to fix, detect if XHTML so allow or if not convert to &?
 
@Wes sexy
 
But then again, it might just be better to do it by hand @Danack
 
10:38 AM
so, I can't draw for toffee with a mouse. That's meant to be three examples of different inputs, giving different results. I want to be able to control:
i) how wide the central peak is,
ii) at what height the line is when it gets to the edge of the range I care about (0-1).
 
this is such a good opportunity for a really long troll where I string it out and then just send a classic cock and balls picture at the end
 
@Danack a + (1-a)*exp(-x^2/c^2)
 
Dan? Only those two variables?
 
a is the value "at infinity", c is the "width". Value in 0 is always 1. It only breaks if your width is too large compared to the 1 range size.
 
@Derick I think so. I can clamp the output to be zero outside that range...but looks like @AndrasDeak knows maths....
 
10:42 AM
@AndrasDeak
 
@AndrasDeak you sound confident, so will give it a go.
 
Yeah, that checks out (played with Wolfram Alpha)
I would have done it with a sine though, not an exp
(as it guarantees to give a smooth transition towards x=1)
 
The drawing is that of a bell curve :)
 
like I said, classic cock and balls
 
But I also know that if I tried this to work, I would have spend hours on it to get it "just right" :-D
 
Wes
10:48 AM
@BruceStackOverFlow i'm not sure what the solution should be
html "enhanced sgml" to xml: xkcd.com/927
 
I think the solution should be that if you want to put special chars anywhere you use entities
it's not like it is going to have any meaningful impact on readability of any real world document
 
@DaveRandom Sure! the first simple solution. I agree
 
Wes
poopstorm's markdown editor is extra horrible. crashed like 50 times since i installed the EAP
 
First time I've heard it called that
 
Wes
it's poop falling from the sky
it's the markdown preview pane anyways, not the editor itself
 
11:05 AM
Ah, yes that thing is laggy AF
 
@Wes Filed a ticket with them?
 
Wes
nope, it's so utterly broken they probably noticed already :B
 
11:33 AM
just complain about the "pathetically broken" functionality ;)
 
11:49 AM
And then your ticket is closed as spam
 
happy friday people
 
12:28 PM
17 hours ago, by DaveRandom
ffs I have had "call me maybe" stuck in my head for like 3 days
it's still happening
 
smile.amazon.co.uk/NORTON-GAMERS-AMAZON-Devices-Activation/dp/… ... Norton Antivirus... For gamers! The reviews will be fun
@DaveRandom If your carly rae persists for more than 72 hours, consult a doctor.
 
Wes
@DaveRandom uptown girl, she's been living in her uptown world
i bet she's never had a backstreet guy
i bet her momma never told her why
that's like trying to get rid of an invasive species by introducing another invasive species
you are welcome
:B
 
@DaveRandom just listen to Incubus... or it's Friday, so you know..
 
12:58 PM
@Wes lol
 
Wes
that was evil is it :B
there have some mufasa youtube.com/watch?v=1AnG04qnLqI
it's a miracle that web browsers exist at all
 
1:26 PM
@Wes take it one step further: it's a miracle the internet exists at all
 
If the internet didn't exist, the porn industry would have found a way to make it exist.
Although chances are devs would now be hating on "Internet Sexplorer" instead :D
 
1:45 PM
reddit.com/r/PHP/comments/k6k2jp/dear_santa Lol, having differently sized integer types comes from Go, apparently.
 
Maybe they should just use a 64 bit int but do bit arithmetic so they can store 2 in at once.
 
cmb
"since the financial industry mostly uses 32-bit numbers including banks, e-commerce, ERPs" /o\
 
what if he's right, what if after 25 years and 8 versions, the thing that will win programming is php8bit !?
 
1 message moved to Trash can
@JoeWatkins how's it going? Did you get any interesting responses to your blog post about funding open source?
 
1:53 PM
Joe! You're here. I've been asking around for advice on electric piano recommendations, as I know you play I was hoping you might have some insight or wisdom you'd be willing to share.
 
@Danack a couple of echos of "but what about a foundation", from people who likely didn't read till the end ... so, not really ...
@MarkR casio AP-* if you're looking to waste some serious cash ...
I myself use thomann.de/es/thomann_dp_95_b.htm, which is cheap as chips, but sounds pretty awesome and is flexible enough ...
(mines white, black looks horrid)
that's mine
 
Do you find the key action pretty decent on the casios?
 
the description of these devices doesn't really do them justice, you could write ten pages and not cover everything it can do ...
some of them have adjustable weights ... I find so long as the keys are weighted, adjusting is not necessary, the hands will adjust if they respond like proper piano keys ...
 
I'm hoping i'll get to go somewhere I can try them but there's nowhere near Sheffield, nearest would be leeds I think
 
@NikiC Why am I not surprised to see sebastian/global-state on gist.github.com/nikic/9fd95866f9811b349b947f63214ad7a9? :-) What surprises me, though, is that it looks like part of that code is (still) duplicated in PHPUnit itself. Looks like I have some cleaning up to do. Thanks!
 
2:04 PM
@MarkR yeah I had to travel far and wide, in the end though I took a punt on thomann - I've bought other instruments from them, guitars, a violin, uke ... the casios are what I like to play on in shops because they are in the shops, but I'm glad I didn't waste the extra cash ... I can't recommend thomann enough ...
 
Was looking at gear4music recently because I've bought from them before gear4music.com/Keyboards-and-Pianos/…
 
Good morning and Happy Friday, all!
 
hey @joe ♩ ♪ ♫ nice to see you around
happy friday @StatikStasis!
 
it depends what you're looking for, the way the speakers are arranged is important ... the sensation that I'm sitting at a piano is important to me ... the arrangements with speakers facing the player deliver that sensation, the fact that the speakers make the wood vibrate like a piano also helps ... when I play on things that look like that, it feels like a keyboard ...
 
So you would recommend an upright vs a slab?
 
2:17 PM
for sure
@Ekin I'm around, quietly
 
Mkay, Ta Joe.
 
@JoeWatkins are you also doing okay out there, quietly? :-)
 
yeah
 
\o/
I've been preparing for a presentation for phpkonf which is next weekend... never have I felt this anxious :-P
 
2:36 PM
@Ekin I believe you were going to send slides for suggestions of improvements?
 
Yep, I will do that over the weekend. Through the work week it's been hard to find time for it :-(
... which adds to my tension as it's getting closer and closer
 
<b>Warning</b>: exif_read_data(php16A6.tmp): Process tag(x0000=UndefinedTag) ・ EXIF related ・ #80485
 
cmb
@Jeeves sigh
 
@Ekin I miss everyone! I feel I have been swamped all day, everyday and haven't been able to find as much time to come in here and goof off. Hopefully I'll have more time soon. //cc @PeeHaa
 
2:56 PM
@StatikStasis pretty much the same here, once things settle a bit we should do an Among Us run and catch up :-)
 
I've been watching Corpse and AOC play Among Us, I think I finally understand what it's about now \o/
 
@Crell You feel like announcing the enum RFC soon? I don't think major parts are going to change at this point.
 
@IluTov I was wondering when we should go public about it for realsies. :-) Do you feel the implementation is far enough along that we can confidently say "yes, what we propose is doable and has no implementation show stoppers"?
 
@Crell I would say so. I'm still not sure how easy the guaranteed singletonness is, this is the major missing part at this point. But even if we were to solve it some other way (like through modifying === comparison) nothing would change for the user.
 
@IluTov OK. If you're comfortable with it I'll toss it out to the list later today. Although we should probably have a link to a PR in the RFC first, so whatever you've got, open the PR.
 
3:08 PM
@Crell Let me give it another read in a few hours, I'll create a PR and link it in the RFC. But disclaimer, it's still WIP.
 
We can say that, that's fine.
Let me know when I should pull the trigger.
 
@Crell Sure, give me 3 hours, I'm still working. I'll ping you here.
 
3:34 PM
I could use a hand here with some regex fu
How do I do the following regex101.com/r/j3cb2o/1 ?
Where is Bob when I need him :(
 
whats hurting @PeeHaa?
lookbehind needs to be fixed width.
 
I need to match all strings not prefix with either http:// or https://
@hakre Can I rewrite the thing somehow without lookbehind?
 
neh
Those are character classes
 
doh
 
3:39 PM
Right?
 
yeah
I was just happy it matched! :D
 
:D
 
@PeeHaa can the rest match or must it match not?
 
@hakre What do you mean by that?
 
cmb
@PeeHaa use parse_url() instead?
 
3:42 PM
@PeeHaa regex101.com/r/j3cb2o/4 that fine or not?
 
@cmb I need to find it inside some text
@hakre No :P
4 mins ago, by PeeHaa
I need to match all strings not prefix with either http:// or https://
 
@PeeHaa okay the rest must not match.
 
foo www.foo.com bar http://bar.www.com qux https://www.qux.com whatever
@hakre It's inside a string
 
Holy fuck
I feel stupid now
 
ermargahd
Yep that would also work \o/
@hakre Although I don't understand why not B and slash though :|
 
@cmb's idea is perhaps nicer, didn't know that alternation can make the lookbehind different sized.
 
@hakre Me neither \o/
 
@PeeHaa slash is for https?:// <- that slash and \b is word divider \B is not word divider and the class is negating.
 
3:48 PM
ah not word boundary
Thanks both <3
 
\b is actually not a character but somehow it's accepted in a character class :D
there is something to learn everyday.
 
@NikiC Should I squash all commits?
 
@Dharman nah
We didn't apply any changed to 7.3 right?
 
I don't think so
 
4:55 PM
Does "breakeven" mean "when the cost and revenue of a company are equal" ?
 
yes
"break" as in you are getting through the "barrier" of profitability
and "even" because that is often synonymous with equilibrium
 
ah I see .. thanks
 
5:08 PM
@DaveRandom One of my maths lectures in first year told us a story similar to that which happened at some prestigious maths conf
 
5:30 PM
@Crell github.com/php/php-src/compare/… I'm torn if we really need enum values. This can be implemented easily in userland. Adding support for multiple representation will be easier this way too. Only "downside" (which in my book is an upside) is that there is no coercion.
 
@IluTov That's mutually exclusive with the Swift-style primitive equivalent we have now, and frankly I'd prefer the Swift-style version. If you need multiple representations... write a method.
 
@Crell That's true. The main reasons I would prefer dropping it for this RFC is 1. less implementation complexity 2. less things to turn down the RFC for :)
 
@IluTov I think it's more likely it would be turned down for not having primitive equivalents than for having them.
 
@Crell I'm not sure, something like that can always be added, but likely never removed.
 
Yes, but I think Mark is correct that given PHP is a short-lived script, the most common cases of enums will still need to get dumped out to a DB or screen somewhere. And having a first-class supported primitive version is necessary for that.
 
5:39 PM
As per the RFC for Attributes in PHP 8, the syntax for it is suggested as
<<Attribute('foo')>>
class Example {}
But when I executed it 3v4l.org/XaAqs , it gave me parsing error. Why?
 
@Exception Because the syntax changed twice after the RFC passed. :-)
The syntax is now #[AttributeName('foo')]
 
ohh boy
is that documented anywhere/ agreed somewhere?
 
@Crell Why does it need to be first class? It just needs to be easy.
 
@Exception wiki.php.net/rfc/shorter_attribute_syntax_change was the RFC that changed it. php.net docs are, I think, a WIP. There's also my blog post on the topic from a few weeks ago: platform.sh/blog/2020/php-8-0-feature-focus-attributes
 
@Crell thanks for both links.
 
5:44 PM
First class is what makes it easy. It also makes it standardized.

As an enum author, I don't want to have to build the machinery myself for listing out and translating enums to primitives and vice versa, when it's going to be the same boilerplate over and over again.

As an enum user, I don't want some enums to have $case->asInt(), some $case->asString(), some $case->prim(), etc. I want a standard and reliable way to work with their primitive version.
 
6:21 PM
@Crell Well I intentionally made the example dynamic so it can be added to a trait. Traits just don't work yet :P
I get your point. I don't necessarily disagree from the users perspective.
 
@cmb FYI I can reproduce that. bugs.php.net/bug.php?id=79163 It's only happening on Windows CLI though.
 
cmb
@Dharman I certainly tested this on Windows CLI. Which DB/version did you use?
 
10.4.13-MariaDB
PHP 7.4.11 (cli) (built: Sep 29 2020 13:18:06) ( ZTS Visual C++ 2017 x64 )
But it's the same on PHP 8.0
But it has got nothing to do with EXISTS in particular.
 
cmb
Is it, perhaps, MariaDB specific? I use MySQL 5.6 and 8.0 (I tested this with 5.6 only)
 
Why didn't I do this script earlier to make the update of EN revision tags earlier
 
6:33 PM
Let me check with MySQL then
 
So fast to update a translation :o
 
Tested with MySQL 8.0.21 and the same happens. The problem is on PHP side. When running 2 Million iterations I got "Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 83886080 bytes)"
FWIW I was able to trim down the reproducible example.
 
7:00 PM
@Stephen fyi I just worked through the LDAP SSL thing with @JukEboX, turns out the option just doesn't work on windows, I'm going to report it as a bug and try to fix it over the weeked
work-around is to put CA cert file at C:\Program Files\Common Files\SSL\cert.pem, which is the default openssl search path
 
cmb
7:13 PM
... for x64 as of PHP 7.4.0
 
@cmb ?
I get the x64 but surely that's openssl rather than PHP with the default path
I would assume it's version independent for PHP, though possibly not
I haven't actually dug into it yet though, derived all of this from procmon
I assume it would be Program Files (x86) on 32-bit though
 
Undocumented backward incompatible change between 7.4.8 and 7.4.9 ・ Documentation problem ・ #80486
 
> php4fan at gmail dot com
 
@cmb I managed to reproduce it online: phpize.online/…
 
@Jeeves at least this time it's a semi-valid thing.
 
7:22 PM
Still tempted to nuke it:P
 
yeh I would argue that particular BC was broken with PHP 5.0.0 :-P
but it should probably still be documented
 
cmb
@DaveRandom it's our builds which are usually used; see windows.php.net/#news-2019-10-08-1
 
@cmb ah cool, that means it's probably fixable within php-src as well then
I need to build an AD server to test against before I go any further anyway, which I cba doing tonight
 
cmb
or in one of the libs (either openssl or ldap)
 
7:39 PM
my suspicion is the latter
should be a simple fix presumably, those options seem to be a 1:1 passthru from ldap->ssl
anyway, mañana :-P
 
Wes
\o
 
Wes
sugggggest repo name pls....... amp-chrome-dp, amp-cdp, amp-chrome-devtools-protocol, amp-chrome, amp-chromium
 
@DaveRandom It's spelled Monday
 
@Wes chramp
 
Wes
7:42 PM
chrampium
 
@Wes async-chrome-devtools
 
arnold
amp-bollocktastic-deliciousness
if you haven't got one by now I can't help
^ that's a name suggestion btw, as is this
 
Wes
github says thats an invalid name
 
it probably doesn't like the concept of deliciousness
 
Wes
despite wrapping the api is resulting a relatively simple task, testing the whole thing is going to take ages
although i just need to test integration style
 
7:53 PM
yeh I hear that, libdns has about 2% of the tests it should have
 
8:12 PM
btw has @JoeWatkins been around much lately? I miss that sexy beast
 
@cmb accepted all change requests, ready to ship ship ship? :D
 
And @fabor
 
cmb
@beberlei yes, good to ship! I can merge later; just amending another PR.
 
@Ekin Definitely!
 
good to know
 
Wes
8:41 PM
public function lol(?Bar $bar){
    $bar?->foo();
}

will this work?
 
I think so?
 
Wes
yes it will. thats noice
 
work = not explode.
 
Wes
pretty much
 
Wes
8:57 PM
:D
 
@Crell "If the enumeration has a primitive equivalent, the keys will be the corresponding primitive for each enumeration. If the enumeration is of type float, the keys will be rendered as strings. (So a primitive equivalent of 1.5 will result in a key of “1.5”.) " I'm scared of that behavior. 3v4l.org/ng9vE
Also just noticed that this is only different in PHP 8. Was that intentional?
 
Wes
i just realized i have no idea how to test amphp stuff in phpunit.... do i loop::run in the test method or something? edit: oh nice github.com/amphp/phpunit-util
 
@IluTov Well, that's exciting. I have no idea. It looks like a bug to me. I just figured that's what happens with float keys in arrays, so mimic that behavior.
 
9:19 PM
> label() could alternatively be implemented as a single method using a match:
Honestly that looks so much more readable to me.
The first example makes sure all values are handled at compile time. (assuming you're implementing an interface or adding the method as abstract to the enum).
But other than that I'd always prefer the latter. Psalm will certainly also be able to check that all values are handled.
 
In a simple case like returning one string, yeah, an Enum level method is probably easier. As noted, though, if there's more to it than just returning a single string (it can take parameters, recall) then it may make more sense to put a separate method in each case.
By design, either works.
 
@Crell I'm not sure, because you're also repeating the function signature for each case.
> * Is the case keyword necessary?
Can I remove that one? It is.
 
It's legal for a case to have methods not on the enum. The state machine example does that, for instance.
Engine level need?
 
@Crell Cases at this point are class level declarations, there can only be one unprefixed declaration and it makes no sense that that would be enum case declarations.
 
Gotcha. OK, will remove.
Gone.
 
9:27 PM
@Crell Yeah. I get that. It's cool but probably a little niche. Let's keep it for now. I've created a few more issues. I'll create the PR now and link it on the page.
@Crell It's linked. Feel free to announce it :)
 
9:52 PM
@IluTov woohoo! Will do so shortly.
I should probably finish putting the other RFC copy up before I do so... :-)
 
10:24 PM
@IluTov Should I go ahead and call the associable case "tagged enums" to avoid the ugly word?
 
@Crell Isn't the term tagged union?
 
Generally. I can reword it to use that if you're on board.
I just dislike "associable enums".
 
@Crell Sure, it's a more common term anyway.
 
10:53 PM
filed under things that don't really matter ..... "Under Discussion"
 
cmb
@IluTov yes, see 3v4l.org/ZLa7R and php.net/manual/en/migration80.incompatible.php (search for "precision")
 
@cmb Cool, thanks!
 
@cmb did you merge the attribute doc PR yet, or should I do it? Should probably have a look at the named argument page while I'm at it
 
cmb
nope, didn't merge yet; feel free to do :)
 
Will do then, it needs a change to doc-base right?
 
cmb
11:02 PM
yes, Ben posted a diff in the first comment
 
Okay will apply it at the same time :)
 
@IluTov Cool?
https://wiki.php.net/rfc/adts
https://wiki.php.net/rfc/tagged_unions
 
Wes
pogu

$target = yield $targets->createTarget("https://www.scientology.org/", NULL);
/** @var Target $target */
$session = yield $target->session();
/** @var Session $session */
$imageFormat = (new ImageCompressionFormatSet())->PNG();
$area = new Viewport(0, 0, 500, 500, 2);
$image = yield $session->page()->captureScreenshot($imageFormat, 100, $area);
wow this is coming out nicely
 
That looks much better than what I have seen a couple days ago
 
Wes
well this would be because this was started from a blank project :B
 
11:17 PM
:-)
 
Wes
i tried to make the old thing use amphp but that was a bad idea
completely different code
now onto page lifecycle events.... 'coz screenshot gets taken when the page isn't loaded yet
 
@IluTov Posted! Now I have to go grocery shopping. :-)
 
@Crell Great :) Thanks! See ya later.
 
Woo!
 
11:40 PM
What does get_class return on an enum value in your rfc ?
 
@beberlei I would expect the same as using ::class
 
@Girgias is there an example? I only saw like objects, but that would require them to be zend_class_entry
 
@beberlei Haven't seen an example, and I have no idea if what I said is what's happening, but that's the behaviour I would expect so that ::class and get_class() have the same semantics, which seems the most logical to me
 
@Girgias i agree it would, but that doesnt awser my question though ;)
 
indeed
Also the attributes docs have been merged, hopefully we'll be able to see them soon live :D
 
11:46 PM
Nice attempt at distraction ;)
 
welp I tried
 
@beberlei Yes, classes and cases are normal objects (tagged as enums/cases).
 
Wes
is there a way to know the name of the test method that is about to be executed in phpunit's setUp()?
 
enum Foo { case Bar; } echo get_class(Foo::Bar); -> Foo::Bar. This means, each case gets its own subclass. The name is the "EnumFQN::CaseName".
 
@IluTov thanks
@IluTov @Crell i like the rfx
 

« first day (3702 days earlier)      last day (1228 days later) »