« first day (3456 days earlier)      last day (1475 days later) » 

12:31 AM
Can anybody who understands intl / money_format explain this difference to me: 3v4l.org/6MJmn ?
Maaaaybe @NikiC?
 
IIRC money_format is pretty buggy
The correct way is to have the currency sign in front
 
@Girgias Is it though
 
Altough most of the time none of us do it in writting
 
> The correct way is to have the currency sign in front
That very much depends on the locale
 
Well at least in British and American English it's in front
 
12:38 AM
Or I mistaken and you are a turk now? :P
@Girgias Yes, but you cannot generalize that (at all)
 
True
 
There are lots of locales that append it instead
Now if you would have said they are all monsters I would have agreed with you :P
 
Well in France it's after
 
Exactly
:D
 
And apparently with the French franc it was in the middle
In between the franc and the cents
 
12:41 AM
I think I even remember that
That deserves a special place in hell
 
Have you tried in an encoding other than UTF-8 for Intl?
Wondering if Intl just uses a common place for all UTF-8 things
But I don't actually know how the fuck that extension works so
 
Ascii will probably just replace it with text?1 sec
Nope. Nothing good
 
So apparently the CLDR Unicode database should have info about currency position cldr.unicode.org
And that should be consumed by ICU
So maybe it's something in the extension not using that info?
 
The design of that site is exactly what I expected :-)
 
In typical unicode fashion
 
1:34 AM
@PeeHaa How are things where you are?
 
2:32 AM
JonaTic ・ *General Issues ・ #79444
 
2:42 AM
@beberlei Yeah, being able to hook into curl directly would make it much easier...
 
3:18 AM
@PeeHaa I wish I could link you the authenticated portion of an eLearning site I used to deal with on occasion...
think early '00s HTML/CSS
bonus, it was buggy and it frustrated students and faculty
 
 
2 hours later…
5:21 AM
Hi anyone in here?
 
 
1 hour later…
6:42 AM
No
morning
\o
 
cmb
o/
 
7:07 AM
any chance either of you are fairly confident with php / ajax?
 
7:18 AM
don't ask to ask - just ask
 
7:48 AM
Connection timed out when accessing website from github actions ・ Website problem ・ #79445
 
@Girgias Before people go hunting in code, did you check what CLDR does say on the topic?
Maybe it's just correct? At least Wikipedia places the symbol before the amount for Turkish Lira.
 
 
1 hour later…
9:01 AM
        <currencyFormats numberSystem="latn">
            <currencyFormatLength>
                <currencyFormat type="standard">
                    <pattern>¤#,##0.00</pattern>
                </currencyFormat>
@Girgias That's tr_TR
in CLDR
 
 
2 hours later…
cmb
11:14 AM
@NikiC, re implementing __debugInfo() for SPL classes: master or 7.4?
 
12:05 PM
@StatikStasis As bad as you would expect from this country I guess :P
Although they seem to impose some lockdowns which is good
They just cannot be trusted for shit with numbers
 
@NikiC I didn't check because I went to bed, that's why I said maybe. And thanks @Derick for the info so it's money_format which is/was bugged
 
12:31 PM
@Girgias Or you don't have the tr_TR installed locally
 
I don't think I have any locales installed on this machine
 
then number_format should default to the C locale
erm, money_format
 
@Derick I have been trying to find where cldr got the information from, but I cannot seem to find the source
 
@cmb I'm fine with 7.4, at least I don't see a BC break in adding those methods
 
Any idea where I can find where they got it from?
 
12:40 PM
No idea, sorry.
 
Thanks anyway
 
anyone know if it's possible to setup PHPUnit so that if you have a @ covers annotation, and the test doesn't actually provide any coverage for that, it gives an error?
aka guess who just found out that they have some errors in their covers annotations.
 
Drop the annotations and have faith in the coverage generator? :)
What specific thing do you need to manually tag as covered?
 
@PeeHaa nope. Strongly prefer having explicit coverage only.... github.com/Danack/coding-standard/blob/master/lib/Danack/Sniffs/…
So the problem is that I really hate having accidental coverage. Figuring out what is covered by unit tests is bad enough anyway, and having stuff be accidentally covered makes it really hard to find what needs more testing.
 
Doesn't mutation testing help you with that at least?
 
12:46 PM
Having coversNothing for all test suites, and then explicitly saying this unit test covers this class makes it much easier to be confident about hwat is being tested.
 
class or methods?
 
I think the code is a little different from normal. A lot of the classes are 'rules', that get fed into a 'rules processor'. I want to completely isolate the testing of the 'rules processor' from the accidentally coverage generated when running tests on the 'rules'.
 
ah I see
I tend to go for specific test suites in that case
 
/**
 * @coversNothing
 */
class MinIntValueTest extends BaseTestCase {

    /**
     * @dataProvider provideMinIntValueCases
     * @covers \Params\ProcessRule\TypoGoesHereValue
     */
    public function testValidation(int $minValue, string $inputValue, bool $expectError) {...}
}
@PeeHaa yeah.....so do I. But I just realised that some of the test suites have the wrong covers annotations....and was thinking "this is got to be a common thing does PHPUnit have a way of erroring on that."
hal_changing_a_lightbulb.mp4
 
Seems like it should be able to that yeah
 
12:56 PM
@SebastianBergmann Apologies in advance if I've misread the docs. It currently doesn't appear possible to configure PHPUnit to give a warning if: i) A test has a covers annotation ii) The test doesn't provide any matching coverage. The use-case for that warning would be detecting typos in the covers annotations. Would you be open to a PR that implemented that?
Maybe only appropriate for per-test covers annotations, not for covers on a whole test class.
 
1:27 PM
@MátéKocsis Hm, the default value thing is a lot harder than I expected
 
cmb
 
@cmb could be
I changed code in that area recently
 
cmb
that happens only with the default param values in arginfo
 
ah
 
Wow
@NikiC Yeah, I see :/ But do you still see the benefit of having it, right?
 
1:36 PM
@NikiC I think I'll reuse your idea to check the argnum for INI settings and emit a warning so that all the INI settings emit warnings
(in MBString *)
 
@MátéKocsis I do, just not sure how to move forward
Though I guess what you have + more upfront resolution is already fine
I had hoped we wouldn't have to do the compile into a constant expression and evaluate that dance
Though actually, even that probably won't work with unqualified constant references in a namespace
because we love the namespace info in the string representation
 
I'll add more tests (already started)
and what about just having this for internal functions?
 
@MátéKocsis Hm... well for userland functions we fetch the value from RECV anyway, so we only do the evaluation for internal functions in the first place
In which case we could just require that the default values in internal arginfo are always fully resolved (no unqualified names, no self)
Would that work?
 
@NikiC Yes, this was my idea, too!
And regarding your first sentence (maybe my memory is not good), but for ReflectionParameter::getDefaultValueConstantName() we get the info from the arg info in both cases (at least the currently)
 
I maybe dumb but is there a point in still having the mb_ereg* functions?
 
1:53 PM
@Girgias Not really
 
cmb
hm, can't repro these crashes locally; shall have a closer look if they happen again
 
@NikiC should I add it to the deprecation list for PHP 8.0?
 
@Girgias No, that would be a separate proposal :)
 
Welp ... I suppose I can start writing that
 
@cmb Have you thought about using GitHub Actions instead of AppVayor?
 
cmb
1:56 PM
a co-worker is working on AzurePipelines support; might be sponsored by MSFT
not sure if that'll be for CI (currently not), but would rather wait for it
 
I would love to just get rid of it in PHP 8 cause that whole code is all tangled up and messy u.u
 
niice :)
@cmb and just one more question: I really miss the benchmarks that Intel did some years ago :D Do you know what happened with those?
 
cmb
I faintly remember some talk about that on @internals, but no details.
@MátéKocsis ^
 
Wait Intel did some benchmarks ???
 
@cmb thank you! :)
 
cmb
 
ah, you were faster :)
it looks much better here: news-web.php.net/php.internals/89843
I remember that I was always looking forward to these reports
 
There still seems to be the config for PHP 01.org/node/3774
 
@MátéKocsis This is a good example of something that i) doesn't need to be sent to internals all the time ii) needs to be archived and discoverable by people when they want to spend time looking at performance stuff...solving that type of communication need would be a good thing to do.
 
I'm not sure that project actually still runs
Seems like the last date for most is 30/05 but there is no year info
 
Good chance they might have become fed up of people telling them to stop spamming...
 
2:07 PM
@MátéKocsis I think you just volunteered to setup a benchmark server for PHP :P
I've recently had some fun setting up something similar for LLVM at llvm-compile-time-tracker.com/….
 
@NikiC uh, yours look really fancy!
 
@NikiC I've been thinking about this quite a bit. My gut instinct is that setting up a comms channel where people can push very specific info (in this case performance info) into it, and then allowing other people to join/subscribe to those channels would solve a lot of scaling communication problems the PHP project has.
I'm going to try to look at setting up matrix.org for something along those lines...
Because solving the communication problems of open source projects is a trivial thing that should only take a day or two.
 
If running benchmarks in the cloud is ok, then I could terraform a nice server, run a specified set of benchmarks, and kill the server :) Actually, this is what I already do with my DI benchmarks, so it could be reused for PHP
 
Huh thecodingmachine did a DI container?
 
yep! :)
and Symfony made many-many improvements because of this benchmarks, so I consider it a success ^^
 
2:16 PM
I still need to talk to David again if he's still up to sponsor me to work on PHP-src during the summer
Aye, that's always good
 
Initially they were in the bottom third (even though there weren't many compiled DIs that time), and now they manager to get to the top
Of course, mine is the no 1 XD :D But that's partly because I adopted some of the optimizations they did, so I regard Symfony as the winner ^^
 
Haha :p
 
@Girgias Will you do some kind of internship at them, or what?
 
Nah, I think would have been more a sort of stipend to work on warning to error conversions
Because when I met him in London back when the PHP UK conf was on, he told me it's a PITA to maintain the safe library because so many FALSE/NULL returns aren't documented properly
And fixing that in core is better/easier for them to maintain ^^
 
I agree. Although, the return types are now almost fully documented, yaay
 
2:24 PM
Do all the extensiosn have stubs actually?
I didn't follow that too much
 
yes, except for oci8 and pgsql!
I just don't care about them that much, and they would be too much work (they each have 100+ arg infos - so probably there's many more functions), so I stopped doing stubs :D
 
Wes
2:44 PM
\o
how you doing phpolks?
 
ayup Wes o/
 
It's alive
 
Wes
i know a bunch of people that actually got the virus. they are getting better now. fortunately i was practicing social distancing from way before all this happened
 
@Wes hey there. I'm not sure what an 'olk' is but I'll take it as a compliment.
 
Wes
:P
 
2:49 PM
@Wes how locked down is it where you are?
 
Wes
@Danack quite a lot. fourth or fifth most affected region. at some point last week my relatively small town looked like the end of the world, military trucks everywhere carrying dead people, police and soldiers patrolling the streets in post nuclear suits. honest that was truly scary. that's from when numbers went up quick and nobody was prepared
 
@Wes o/
 
Wes
that in particular went ahead for a couple of days, all day and nights. also trucks equipped with megaphones constantly remembering people not to get out of their homes
 
@Wes I have something like that too only worse
 
oh hey Wes is alive \o/
 
2:58 PM
It's the fucking mosque doing it
 
Wes
a mosque?
 
yes. Normally they already shout every other fucking hour. Now when they are finally done with their usual shouting they start shouting about corona. Ending with trying to pray corona away
There have been times when they were at it for 20 minutes non-stop
 
Wes
but like on the streets? shit that's awful
 
The fact that we are living right next to a mosque doesn't help
 
almost every neighbourhood has a few of them, so...
 
3:01 PM
Yeah it's hard to not live next to one :P
How are you doing business wise @Wes?
I'm assuming everything is basically on hold for you
 
Glad you don't have the coronavirus, Wes.
 
Wes
pretty bad, in the sense that everybody stopped doing what they were doing, me included
kinda good for me since i was a bit burnt out. but gotta start working soon again for the bills, hopefully
 
Yeah read that :(
Timing sucks especially for you if you want to start picking up stuff again
 
is it somehow posisble with macro magic to make zend_string_alloc/init pass the file+line from the place where its called and magically pass that to the allocator? i get annoyed by debug output showing me "memory leak in zend_string.h"
 
Wes
there are so many big companies that live day by day. one could wrongly assume that big companies have some financial margin for difficult periods but that's not always the case
 
3:13 PM
@PeeHaa got turned down a job because of it :/
 
Yeah it's a pretty bad time for that stuff :(
 
Wes
that's a problem especially for big companies, if there is no money coming in a lot of people will lose their job all at once
 
We've a stay-at-home order for all non-essential workers in my state, if it's possible to work from home, we're supposed to. Anyone who works at a restaurant and stuff are basically laid off until the end of the month.
 
And people like us are the first one to go as we can easily be just let go
> until the end of the month (for now)
 
Wes
:(
 
3:16 PM
@PeeHaa let me hope :P
my birthday is the end of the month, and while I normally don't do anything anyway, it's still depressing
 
We would have gone to ukraine for mine. Instead we played fallout inside :P
 
lol
 
@Wes does italy have what other european countries have, that companies can let the state pay the salary and are sort of "unemployed" but keep their contract with their employee on hold?
@Tiffany i made a zoom party on my birthday, was fun and much more people could join than usually at my birthday :)
 
I need to start building momentum and working on projects again. I've been cleaning up at least.
@beberlei that's a neat idea... maybe I'll do that
 
make sure to clarify everyone has to bring their own drinks :p
 
3:20 PM
Undefined symbols for architecture x86_64:
  "_curl_mime_addpart", referenced from:
      __php_curl_setopt in interface.o
$ nm /usr/local/Cellar/curl/7.67.0/lib/libcurl.dylib  | grep curl_mime_addpart
0000000000038eed T _curl_mime_addpart
...
 
@beberlei don't tell me you had people who expected drinks... over the internet...
 
I asked one of the meetup groups that I sometimes go to "So exactly how will the free pizza work this month?"
 
Wes
yes, but depending on where you live that can be insufficient even for basic needs @beberlei
 
not to be a party pooper but zoom seems to have a lot of privacy issues and security flaws on mac (like accessing your webcam/mic). I don't use it or a mac for that matter but if you care about this kind of issues, it may be worth looking at it
 
3:25 PM
they announced today they will fix or already fixed the issues and work more on privacy in the next 90 days.
 
that's a good step
 
Wes
tl;dr new and upcoming features in php? i am some months behind :P
 
@Wes the big one was union types.....but for some reason people seem to have more time to work on stuff now...
 
@Wes There is a podcast for that ;-)
 
Attributes (maybe)
 
3:39 PM
@SebastianBergmann similar, but the other way round. That warns on code that is run that isn't listed as covered. The problem I just realised I had was covers annotation but that code isn't actually covered in the test.
 
I guess cats can contract COVID from humans, and can transmit it between themselves 😒 which would suck if I catch it because kitty cuddles help while sick
 
4:04 PM
@Girgias Did you break this? xdebug.org/ci?r=2020-02-02-03-30-01@master-zts ;-)
@Tiffany cats can't be infected
(nor dogs, for that matter)
 
@Derick maybe? the links for the tests files are borked so I can't check them :|
 
oh
change the . to a / behind base to fix that
But it's just a change in the error message
 
But no thoses would have been @MátéKocsis because he improved the error messages :p
 
"improved"
 
Welll
Subjective
 
4:13 PM
@Derick The other day I faced this message at work, and didn't understand at first what's going on.. So I thought that this change will help
 
by... removing the $ and adding a : ?
 
by adding the $
It was very unnatural to see a variable without the $ sign, so I was uncertain if it is really a variable
 
The : was remove too @Derick
Old is "Undefined variable: b" new is "Undefined variable $b"
 
yes, but that's just an additional improvement in the sake of consistency, asked by Nikita ^^
 
Wes
@Derick i was listening to them regularly at some point, but now i am far behind :D
 
4:17 PM
oh, read the diff the other way around
 
Wes
gotta figure out preloading yet. i have to be honest i read the rfc back in the day but i couldn't understand a thing :B
 
@Derick read a couple news articles, one where a cat in Belgium supposedly contracted it from the cat's owner. They haven't officially tested the cat for COVID, but they ruled out other possibilities. Another article where China tested transmitting the virus between cats...
 
I see ZEND_INIT_MODULE_GLOBALS called in MINIT in other exts, but if GINIT is a thing, why don't we do it there?
 
@Derick dogs can't get infected though
 
The more I look into the mbstring extension
The more I want to deprecate half of it
All the mb_ereg_search* functions are just weird, I'm not sure what the point of mb_send_mail is, mb_encode/decode_mimeheader apparently does some weird stuff reading at the doc notes and most people recommend using the iconv variant or just the imap extension
 
cmb
4:35 PM
@LeviMorrison MINIT is called once per process, GINIT once per thread.
@Girgias the iconv variant isn't "nice", and imap has to be removed.
 
Welp
Everything sucks then :(
 
cmb
it's getting better :)
 
sings "Everything is broken! Everything just sucks when you use this repo. Everything is broken..." /sings
 
static PHP_MINIT_FUNCTION(pib)
{
    Dl_info infos;

    PRINT("PHP extension is starting up");

    /* Register our zend_extension part, and give it our own PHP extension handle */
    zend_register_extension(&zend_extension_entry, pib_module_entry.handle);

    /* Prevent the engine from unloading our PHP extension */
    pib_module_entry.handle = NULL;

    return SUCCESS;
}
Wait... that Dl_info is never used -- I'm guessing it should be somehow?
 
Wes
so preload is just a run-once on server startup file?
 
4:39 PM
Maybe something like this?
dladdr(ZEND_MODULE_STARTUP_N(pib), &infos);
dlopen(infos.dli_fname, 0);
 
@Wes Correct.
 
Wes
ok, well that was actually straighforward. i was wrongly assuming there was much more into it
 
Is preload in the docs yet?
 
@Crell brave of you to assume the docs are up to date
But there are some hints of it I think
 
I know they're not; I just wrote the docs for __serialize/__unserialize. :-)
 
4:42 PM
Try to look by going to the PHP 7.4 migration page
 
Wes
but how does one use preload with third parties also wanting to use preload? like one of my dependencies has one preload file, and i want to have my own file as well
 
@Wes It's one per server. It's basically useless on shared hosting.
But if your app is on a container where it's the only PHP running, it's pretty sweet.
@Girgias Ha. It's mentioned in passing in the opcache section of the migration guide, and otherwise nothing.
/me may have to look into that next if he has time.
I'm not sure where that should go, though.
 
Well, in the Opcache extension doc I suppose?
do we have something like that
 
Wes
ok got that. what i meant is, each package has to build its root level preload file manually. e.g.

<?php // _preload.php

foreach(glob(__DIR__ . "/vendor/*/*/_preload.php") as $file){
    require($file);
}
 
Seems kind of out of the way.
 
Wes
4:46 PM
or is there something better than doing that?
 
@Wes Individual packages should probably not have preload files. It's an application level concern.
 
Wes
seems wrong having to preload third parties
 
"Preload all of vendor" is probably the most common thing people will do.
 
Wes
because clearly i don't just want to preload my own code, but also [insert giant framework name]
 
Right. The usage patterns of what is a commonly used file vs not will vary app to app.
Symfony FW now auto-generates a preload file for you that you can use that preloads, um, most things. But the individual packages do nothing. That's not their job.
 
Wes
4:49 PM
i am doubtful on the fact that we have to peek into other people's filesystem, which is subject to change, etc, in order to achieve that
that's what i meant, each package should provide its own preload file, and maybe composer should put them together automatically
 
That assumes "preload everything" is the right strategy. That may not be the case.
There's been a fair bit of benchmarking (there's a thread in the composer repo somewhere), and there is a memory tradeoff to preloading too much.
And the composer team has openly disavowed any responsibility to figure out what is "right".
 
Wes
that makes sense
if i was allowed to use composer's autoload from within the preload file, that would be awesome
like, "preload me class X\A\B\C regardless of where it is stored" (that is, resolve it according to the package's composer.json file) rather than having me doing opcache_compile_file("vendor/x/a/b/c.php") manually
that's probably easy to implement
although not so easy to resolve parent classes etc. which probably you want to preload as well
 
@Wes dump autoload config into optimized form using Composer and access the map with all className => fiePath entries then you can preload all or selectively
 
Wes
something like that, yeah
 
cmb
5:13 PM
@Wes you even have to
 
Wes
do i have to preload all the class hierarchy, or?
 
Yes.
If you preload class B, but not its parent class A, the preloader just throws out class B as incomplete.
My demo code for preloading to date has just traversed over vendor and preloaded all .php files. Which is probably suboptimal but works.
 
Wes
i see
 
Honestly, I expect the most common pattern to be just preloading all of vendor and src and calling it a day. Right or wrong, that's what I expect to happen.
 
Wes
what happens with files with executable code, not just definitions? e.g. if(CONFIG){ function bla(){} } else { function bla(){} }
 
5:25 PM
I'm not entirely sure, to be honest.
 
Wes
> Also, only top-level entities that are not nested within control structures (e.g. if()…) may be preloaded.
 
Is that in the RFC?
 
Wes
yep
 
Well, there's the answer then. :-)
 
6:23 PM
I originally preloaded all of /src and /vendor but the memory footprint was excessive, so I moved to just doing /src and everything included during some basic profiling
 
Wes
7:18 PM
ideally the root should be able to tell whether they want a package preloaded or not
and of course there should be only small packages, no frameworks
 
7:31 PM
Wes
 
Wes
8:00 PM
user123456789
nice nick btw
 
Good afternoon everyone.
I have a problem with my server's FTP, as it only works as follows (prnt.sc/rrr96z)
How do I make this type of connection in PHP code?
<?php
if ($_GET["acessar"] == "ok") {

	ini_set('display_errors',1);
	ini_set('display_startup_erros',1);
	error_reporting(E_ALL);

	$ftp_server		= $_GET['host_dominio'];
	$ftp_user_name	= $_GET['host_usuario'];
	$ftp_user_pass	= $_GET['host_senha'];
	$file 			= "instalador.php";
	$remote_file 	= "/public_html/index.php";

	// set up basic connection
	$conn_id = ftp_connect("srv1.aaaaa.com.br", "21", "10") or die("Could not connect");

	// login with username and password
	$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
Warning: ftp_login(): Login authentication failed
Does anyone know what I should modify in the above code, so that it works with this encryption, or without it (prnt.sc/rrr96z)
 
8:18 PM
Partial System Outage ・ API Requests has Major Outage ・ Notifications has Major Outage
 
fixit_remix.mp4
 
9:13 PM
Incident on 2020-04-02 20:20 UTC ・ Git Operations has Partial Outage ・ API Requests has Partial Outage ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ Notifications has Partial Outage ・ Gists has Partial Outage ・ GitHub Pages has Partial Outage
 
9:24 PM
@PeeHaa I refer you to John Jervis entering battle: "Enough, sir, no more of that; the die is cast, and if there are fifty sail I will go through them"
 
Yeah. I will fix that :D
Been meaning to do that for a while now
I still blame github :D
 
9:47 PM
8 messages moved to Trash can
 
Incident on 2020-04-02 20:20 UTC ・ API Requests has Partial Outage ・ Issues, PRs, Dashboard, Projects has Partial Outage ・ Notifications has Partial Outage ・ Gists has Partial Outage
Incident on 2020-04-02 20:20 UTC ・ API Requests has Partial Outage ・ Notifications has Partial Outage ・ Gists has Partial Outage
 
@jeeves don't troll peehaa.
 
Incident on 2020-04-02 20:20 UTC ・ Notifications has Partial Outage ・ Gists has Partial Outage
Incident on 2020-04-02 20:20 UTC ・ Gists has Partial Outage
Incident on 2020-04-02 20:20 UTC
Partial System Outage
All issues have been resolved!
 
\o/
 
:P
 

« first day (3456 days earlier)      last day (1475 days later) »