« first day (3745 days earlier)      last day (1186 days later) » 

12:08 AM
function var_strdump(mixed $var): string
{
    ob_start();
    var_dump($var);
    return ob_get_clean();
)
^also that
 
cmb
shouldn't that be function var_strdump(mixed $var, bool $return) ;)
 
lol
function var_strdump(mixed $var, bool $return = false) FTFY
 
First PR. \o/
I didn't update `debug_zval_dump` revision version because I noticed inconsistencies while testing on page examples.
Someone who already saw that function before (lol) should check.
 
@Tpojka yay, another convert :P
 
Was bored. Better to do something useful. :)
Also it was good choice to go over (part of) function list.
 
 
4 hours later…
Wes
4:02 AM
\o
 
 
1 hour later…
Wes
5:30 AM
adds to dictionary
SessionAwareConnection
 
 
4 hours later…
9:50 AM
@cmb shouldn't you close github.com/php/doc-en/pull/177 ?
... I pushed a branch to git.php.net >_> Can't we disable this? Also how do I remove it?
 
10:26 AM
The link of "use" Keyword in "List of Keywords" needs improvement. ・ Documentation problem ・ #80635
 
 
1 hour later…
cmb
11:31 AM
there are several external extensions "covered", so may make sense to keep it.
Can't you delete the remote branch?
 
@cmb I tried ` git push php --delete php/method-signature-section-update ` earlier and that didn't work
 
cmb
I've deleted that branch; maybe I have some additional karma due to being RM?
 
Maybe
 
 
2 hours later…
1:16 PM
Girgias for 8.1 RM?
 
So .....apparently the sea shanty revival is the responsibility of some people in my city - bristol247.com/culture/music/…
@Tiffany It's not great to volunteer people for work as it makes them feel bad. And he's got too much stuff to do in real life.
 
1:43 PM
@Tiffany Seems like a lot of hassle ngl D:
 
Should array functions examples be rewritten to use [] syntax?
 
Try to limit what you change, as translations need to update them
So if you write a new example, sure, but rewritting them is a bit eeeeeeh
 
I am writing change for array function are used PHP 8 (adding PHP 8 in list of versions/revisions). Just asking as for some next step.
 
Do it and that can been looked at in review
If you are changing the example anyway it's fine
If you're just changing the syntax I find it a bit more annoying
 
Ok, thanks. I am not changing examples for now.
I am asking of point of view of internals of using [] instead array() in examples, someday.
 
1:50 PM
@Tpojka the old ones still work....
 
That's why I am asking and not changing right away.
 
2:06 PM
For now I am testing functions through 3v4l and taking notes about (if any) slightly changes in PHP 8. Found it in array_fill so far.
 
2:36 PM
@Girgias It is.
 
@Derick Well moreso that you're alone
 
3:31 PM
@Tpojka debug_zval_dump is kind of broken since call-time-pass-by-reference was removed, so most of its manual page doesn't actually make sense
it should probably be replaced with a note like "before PHP 5.4, you could do clever things with this, but now it's kind of useless" :P
 
Thanks, I'm already explained by @cmb who linked some internal chat about report of the issue.
Doing that while adding version PHP 8 to pages.
Wrong edit.
I am now testing array functions and taking notes about differencies between docs description and actual behavior while adding version PHP 8 to pages.
 
cmb
@Tpojka make sure that you don't collide with Yoshinari (mumumu) who just submitted a few PRs in this regard :)
 
Ok. I won't push anything before pulling latest.
Actually, if anyone is reading I am already doing same thing for array functions. :)
 
I might have a stab at rewriting the debug_zval_dump page
 
3:48 PM
Only posting this here since i cant find the JS room
How hard would it be to trigger another website's event?
Ive tried linking to the event id but even doing that doesnt even get you close
Id like to:
Create a link from my site to here nrgpark.com/event-calendar/#event_6831
which opens the event upon arrival such as how it opens when you click an event
I know enuff to be dangerous and I looked in the network tab of dev tools but only see a css reference there
 
@Stuart it should be impossible. That is a XSS attack.
 
ISO Input
XSS Attack?
Huh?
Ok
@Danack did you really read and look at my example?
 
@cmb do you have any idea if there are still a lot of "full" extension docs that we need to remove?
 
When someone goes from my site to nrgpark.com/event-calendar/#event_6831
 
As we should otherwise look at page which have a -removed entity or so (I know the session one has a couple)
 
3:54 PM
I just want that events details opened like it does when you click "Monster Energy Supercross" from the page I linked here
When you click nrgpark.com/event-calendar/#event_6831 on my site, I was wondering if when a visitor arrives there the details are open
talking in circles... I gotchca.
 
@Stuart chat.stackoverflow.com/rooms/17/javascript the room's called "JavaScript" rather than "JS"
 
cmb
4:11 PM
@Girgias nope; I usually just remove if I become aware of such an extension (noticed Judy the other days as I was working on something else)
 
Logical
Will try to skim through the docs and see if I can find more dead extensions
 
@cmb does rasmus reply to your emails? Or do you know who, other than him, can block addresses on internals?
 
cmb
@Danack @Derick may be able to block addresses on internals.
 
 
1 hour later…
5:28 PM
morns
 
6:17 PM
wow, I thought I knew how the refcount in debug_zval_dump would show up, but I don't understand the behaviour of arrays at all 🤨 3v4l.org/Kfch7
I guess this is why nobody's updated the documentation since PHP 7.0 came out!
 
6:35 PM
@IMSoP you are aware that debug_zval_dump will only dump you the refcount of the inner value of a reference, yeah?
(and obviously, calling debug_zval_dump will increase rc by 1)
 
well, I thought I understood it; but I'm lost why $a=[1]; debug_zval_dump($a); shows a count of 3, not 2
 
[1] is literally stored in the literals table of the op array
stored in $a
and passed to debug_zval_dump
 
hm; so it would be possible to get a lower refcount if you initialised the array differently?
 
yes
$a = []; $a[] = 1; debug_zval_dump($a); should give you rc=2
 
right, I think I get it
 
6:41 PM
a couple versions ago arrays usually were initialized at runtime
 
so is there a case where that literal can be reused by something else? I just tried setting multiple arrays to the same literal value, but that didn't affect their refcount
 
literals are deduplicated by opcache afaik
… interned strings are deduplicated immediately (that's what interning does)
but there's no such thing for arrays
 
gotcha
 
6:58 PM
cool, forcing the variables to not share a count with a literal gives something more like I was expecting: 3v4l.org/cNdKg
I think those are probably the examples to give in the manual, with warnings that there are lots of other edge cases
 
 
2 hours later…
8:56 PM
2 hours later...*
ah fucked it up
not allowed an edit marker
 
9:22 PM
2 hours earlier…
 
19 millenia later...
 
9:55 PM
@DaveRandom Does PHP have generics now?
 
return new Boolean<No>;
 
@DaveRandom const No = true;
 
yeh but that's like var undefined = 1;
i.e. fuck you :-P
 
:-)
 
iirc there was a thing until like PHP 5.5 where you could define TRUE and FALSE as constants
 
10:11 PM
@bwoebi wiki.php.net/rfc/enumerations#serialization Do you think this is a good solution? My opinion keeps switching back and forth. I'd personally be ok with saying session_start() fails if the session data contains invalid enums but I think this could raise some eyebrows if specified this way in the RFC.
 
10:28 PM
@IluTov what would be the alternative? hard failure?
Does __Invalid_Enum hold information about the original values? (e.g. for migration purposes)
 
I have said this before and I will say it again exactly once now: the nature of the session storage is that people put data in it which is critical enough that any failure is exceptional, with multiple different possible types and sub-types. Anything that does not make sense should be rejected and reported.
it is not OK to soft-fail or ignore errors when the data contained is more than likely to be protected, or provide access to protected data
/fin
 
@DaveRandom the primary catch here is that session storage is a custom data format which cannot be deserialized directly … so, if we hard fail there, there's no possibility to make it intentionally not hard fail
 
> any failure
 
I'm fine if we had a proper mechanism to allow opt-in graceful handling of the session data
 
if doesn't matter at what layer it failed, it didn't work, so it explodes
(imho)
but also sessions so I kind of don't care, borked system is borked
 
10:35 PM
@DaveRandom yeah … but still applies to regular serialized data which may be not transient
 
and ftr I try to be overly melodramatic/unconstructive when it matters this much, but I don't have a better decription
 
@bwoebi Yeah, return false and warn. ` __Invalid_Enum` could hold the name of the class and case.
 
@bwoebi I do not comprehend any circumstances under which it makes sense for the default decoding mechanism to ignore errors
or "try" to interpret something
I understand the value of that logic, but not implicitly
 
@DaveRandom I'm not even suggesting that the default should be ignoring, but that it should be opt-in
i.e. a possibility to ignore if you know what you do
 
you mean "opt out" then surely?
as in "I choose to ignore errors"
 
10:38 PM
opting into graceful handling
or yeah, opting out of hard failures
 
that's somehow a triple-positive or something that does not make sense to me
:-P
 
haha
 
but I know what you are saying
and yes I definitely agree there should be a way to access that mechanism
 
@IluTov But for now I'm in favor of __Invalid_Enum as it is in line with current behavior - we may want to change the current behavior at some point, but that's out of scope of the RFC.
 
basically (and this is generally true) I want as little error-hiding as possible
 
10:40 PM
Look, I'm happy with always failing. The reason we even included this is that a failing session_start is something that will undoubtedly happen in the real world due to this.
 
and if something is going to prevent the next line of code from doing what I expect, I want the engine not to execute that line
 
@IluTov which is not that bad given you could just start a new session in that case
 
those are my high level requirements, make it work like that plz kthxbye
<3 :-P
 
@bwoebi True, but it is something that will need to be explicitly handled. I'm guessing most frameworks already handle this correctly.
Symfony seems to just error when session_start() fails. github.com/symfony/symfony/blob/… I'm not sure if there's some other mechanism that refreshes the session but if there isn't you'd have to manually remove your session cookie (or close the browser). That would suck.
 
11:15 PM
srsly, does anyone have a good dark theme for this chat. plz.
2
 
@DaveRandom if you're that desperate: chrome.google.com/webstore/detail/so-dark-chat-%20/…
 
extension?? :-/
oh rlemon
he seems like someone who wouldn't do something like that unless it were needed
but still... :-/
I'm gonna hold out for someone (@Wes) pulling something out of their ass
 

« first day (3745 days earlier)      last day (1186 days later) »