« first day (3755 days earlier)      last day (1176 days later) » 

12:06 AM
Anyone ever just... forgot half their passwords? Like all at once. That happened to me today.
 
@MarkR Once when we were igniting the nuke. Funny story, though.
Half like half of a string or half of amount of passwords?
 
I woke up today and couldn't remember my laptop bitlocker password, my NAS encryption password... I could remember parts of them, but not others, or order. I just had to spend 6 hours brute forcing my NAS with a dictionary attack to get it back and the laptop TPM won't let me try anything other than a recovery key, which I always destroy :S
I'm only 34, if I'm getting memory loss that's terrifying.
 
Hm. I wouldn't expect someone could break my laptop pass in 6 hours. :/
 
Laptop is going to have to be reinstalled at this point. No way to get past the TPM
 
12:29 AM
night ....
 
12:47 AM
use lastpass @MarkR
 
I have keypass, I just don't store the device PWs on it.
 
Just use the same password for everything
If you still can't remember then make it the same as the username
 
:P
I usually don't have trouble with a handful of master passwords, but today was just like a switch.
 
It should come back after another night of sleep
 
Party night? Lot of the day before?
 
12:56 AM
Nope. Didn't get a lot of sleep but nothing terrible. I'll just have to keep an eye on it :S cognitive failure in my mid 30s would suck.
 
@BruceOverflow Constants are not affected by inheritance.
 
1:33 AM
@MarkR I have osteoarthritis and I'm a year younger...
also early onset dementia is a thing :/
 
@Tiffany :/
 
 
3 hours later…
4:13 AM
oh look, PHP at the top of /r/programmerhumor again
The meme isn't so bad but the comments... it's always the comments...
 
 
2 hours later…
5:57 AM
hello guys i would like some help. How do i select output based on the value choosen in select in php. i just want to match the varaible in php if case
 <select name="taskOption">
                        <option value="1">User</option>
                        <option value="2">Admin</option>
                    </select><br>
 
 
1 hour later…
6:58 AM
@Tpojka perfect
morning
 
7:16 AM
posted on January 26, 2021

 
7:36 AM
morns
 
Morning all! I just found this room from a recommendation of an addition support group for PHP-related issues.
 
mb_convert_encoding() throws ValueError unexpectedly ・ mbstring related ・ #80671
 
I have an uncaught exception I'm looking to handle. My wife takes exception to the count(hours) I spend coding and I just don't have a proper handler for this.
 
 
1 hour later…
9:02 AM
Looks like we're leaking the setting across requests?
 
9:15 AM
@cmb Probably not. I'll make sure to remove it for the next one.
 
cmb
9:34 AM
@NikiC oh, that is actually to be expected; gettext is generally leaking across requests; probably still a good idea to reset these settings
@Derick thanks!
 
10:30 AM
Hello, I'm trying to send an email to php-webmaster@lists.php.net

But I get this:

Sorry, only subscribers may post. If you are a subscriber, please forward this message to php-webmaster-owner@lists.php.net to get your new address included.

I believe I'm subscribed (I receive emails) and I already forwarded the message as asked by the error message.

Am I doing something wrong here?
 
DGF
Can you help me @DaveRandom pls or someone that knows this? I have a table products and the table ratings (of the products that has the foretign key of id_products...). I have something so that an "admin" can add/delete products but when I have a product that has at least 1 rating I can't delete the product....
I though of doing 2 querys in the delete, one for deleting all rating of that product first and one for deleting the product. But I feel you gonna say I should do it in 1 query ahah
 
@DGF lookup cascading foreign key constraints as opposed to restrict
 
10:46 AM
...though I would personally recommend 2 separate queries to do it explicitly, simply to avoid hidden magic
I don't like the idea of things being "implicitly deleted" :-S
 
DGF
@DaveRandom no problems of being too slow here?
(The other query you helped me you said I should do it in one because it was more efficient)
 
cmb
@beberlei, seems there is a feature request to have ext/tideways work with JIT: bugs.php.net/80608#1611658021
 
@Girgias You can now use the class entry generator in master ^^
 
 
2 hours later…
12:45 PM
Morning, all.
 
\o
 
@DGF it was inefficient because it was in a loop to display them, that's something that is executed a lot of times, very often. In this case you are deleting records - firstly, this is not something you typically do in a loop because you are usually only deleting one record at a time, and secondly an operation that happens much more rarely. I would rather add a few milliseconds to a very rare request to make it explicit
sometimes you want to optimise for speed, sometimes you want to optimise for minimising the possibility of making a mistake
imho, ymmv, etc etc
note that it is perfectly safe to use cascading deletes, and in this case it's probably harmless, the only argument I am making against it is that it's not obvious to someone who is unfamiliar with your application what will happen
I am not comfortable with that idea that the command delete $x will actually delete $y and $z as well without confirmation
@DaveRandom horribly structured sentence, sorry everyone
 
1:07 PM
@DaveRandom Narative Telephone?
 
the "what will happen" clause at the end of it hanging there looking dead
a sad afterthought to a sad sentence
 
But great cliffhanger.
 
idk it looks more like I have some concurrency issues in my brain, it's reminiscent of that classic "a programmer has a problem, he decides to solve it with threads, has problems. he 2 now" joke
 
:D
 
You've got two brain hemispheres, use them at the same time! But if you deadlock, you ded.
 
1:39 PM
 
@cmb thank you for making me aware
 
... I wish it was possible to remove all links to tizag.com from SO main ...
it's becoming the w3schools of now
 
I just checked their bit on php/date, and it's literally decade old information
 
@Derick Quite, I used them as resource in 2012/2013. Man, how is going recovering?
 
Pretty good, the plague is gone, but got a side of sinusitis.
 
1:58 PM
 
2:41 PM
@MateKocsis Nice :D
 
3:01 PM
@Derick did you get covid? :-/
 
yes :-(
 
urgh
how badly did it get you?
hope you don't suffer any permanent fuckery at least
I know a few people who have taken a long time to get taste/smell back but it seems to come back eventually
 
is there any way to get access to the name of the php fpm pool that a request is running in from a PHP extension?
 
is the name of the pool even recorded? I thought the section marker was basically just a delimiter, the name is essentially a comment
I may be wrong there though
 
it is part of the argument passed to the child process when executed
uhm, could i somehow get access to argv?! :D
 
3:09 PM
the pool name rather than the config file name where the pool is defined?
 
@beberlei you can get the pid of the executing process and then determine the name from looking up the process name
 
@Gordon currently building that, but it seems so complicated
 
f the name is passed I would have thought it would be available somewhere
in env or something
in fact in an extension you should just be able to get the raw command line of the worker surely?
 
yes i just realized that should be possible while typing out its in argv
 
might also be able to parse it from /proc/self/status
 
3:12 PM
@DaveRandom Worse than flu, but it doesn't seem like there is something permanent
I never had a sense of smell...
 
my misses lost her taste/smell on the very last day of her official isolation period, and that was when it was still 14 days
@Derick probably works in your favour in London
/runs away
 
It's handy in the tube, apparently. But it would be nice to smell something...
 
My childhood would have been a lot different if Covid was around back then.... Late night WWE RAW "Can ya smeeeeeelelelelelel... what the Rock... is cooking?" and the crowd just sits there ambivalent unable to smell a damn thing
 
if nature wanted you to keep all your senses it wouldn't have given you so many of them
 
I found myself developing additional senses as I grew older... now I have the senses I was born with, but also a sense of doom, a sense of insignificance, a sense of apathy, and many more!
Apparently some lucky people develop something called "a sense of humour", but I wouldn't know.
 
3:31 PM
urgh, my bedroom/office has become disgusting again
take your eye off the ball for a couple of days and it looks someone dropped a teenager on it from a great height
 
I hear that.
 
I suspect the lack of smell thing would probably be a bonus as well
 
3:42 PM
And you don't have taste anyway
 
have another slice of black pudding
 
wiki.php.net/rfc/any_all_on_iterable_straw_poll_namespace looks like it's coming down to either putting it in PHP\iterator or put it in global, but it's quite clear that nothing is going to come closer to a consensus other than \PHP\SubNS
 
4:14 PM
Which is exactly what we had proposed, no?
Though we'd excluded non-autoloadables...
 
We did. I still think it makes sense that as lot gets wrapped into objects as possible (just because it's what's easiest to use) but I admit that being able to polyfill individual functions has some strong merit to it.
If there's strong binding then absolutely, if we do PHP\JSON\Encoder for example all the flags should be directly attached PHP\JSON\Encoder::FORCE_OBJECT rather than \PHP\JSON\FORCE_OBJECT
Maybe our aim of ensuring it was tidy from the get-go was just too prescriptive for people to vote for?
 
I blame PHP's libertarian streak.
 
5:07 PM
Can someone grant villfa doc-fr karma?
 
cmb
@Girgias seems that Fabien already has full doc karma
 
Ah indeed
 
user7659542
5:34 PM
@CupOfJava seems like your summerhouse is located in my backyard
 
5:55 PM
!!blame PHP
Sigh... new Jeeves doesn't have this I guess @PeeHaa
 
@DaveRandom Please let me know when you decide to go with something.
 
o/. Can someone recommend a lib I can use to open up a background thread? (not parallel)
 
From a web request, you can't.
Unless we're describing different things.
 
cmb
6:11 PM
@Derick, git.php.net/… :)
 
6:36 PM
Be explicit about the order in which to call flush() and ob_flush() ・ Documentation problem ・ #80673
 
6:58 PM
poop();
flush();
wash(HANDS);
Bug Report: Missing call to wipe(); in toilet handler.
 
flush(); comes with a bidet(); subroutine so its fine :D
 
7:12 PM
@Jeeves Am I missing something here? What is vague or even "annoyingly vague" about this?
 
7:24 PM
just change "and" to "then" and the order becomes explicit
> "This means you will have to call both ob_flush() and flush() to flush the ob output buffers if you are using those."
> "This means you will have to call both ob_flush() *then* flush() to flush the ob output buffers if you are using those."
oh pffffft
 
DGF
7:46 PM
@DaveRandom Okay, got it, thanks for the help teacher! ahah
 
9:01 PM
Fiddling with code, I... must be having a brain fart because I can't see what's wrong: 3v4l.org/Tt1uH
Oh. Backslash was escaping the single quote.
Nevermind, ignore.
I'm guessing the answer is no, and I think I know the reason why, but I'm still curious. Is it possible to refer to a class inside a different class via string? rough example of what I want to do: 3v4l.org/edGbq
 
9:17 PM
3v4l.org/W0LTM - but only since 8.0...
before 8 you have to just pass the fully qualified class names around.
 
@cmb Heh, I do that every time! How odd
 
@Tiffany this might be instructional 3v4l.org/lsNK4 and @Danack's advice is quite helpful
 
@mega6382 this is kinda what's already being done, but wanted to see if I could improve it
Thanks @Danack @mega6382
 
any time :)
 
9:53 PM
PHP\iterable\ is ahead by a single vote at the moment per stv-results.theodorejb.me/php/….
 
10:08 PM
I still think PHP\iter is better to avoid confusion with the type keyword...
 
I don't mind either one as long as we end up with something under PHP\XX\any and not Spl\ or PoluteAllTheThings\ - My preference would be for the global functions over those messy NS's
 
Hey everyone! Final bit of Enums that Ilija and I are trying to sort out, and we want your help. Naming Things(tm).

There are:
* Cases with no matching int or string (or maybe someday object)
* Cases that do have a matching int or string
* Cases with an associated value (which varies per instance)
* Enums that consist only of the first kind of Case, and you can get a list of them.
* Enums that consist only of the second kind of Case, and you can get a list of them.
* Enums that consist of the first kind of Case OR the third kind of case.
 
Pure Enum / Scalar (Backed) Enum ... but I don't really understand why it's split into two, can enums have some cases which have scalars, and some in the same enum without?
 
No, that's not currently supported.
 
Thank christ for that. So why ask about the two different kinds of naming? I'd imagine I'd just call it a <Enum style name> Value.... e.g. Pure enum value, scalar enum value.
 
10:18 PM
Well, case type two has a ->value property. So it would be a scalar enum value value?
(Also, Ilija doesn't like scalar on the idea that someday we can expand it from int|string to other types.)
 
I guess I can see his point, but it's almost certainly going to happen anyway
 
(Of course, the one bit we're still not sure on is Naming Things(tm).)
 
Where'd you get "case" from anyhow? Swift?
 
Yes, but I think Ilija was using that keyword before I even got involved. :-) We needed a keyword there and that was already used in a similar fashion in switch, so we wouldn't need to add another keyword for it.
 
I wasn't entirely sure why you went down that route, the need for a keyword that is.
 
10:25 PM
Because the parsing is easier that way.
When in doubt, make the parser not hate you.
 
'pure' seems pretty reasonable for something without a backing value, I'd expect everyone would call the other kind scalar enums regardless of what it ends up being called.
a bound enum maybe? Because each case is bound to a particular value.
associated enum? ... backed enum?
 
Backed is an option we're considering. Bound would be more for case 3, I think. Right now those are tentatively called "Tagged Enums", as in tagged unions.
 
10:41 PM
What do you mean by "Cases with an associated value (which varies per instance)"
 
enum Maybe {
  case None;
  case Some($val); // This thing
}
 
Oh right, I'd call those "wtf are those horrible looking things" :-)
 
11:02 PM
We'll get there later. :-)
 

« first day (3755 days earlier)      last day (1176 days later) »