« first day (3666 days earlier)      last day (1267 days later) » 

12:16 AM
hides the stuff I was holding
 
12:28 AM
@Danack ...what were you holding...?
 
.....nothing.
 
¬_¬
@cmb out of curiosity, what happened to Sobak's fork?
for removing PHP 5
 
cmb
@Tiffany that has been already merged
 
ahhh, alright
thanks
 
12:45 AM
@salathe As promised: github.com/php/doc-en/pull/168 It will still need a few adjustments though (and I guess the phd dependencies to be finished).
 
1:01 AM
MTF
 
Jump to the top of the contributions list with this one simple trick :P
 
jeg skulle vær på sengs endå.... men whisky er for nydelig
@MarkR hva?
 
@Derick ௴᧞℥??
(Unicode other segment looks fun compart.com/en/unicode/category/So)
 
lolwat?
 
1:18 AM
TIL: reddit still has a version usable for mobiles reddit.com/r/PHP/comments/jj0hma/…
 
 
6 hours later…
7:26 AM
morns
 
morning
 
7:43 AM
Good morning.
 
8:27 AM
morning morning
 
Good Morning
 
Wes
how would you call a data structure/tool  that does this?
$data->set(["a", "b", "c"], "value");
assert(["a" => ["b" => ["c" => "value"]]] === $data->toArray());
 
9:08 AM
@Wes array values traversal push setter argument hydration :D
 
Wes
sound accurate enough
:B
 
Or A.V.T.P.S.A.H.
 
9:53 AM
Good morning folks! I have a bit of an issue: I compiled PHP with --enable-debug, and php -i also confirms that this is a debug build. However, when debugging with gdb it fails to load debug symbols:
(No debugging symbols found in /usr/local/Cellar/php@8.0-debug/8.0.0RC2/bin/php)
Do I have to tell gdb to read a symbol file somewhere?
 
10:06 AM
objdump also fails to list debug symbols, so I'm not quite sure what's going on here :|
 
Morning o/
 
Anybody knows whether anything happened to HTTP status codes with the CLI server? I'm seeing SG(sapi_headers).http_response_code not being set anymore, where in 7.4 it was "200".
ignore that, it's the streams location instead
 
10:24 AM
Morning
 
10:56 AM
morning
In an interview I was asked wee need for the security, and no one can steel the passwords how you can achieve that?
I refer to docs and I found the method password(pass) Is this the ideal answer?
 
password_hash
 
well
 
But "stealing" passwords is ambiguous. Password hashes can be stolen and be just as valuable
Because hashes can match across exposed databases
 
so to don't exposed my database...?
 
@PHPFan dude, this doesn't mean what you think it means. You say it all the time in acknowledgement, but it sounds ruder than you probably intend it.
In English, the impression I get from being told "well" by someone in response to an answer is "I got something wrong, and they're going to correct me" or "this person just completely dismissed my answer... okay..."
 
11:06 AM
what
Okay
alright
@Tiffany could I use an algorithm instead of password_hash?
 
@PHPFan put the database on a server that isn't exposed to the internet, make the root password 25+ characters long, restrict connections to the server and database by IP (though that's afaik, that's imperfect). There are many ways to harden security for a database.
@PHPFan you could, but it wouldn't be smart
password_hash is the most cryptographically secure way to store a password in PHP right now. It was formed by security analysts.
 
Okay
 
Nevermind, I'm wrong, bcrypt is still the default I guess
 
Oh boo, looks like Dmitry only broke this yesterday: news-web.php.net/php.internals/112141
 
@Derick you top-posted :P
 
11:21 AM
I did
 
@Derick This is a jit bug fix
Why are you inspecting $http_response_header instead of the stream metadata?
 
I didn't write the original code :-þ
@beberlei Did as a matter of fact.
So maybe he knows?
 
I need a good reference (youtube video, an article, or whatever) about DDD. I myself cannot find any good crash course .. do you know anything?
 
11:53 AM
@NikiC Thanks for that tip btw, that's indeed much cleaner :D
 
/home/nikic/php/php-src/ext/odbc/php_odbc.c: In function ‘zif_odbc_result_all’:
/home/nikic/php/php-src/ext/odbc/php_odbc.c:1999:70: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ {aka ‘long unsigned int’} [-Werror=format=]
 1999 |       php_error_docref(NULL, E_WARNING, "Cannot get data of column #%d (retcode %u)", i + 1, rc);
@cmb ^
 
the question is... does it work with PHP 5,3? (FML)
 
@Derick No idea ^^ I think the mechanism is pretty old, but don't know if it's that old
Also, how much are they paying you to do PHP 5.3 work? :P
 
@NikiC I've raised with my client many times that still supporting PHP 5 brings about twice the amount of work... @Gordon knows ;-)
 
@NikiC a fortune. but you'll never know. you declined my offers ;)
 
12:05 PM
well, the test is skipped for < 5.4, but it does work there, and it also does compile for 5.3.29 - so the answer is: yes
 
cmb
@NikiC thanks! Fixed with git.php.net/…
 
1:09 PM
Requesting sanity check: I have a function, inside the function there's an if statement, the contents of the if statement is an empty return. Like if (TRUE) { return; } - does the early return exit out of the function?
(it's not actually if (TRUE), but I used that for the sake of an easy example)
 
cmb
yes; that's called a guard
 
Thanks
 
but you'll have to write a unit test to be really sure. maybe cmb is wrong. humans are wrong all the time.
 
cmb
1:24 PM
A unit test certainly doesn't hurt; unless that is a legacy code base, and writing a unit test would take ages. ;)
 
It's legacy, unit tests are slowly being added to stuff, but most stuff I have to write test cases
A description of how QA can test the change... assuming I got it correct, lol
 
Is it intentional that anonymous classes "name" are (var_)dumped differently in PHP 8?
`var_dump(new class extends \stdClass{ });`
PHP < 8: `object(class@anonymous)#1`
PHP 8: `object(stdClass@anonymous)#1`
 
cmb
yes (github.com/php/php-src/blob/PHP-8.0/UPGRADING#L144); however, you shouldn't rely on any particular naming (php.net/manual/en/language.oop5.anonymous.php)
 
1:40 PM
Yes, of course, just that it breaks internal unit tests for Blackfire extension
I missed that change, but at least I know it is intentional now
thanks for the pointer!
 
1:53 PM
+ operator on arrays is documented as Union but it's not ・ Documentation problem ・ #80295
 
2:14 PM
I have a code which is common to both the functions getInfoById() & getInfoByParentType() and this contains common code before and after the another function call. I want to make both the functions dynamic.

https://imgur.com/a/Ndqe8Ed

Is there any way around this?

Note:

Common code written above the function calls is common in both the functions and same for code written below both the functions
 
    private function common(callable $c) {
        // Before stuff
       $c();
       // After stuff
    }

    public function getThingie($id) {
        return $this->common(function() use ($id) { ... };
    }
Something vaguely along those lines?
If the common code is just a line or two, though, you're probably better off just leaving it as is. A little redundancy is fine to avoid spaghetti.
 
Btw @cmb can I go and merge the removal PR? I think I have addressed everything but you may want to double check from last time :)
 
cmb
@Girgias you mean github.com/php/doc-en/pull/156? If you have addressed my comments, please "resolve conversation", and then I think it's good to be merged. :)
 
@cmb I've resolved those that I'm sure don't need another look, so currently it's short-tags/foreach and the error section wording :)
 
2:37 PM
@Crell yes, first part of the common code is mere two lines of code like debugging message and authorization check.
 
cmb
The only thing is the superflous error section for Closure::__construct() now. :)
 
I wouldn't bother then.
 
Jesus christ. When the job you took 3 months ago working with Laravel and Symfony tells you your project is on pause and now you have to work with Magento 1
 
scream.gif
 
We just had a huge security breach and now we put moving to Magento 2 on pause??
I don't know what to do
 
2:48 PM
That sucks
 
Wouldn't a security breach mean you want to move to M2 even more?
 
That's what I said
 
:-(
 
I didn't even work on the Magento side I was doing the microservices that would support it
 
I am getting an error with curl_setopt, saying that it wants a CurlHandle now - I am aware it got changed from resource to object, but why was setopt not updated as well?
 
2:51 PM
I had just upgraded all our microservices to PHP 7.4 and Laravel 8 which just came out last month
I just went from working with the latest technologies to.... Magento 1 lol
 
Odd, it is
 
cmb
@Derick if curl_setopt wants a CurlHandle, it obviously has been updated, hasn't it?
 
Yes, but my error says I'm passing a resource in, and I'm just using the retirn of curl_init ...
 
@Dharman can you double check this doc patch on the online editor: edit.php.net/?patch=en/reference/mysqli/mysqli/… as you've been working a bunch on mysqli
 
I think tehre is something different going on here
yes, my bad
 
2:55 PM
@Danack can you check this Imagick doc patch? edit.php.net/?patch=en/reference/imagick/imagick/…
 
cmb
@Derick make clean ?
 
@Girgias I have no account there
 
You can still open the patch normaly
 
@cmb No, my C-code calls curl_setopt
 
I'll validate it
 
2:56 PM
and gives it an object where it casts it to a resource
 
Ok, there is anonymous access
@Girgias I don't understand this patch. It just removes a single line from PHP Manual. It looks like vandalism. Why was it made and by whom?
 
It changes the return type of the function
And it's an anonymous user, which is why I'm filtering
 
Ahh I get it
Wait
Can we use a union type instead?
It's neither mixed nor int. It is int|string
 
Hello. please is it possible to increase the cache duration of a remote file ?
 
cmb
@Dharman that still should wait on github.com/php/phd/pull/30 :)
 
3:09 PM
@Dharman There is ongoing work, but if that's the case I'll axe the change
 
The src has a comment that states "Numbers that cannot be represented as a signed int are converted to a string instead (affects 32-bit builds)."
 
cmb
or just provide a PR with <type class="union"><type>int</type><type>string</type></type> and add the "union-types" label
 
I think if we are going to change mixed to union types then we should do it for everyting not for selected functions
 
cmb
I assume there are a lot of functions which do not even claim "mixed".
 
@LeviMorrison Nope. 7.x or GTFO.
 
3:15 PM
@Sara I'm pretty sure we're going to be supporting it until at least April 2022 >.<
 
Then God help ya.
/me runs off to check on a 4.3 app
 
No, not at all. I bet it was just missed
 
Hmm. composer self-update now seems to be going to 2 even without --2?
 
@cmb I seriously hope now that the IMAP tests works both on Windows and Nux >-<
 
3:20 PM
@LeviMorrison Yeap, had some problems with it as well here at the company legacy :(
 
> If you run composer self-update from 1.x, it will warn you that a new stable major version of Composer is available, and you can use composer self-update --2 to migrate to it.
Yeah, this isn't true.
I haven't had any problems, but it's not what I expected :/
 
cmb
I got a message that I should update, because if I postpone I'd go to v2. I did, and I went to v2.
 
@LeviMorrison lol, true. So why is it pushing to v2?
 
It working this way a few days ago. I wonder what changed?
 
cmb
3:27 PM
@Girgias yes, that would be nice :)
 
What a day... hope everyone else is having a good one so far! It's Friday Eve!
 
fml
This test case
 
3:55 PM
@Dharman Regarding the cursor issue, one big problem is that the cursor may be opened implicitly from the server side, if stored procedures are used
 
@NikiC I don't really think this is a problem. Have you got a concrete example?
 
@Dharman Most of the bugs seems to be about that case
It's not that people actually want to use cursors (usually), but that they're forced to ^^
 
Which is a very good reason to block get_result() in such cases instead of segfaulting
 
Sure
But it makes me wonder if there is some way to avoid it
 
It made me wonder too, but I can't see an easy way out
I'd appreciate a better solution
 
4:00 PM
As these cases just use cursors internally in the stored procedure, so there is really no good reason why they should leak across the connection
 
@Girgias looks about right: phpimagick.com/Imagick/getImageGeometry
@Wes setByKeys or by path...
 
4:38 PM
@Sara @cmb @Derick @NikiC (and everyone else that want to be involved) Folks, @heiglandreas Dragoonis, and I would love to talk with you about the documentation migration from SVN to Git. Can I send an invitation to your calendars with the agenda for a ~1h meeting?
 
4:50 PM
What do you want to talk about?
 
What is missing to do the transition. And if we could do that together with PHP 8.0's release in a couple of weeks. Andreas, Dragoonis and I are chatting right now at whereby.com/heiglandreas if you want to drop by
 
5:10 PM
 
5:21 PM
"famous" ha
 
You just jelly :P
 
cmb
shouldn't that be linked to from the PHP manual?
 
@bwoebi With MySQL 8, I'm getting "Could not connect to tcp://localhost:10101: #08004 Client does not support authentication protocol requested by server; consider upgrading MySQL client" with amphp/mysql. Looks like the default authentication method switched from mysql_native_password to caching_sha2_password.
I have no idea how to actually implement that, maybe you would be able to do that?
 
5:43 PM
Migration docs regarding foreach needs examples and clarification ・ Documentation problem ・ #80296
 
@PeeHaa Congrats on the celebrity status @Danack !
 
@PeeHaa where can I exchange this for cash money?
@LeviMorrison Mr Fakers blog post gives the reasons pretty well. The structure of the library is just fundamentally wrong in his opinion, and needs to be completely rethought. The author doesn't want to do that, and doesn't want to pass the library off to a wanker.
 
6:03 PM
Looks like he lagged.
 
Shitty robots is one of the few things that make me laugh so hard I end up in tears
 
Hypothetically speaking, if you're 10 weeks into your job with a company that looks great on a resume, then they tell you all of the sudden that you have to now work with Magento 1 for a couple months (at least), what would you guys do?
 
@Alesana start spending at least an hour a day looking for a new job. Then figure out what to do when I had some interviews lined up. By it's fine to tell future employers "I left that job as it was a bait and switch". though use a more flowery language than bait and switch.
Difficult conversations can be started with asking your manager for a one-to-one meeting and saying something like "what would you do if you started at a company, where you thought you were going to be working on one project, but then got moved to a different less attractive project."
 
@Trowski going to order more hot chocolate next paycheck, this stuff is amazing
 
@Danack Not a bad idea. Maybe I can ask them if I can work 20 hours a week until the project is started back up
 
6:17 PM
If you just say "i'm not happy", they can blow you off. If you ask them for advice on what they would do, most people (who aren't complete psychos) would respond better if they put themselves in your shoes first.
 
@Tiffany All the Ghirardelli stuff is delicious :-D
 
@Alesana As I said, I'd recommend doing at least a little job hunting first. And give your managers the opportunity to suggest a path to making you happy. While dropping your hours is fine to suggest if they have no ideas, they might have some. And people sometimes react weirdly to things like that.
 
@Trowski only criticism with the kind I ordered which has small chocolate chips - they leave residue at the bottom when I finish the mug 😬 going to the version without the chocolate chips next
 
Yeah, you have to stir that one up occasionally. You'll get some residue at the bottom with the other, but maybe not as much.
Real chocolate tends to fall out of solution as it cools.
 
yeah, kind of turns into a rich chocolate syrup at the bottom
 
6:26 PM
@Danack Yeah, that's true. That all sounds like a pretty good plan
 
@Alesana another small tip. Rather than phrasing it as "I don't want to work with shit tech", expressing it as "part of the renumeration for working here, is the experience I gain, and then can put on my resume. Working on Magento 1 alters that balance, and means my resume won't look as good in the future."
that's harder to refute/ignore than a programmer being a little bit precious about the tech choices.
 
6:51 PM
password_verify won't work with double quotes ・ *Encryption and hash functions ・ #80297
 
7:20 PM
@Gordon thanks
 
7:47 PM
php is ghastly
 
7:58 PM
It is a good reason to require {$var} instead of just $var, though. $ is going to be used in strings for a variety of reasons, and {$var} less so.
 
@LeviMorrison I would stick with {$var} for the extra safety
 
8:24 PM
You know it's good hot chocolate when you can see the bands in it when it settles, and you have to stir it to get it to be consistent again.
 
8:35 PM
hey @IluTov
 
8:55 PM
@Danack That is the real main reason I don't want to work there anymore. If Magento 1 was highly desired I'd have no issue clenching my teeth and getting through it
But Magento 1 would not just do nothing on a resume but it would actually hurt a resume to put it on there
Anyone heard of OpenLiteSpeed Web Server?
 
Please remove Traits ・ *General Issues ・ #80298
9
 
lol
 
upvotes
 
9:14 PM
Incident on 2020-10-29 21:13 UTC
Incident on 2020-10-29 21:13 UTC ・ Git Operations has Partial Outage
 
I'm not going to, but I am quite tempted to mark that as verified and "problem exists on all versions since 5.4.0"
 
9:26 PM
The comment on there says "i don't care for traits or namespaces at all"
Why are we grouping traits and namespaces together o.o
 
It's rh
Who knows
A dude who's been banned from commenting with his real email accounts so he gets around it with a nonsense email address because he just can't resist from commenting ..............
Said it before, I'll say it again, he's a cockwomble
 
who
 
let the dogs out?
 
9:47 PM
Whomst'd've let the dogs out?
 
lol
I remember that song
 
> I remember that song
 
10:03 PM
dat
 
@cmb Is it possible that there are quite a few refentry files are broken? I.e. if I open reference/pcre/functions/preg-replace-callback.xml, both PHPStorm and DOMDocument complains that it's not valid. The first issue I found is right after the methodsynopsis part: </para> doesn't have an opening tag. What kind of witchery is it?
 
lol
That is one of my favorite movies.
 
@cmb Ahh, never mind, sorry.. I messed up something with my script.
 
cmb
np :)
The new union types are rendered so nicely: docs.php.net/manual/en/function.mb-strpos.php
I hope php.net will update PhD automatically before the next build.
 
10:20 PM
@cmb lol. I was looking for something pretty, and was disappointed.
 
Ah!
The good old trusty intfalsemb_strpos() function!
 
@cmb Yay, that's great! :) I mean.. not how it looks now, but that there is union type support! Thank you!
Btw when do you plan to remove the "excessive whitespace"? :) Is there any prerequisite?
 
So I'm looking at Composition over Inheritance and I think I have a pretty good understanding of it as a concept in general but I'm still using inheritance alongside my composition
For example, I have different reports. For each report class there is a route and a controller. Each report class extends an abstract report class, and the abstract one has all the actual report generating functionality. The report classes define the name and the description, as well as the filters and formatters as classes
So I could have 1 ReportGenerator class and have each Report not extend any classes but just include the report data. So you would just pass a Report instance to the ReportGenerator
But then I am putting even more code in my controller, by instantiating the Report object, instantiating the ReportGenerator, and then passing it in. It's not much more work but it's more than just calling one method on a class. Is that still preferred over just having the report extend an abstract report class with all that functionality?
The issues that seem to come along with using inheritance wouldn't seem to apply in my case, but I might be missing something
 
cmb
10:36 PM
@MateKocsis f+
There are also the optional params in brackets, and the varargs
for the latter there are 3 competing PRs
but at least some work in progress
bracket removal might be an issue unless we have default values for all params
but whitespace removal is the least important for me
and sorry for the "premature" posting above :)
 
No problem. I had to dig it up what f+ means though in the Urban Dictionary :D
 
cmb
lol
 
And it was my guess as well that the proper default values are needed for removing the brackets, which is a prerequisite for removing the unnecessary whitespace. :)
 
Can we leave the brackets for only the cases that don't have a default?
 
Yeah, I'm also curious, because that's how I imagined it, too!
 
cmb
10:46 PM
Well, it's Phd; I guess "everything" is possible. :)
 
Ah, i almost forgot to tell you the reason why I asked the whitespace stuff: I'm a bit concerned about the length of a few function signatures... namely, github.com/php/php-src/blob/… or github.com/php/php-src/blob/…
 
All issues have been resolved!
 
Hmm, actually these functions already have a long signature. But long union types will make some functions much longer (like in case of openssl_csr_sign)
 
cmb
Yes, the signature length is an issue, but even removing the spaces won't help that much. Actually, I think this is more a general PHP issue: use fewer params, and have a shortcut notation for union types.
 
11:07 PM
something something _ex
 
Holy fuck
How is this still a thing
 
Very niiiiice.
 
11:34 PM
@PeeHaa Not only is it a thing but I know a very large entertainment company who would be blocked from upgrading if it was taken out :p
I actually had to learn what it was
I mean I knew what it was but I didn't know more than a very high level overview
 
Dec 23 '14 at 11:43, by DaveRandom
SOAP is literally the worst thing ever designed by anyone ever.
 
I totally agree. I myself haven't used it to wash my hands in at least 2 months
I usually go with rubbing alcohol these days
 
11:49 PM
@Alesana It's an easy upgrade though
The move to a proper constructor
@Alesana We do fucktonnes of soap
Although pretty fucking awful it's mostly the godawful implementation on the producer's side that's the problem. No matter the protocol/ format
 
We only use SOAP to interact with warehouses but I haven't actually looked too far into how it's implemented. I just don't like XML at all. To be honest I don't know why a better alternative to HTML hasn't been standardized
 
XML is great
 
Even worse, we have these things we call "flat files". Types are defined by schema, which defines a length for each field. So the file is just one field after another. If the field value goes over the length defined, it's cut short. If it goes under, it's padded with spaces
 
Sounds like EDI
Which is indeed a (non-)solution looking for a problem
 
Yeah looking it up it looks about right
 
11:56 PM
IMO all formats are "fine" as long as there is some schema involved
Which is why XML is just fiiiiiiine
 
XML seems chunky for no reason but I guess I haven't really seen tons of uses for it
 
It is verbose for sure
 

« first day (3666 days earlier)      last day (1267 days later) »