« first day (4255 days earlier)      last day (918 days later) » 

02:44
TIL I can explode inside an array key...
[$key, $deductibles[$key]] = preg_split('/  +/', $lines[$i]);
$details['deductible'][explode(' - ', $key)[1]] = $this->removeDollarSignAndCommaAndNormalizeToInt($deductibles[$key]);
03:22
Anyone here ever use Laravel nova
@Tiffany That is quite the two lines of code.
blame @iansltx
03:40
Psh, that's all you. This time. I've written similar, but not there :P

My example (https://3v4l.org/KqaHR) was tame by comparison
I didn't realise that you can rely on the order of variables being initialised in a list(..)
Now you know :)
Is this for a code test or something?
It's rather handy once in a blue moon
nah, just PDF parsing shenanigans
Ok, I'm going to go nn before I see any more code.
03:46
lol
 
3 hours later…
07:06
@Danack FWIW: The order changed between PHP 5 and PHP 7: github.com/php/php-src/blob/…
 
3 hours later…
10:06
@cmb Looks like we still bother with i386... and my new tests don't work with that :-)
cmb
cmb
@Derick then skip the tests on 32bit :)
yeah, but i will still need to test for that locally too
cmb
cmb
You could also have separate tests for 32bit and 64bit. Or maybe rewrite the tests in a way so they work for either architecture.
morns
cmb
cmb
As a last resort, you can use --EXPECTF-- with %r.
10:16
nope, can't pass in huge negative numbers which I need in this case. Screw 32bit here ;-)
cmb
cmb
We need to do something wrt. 32bit soonish anyway; either drop it, or something like github.com/php/php-src/issues/8016, or BigInts, or whatever.
@cmb "pull requests will be considered" ?
ugh, "Has the year 2038 problem (en.wikipedia.org/wiki/Year_2038_problem), e.g. in 2028 we'll start overflowing when computing dates 10 years in the future"
no.... not if you use the right API
cmb
cmb
10:34
@Derick Yes, but if you're using any of the "wrong" APIs, that problem is easily overlooked, until it strikes in production.
@Danack PRs would be fine, but I think that likely needs an RFC anyway.
that's why we have DateTime and DateTimeImmutable, since PHP 5.1
cmb
cmb
yeah, but many are still using timestamps, I suppose
sure, but that's their problem.
cmb
cmb
10:49
heh
@Derick Did you see news-web.php.net/php.cvs/120852? Is there anything to do?
@cmb I did see that, and have also already fixed it. My mail to php-cvs bounced I think.
cmb
cmb
Ah, okay then. :)
hmm, or so I thought
seems like I messed this up, so will fix again
@Derick Small nit: 8-bit representations; either s/bit/byte/ or s/8/64/.
cmb
cmb
Yeah. Otherwise we'd have a y1971 issue. :)
11:01
@TimWolla sure, whatev
11:32
hey @all, I recently took some PTO (ignored things with screens for two weeks) and on return tried working through backlog of emails, I gave up and deleted them all ... if anyone has tried to contact me in the last few weeks and didn't get a response, please try again ...
also o/
cmb
cmb
\o
11:52
I suppose when calling session_start I should call it with these params
does php calls fclose when the script dies if the file has been opened and not closed?
session_start([
    'cookie_httponly' => true,
    'cookie_secure' => true
]);
@VardanaBhanot yes.
That's a pretty standard thing most processes do, releasing all system resources when the program ends. (though in PHP it's done by the engine when the script ends, rather than OS cleaning everything up. I think.)
Does www.php.net have a new favicon?
12:08
Morning All!
Morgens
Good morning!
12:23
what do you usuall do when a user deletes his account...do you keep his data and just maek him as "deleted"?
A deletion is a deletion. All the data that is no longer needed (e.g. for legal reasons) will be gone.
when you say "All data" you mean also his/her name/email?
@DimitrisPapageorgiou Depends whether we need it for other purposes (e.g. billing) in which case you would hold on to it for a bit until you don't need it anymore after which you delete it all
Especially if the customer is EU based
@DimitrisPapageorgiou Everything that is not required for important other reasons (e.g. invoices need to be retained by law) will be deleted. That includes the email address and name, yes.
@Danack but like dosent the engine just frees up space the resource is taking in place of calling fclose?
12:39
Hein? To free up the ressource it needs to close the resource, the engine does not have access to the memory space where the file is as it's something attributed by the kernel. During the shutdown sequence the engine will release all resource by calling destructor functions to close resources, thus fclose
13:03
Morning
Im trying to find something that can parse MySQL's EXPLAIN output
13:32
I saw a rust lib that generate fake data base on the given regex pattern
for example: id-\d give id-2
is there a similar package in PHP ?
cmb
cmb
@Mwthreex maybe fakerphp.github.io
thanks
 
2 hours later…
15:27
@VardanaBhanot I hope your intent isn't to write code that expects this behavior? And instead, you're trying to determine the cause of a bug in current code?
16:24
@cmb Nice catch. I can prepare a patch to prepare for this constant removal on PHP8.0
cmb
cmb
@Pierrick I don't think we can remove these constants prior to PHP 9.0. But even worse, they're considering to actually change the constants.
@cmb actually looking at the current patch Daniel moved them to be an alias. So as of now we don't have to change anything but maybe setting some kine of warning if someone is uses one of those ? constants will still exists. For the future change when all slots will be taken I guess we'll have to wait for his final solution to handle this problem
cmb
cmb
@Pierrick Not quite; the PR as is would change the values, so the other constants would be the same as CURLPROTO_RTMP and CURLPROTO_RTMPTS, respectively.
@cmb Yes but do you see anything else we could do to handle this case ? My best guess is to detect that those constants were used in older versions and send a DEPRECATED saying that those constant will change behaviour in futur libcurl, and send some kind of warning in versions where the change is done to let the user know that the behaviour will not be as expected.
cmb
cmb
Yes, that's probably the best we could do. I wish, though, that those changes would never happen in upstream projects in minor versions.
16:40
Yep :-/ I guess at the time he created the project and this set of constants he never thought about supporting that much protocols ! I'll prepare the change and we'll merge when new libcurl will be released.
17:11
Book Recommendation: Think Again by Adam Grant. amazon.com/Think-Again-Power-Knowing-What/dp/B08HJQHNH9
cmb
cmb
Is it possible to configure PHP to get a stack backtrace on an E_NOTICE? Context: github.com/php/php-src/issues/8747
Does xdebug maybe dump the trace?
cmb
cmb
17:27
@PeeHaa ah, right, I think this is the case. Thanks!
\o/
17:50
\o/ x 100
18:41
I have fond memories of that time we trolled main with that Rebecca question. We should do something like that again some day
hey, a fellow French Canadian, hey there @Pierrick
@FĂ©lixAdriyelGagnon-Grenier Hey ;-)
 
1 hour later…
 
2 hours later…
22:25
this is a silly question and has been on my mind for some time, but what is the difference exactly between $_POST/$_GET and file_get_contents('php://input')?
I stumbled on some issue where xhr request is processed with php://input but not super globals

« first day (4255 days earlier)      last day (918 days later) »