« first day (3770 days earlier)      last day (1164 days later) » 

12:19 AM
 
 
2 hours later…
2:00 AM
@StatikStasis he left the knife on the countertop when he was about to clean 😱
 
 
6 hours later…
7:31 AM
Cheers Kelunik for entertaining my stupidity for http-client haha, thanks for the help. And monring!
 
7:54 AM
morns
 
@Sean morning
 
8:24 AM
Hi everyone! I have a weird issue running extension tests. While moving to a different CI platform, I noticed that make test does not play nice with shared extensions. In the setup, all extensions (including json, date, etc.) are enabled using extension=<...>.so in a specific ini file. I noticed that the makefile dumps all parsed INI files into a single tmp-php.ini, but crucially skips all extensionlines.
When make test runs PHP, it passes the -n option so that the original INI files are not parsed, but this leads to extensions missing. Is there an environment variable or option I can use to enable specific extensions or do I have to work around this some other way?
 
8:51 AM
@DaveRandom I'm good at editing.
 
The greatest code coverage.. Lines: 1.36% (153/11286) 😎
Yes boss, we have unit tests.
 
Hey, is the phpinternals.net site supposed to be working?
 
9:09 AM
That's not a URL that I recognize
Do you want phpinternalsbook maybe?
 
No. https://phpinternals.net/
It looks like it used to be a collection of articles covering PHP internals.
Footer says: "Once you have made some contributions, a request for a more privileged account can be made (either by pinging @tpunt in room 11, or emailing tpunt@php.net)."
Is @tpunt still active here?
 
Ah right, I don't think it has been maintained sadly :(
How much fire am I going to provoke with this meta RFC: github.com/Girgias/unify-typing-modes-rfc
 
@Girgias hm...
 
I thought so :')
Mostly something for me I feel in the end, oh well
 
@Girgias Well, I don't entirely disagree ;)
 
9:21 AM
\o/
 
But...
 
/o\
 
... I think one of the primary advantages of strict_types is that it is purely type-based, not data-dependent
This means that the semantics of strict_types are much more suitable for static analysis for example
 
I mean it probably still has a use case, but I just want the coercive mode to be less shait and reduce the gap between both of them
 
A static analyzer will have a hard time telling when you pass a string to an int whether that's actually safe because you're sure that the string is always numeric
 
9:24 AM
Right, but if you use a static analyser, you don't "need" strict_types per se, as they need to figure out the types anyway and strict types doesn't help with that
It just enforces you to respect this at Runtime, or am I missing something more fundamental
 
Well, let's say you're using PhpStorm and it wants to detect whether passing a given function argument is definitely incorrect. If you are in weak typing mode and you pass a string to an integer argument, it's not possible to determine this reliably. If you are in strict typing mode and you pass a string to an integer argument, you can say with certainty that it is wrong. The correct diagnostic behavior is inferred from the declared typing choice.
Of course, you could also have that choice outside the code, and have a configuration option that says, essentially, while strict_types no longer exists, I still want this to be type-checked under strict_types rules
That would be an additional contract on top of what is declared in the code
 
That's actually a good show case, never thought it from the PoV of an IDE
In any case it's also there as possible language semantics that should change to make PHP less burnable
 
@Girgias Oh, I definitely think that tightening the weak typing rules is a good idea
 
Tbf, that's my main motivation, btw what is your opinion on the implicit float to int conversion?
 
9:43 AM
@Girgias Generally reasonable, I think
Have you considered using round-trip instead of fractional?
 
What does that mean?
So if it's higher than .5 ?
 
Checking that (double)(long)x==x basically
Ah, if we already reject out of range floats though, then those would be the same
But I'm not sure we consistently reject out of range floats everywhere
 
We do already reject out of range floats for arguments/return values that I'm sure
Well an explicit cast will allow them that's for sure
 
But probably not for things like array keys
 
array key semantics truly have the tiniest nitpicks, but I'll check that
 
9:47 AM
In any case, that's the formulation I would use
 
Well that's and easy change to do, and I didn't even know it worked. I just thought, well looking for a fractional part is probably the most reasonable thing to do lol
 
10:20 AM
@Girgias Do you know what I would be interested in the most? Making the semantics of property assignment consistent with the strict_types mode.
Do you guys see any proper way to enable this? Using strict_types=2 doesn't seem to be a proper one. ^^ And I'd defer adding a new declare until Nikita's language evolution RFC becomes more mature.
 
@MateKocsis Wait, it isn't?
said by the person who just wrote a document telling that it only affects function calls
 
Now this is interesting: github1s.com/php/php-src
2
 
@Girgias yeah, it isn't :D I just fully realized this not long ago :D
 
Who needs GitHub's Codespaces? :p
 
nice!
 
10:24 AM
@MateKocsis I don't know why I'm so surprised to learn this, when it really shouldn't
 
@MateKocsis In what way is it not consistent?
 
10:48 AM
@NikiC Oh waiit. I messed up something when I tried it out last time... (probably forgot about actually adding the declare(strict_types=1);) 🤦
Also, the Strict Types RFC mentions this explicitly ("just like parameter and return type declarations, property types are affected by the strict_types directive"). Ok, let's just forget my initial question...
 
@DaveRandom You're an expert on SOAP right?
 
okay so back to sanity @MateKocsis you scared me there
 
11:04 AM
huh, it just occurred to me that with named arguments, a SOAP Client in PHP could actually make more sense
because the named arguments in an RPC-style request could natively map to named arguments of a PHP function
I'd probably still just parse the XML with SimpleXML and some helper functions, though; SOAP seems to have achieved the paradox of standardised non-interoperability
 
@Girgias yeah, I was very surprised too when I "found it out". I should have tested the behavior more carefully ^^
 
why do you ask? I wouldn't describe myself as and expert but I know more than I would like to admit
 
11:22 AM
@yossizahn not for a while....think he's still basking in the glory/recoving from the agony, of his last RFC....
 
@DaveRandom See commit message: github.com/php/php-src/commit/…
In particular I'm wondering if ; action="" is legal or not
 
> The entire code here is pretty confusing though
truer words were never spoken
@NikiC ah, that is an interesting question
 
The spec was written by someone who clearly had aspirations to become a lawyer but failed their bar exam and had to go into tech, so it's hard to untangle what the wording means
 
loooooooool that is such a good description
hang on I will set myself a reminder to look into it properly later
right I have set myself reminders for tonight and tomorrow and fri so hopefully at least one of those will get me at a good moment :-P
 
lol
 
11:29 AM
I will also just check what MS do, because that's all that really matters in practice
I think there are some Java folks who are still into it maybe
 
@NikiC thanks for the advice about bit flags. That appears to be working with a debug function that allows zvals to be manually set to 'literal', but please can you give me a clue on how to get it set from compiled code. e.g. from either is_literal('Foo'); or $foo = 'bar'; is_literal($foo);.
I tried forcibly setting it in a place that is almost certainly the wrong place to do it but although that appears to be called, the flag isn't set for the var/value.
 
11:42 AM
hey @cmb are you about for me to pick your brain about some windows compiling questions?
 
cmb
sure
 
not actually PHP related btw
 
cmb
well, I'm no expert, but I try to do my best :)
 
@cmb I have just realised the best thing to do would be to get back to the errors I was hitting last night, I will make some coherent thoughts and come back to you
 
cmb
k
 
11:57 AM
@yossizahn btw, looks like the articles are github.com/tpunt/php-internals-docs/tree/master/docs - but there's not too many...
 
 
1 hour later…
1:07 PM
@alcaeus Looks like you can append to PHP_TEST_SHARED_EXTENSIONS from Makefile.frag. See: github.com/search?q=PHP_TEST_SHARED_EXTENSIONS&type=code
Granted, you'd only want to do that for environments that don't have the extension dependencies compiled in
 
@Tiffany lol
 
Mistake in Spanish documentation example code ・ Documentation problem ・ #80727
 
@Jeeves ¿La documentación, no bueno?
 
@Danack Thanks 👍
 
1:23 PM
@yossizahn btw, if you look at them, can you let me know if they are worth preserving....one of the things I've been thinking about (and kind of have half-arsed implemented) is a site that pulls in things like that, but in a way that allows it to be more maintainable. If those are worth reading, I'll pull them in also.
 
Is there any way to get full URI using only php when $_SERVER['REQUEST_URI'] is not enabled on that site.
 
@MarinarioAgalliu shout at whoever configured that server? But why do you need to know the current uri?
 
Im using php for crawling and scraping, so downloading docs
and for each doc downloaded I want to get the current page uri
 
That doesn't make much sense for me. If you're crawling a site, you should know what the URL is before your request that page...
 
yes but I'm visiting parsed links
so each link in that page
I can store the link when visited but I wanted the other way, getting it using some methods or some trick
visiting/clicking and scanning for docs parsed links if you know what I mean
 
1:32 PM
I don't.
 
Okay thank you anyway
 
1:45 PM
Hello peoples
How can we insert every single entry with unique 6 digit alphanumeric primary key using mysql ?
 
2:00 PM
like this ;-)
 
2:20 PM
@Girgias thank you :P for finishing the PR I had open and have taken forever to do with
 
Eh I've got some other ones laying around that you can review...
 
The one about static keyword on a page, had trouble getting the wording right and haven't back to >.<
Still have a bit of progress I need to make with my apartment before I can allow myself to dive back into open-source, but I'm getting there.
 
3:08 PM
Is there something else other than zend_hash_internal_pointer_reset for resetting an an arrays internal pointer to the start as this doesn't seem to do it.
 
3:21 PM
@Danack Define "does nothing". How are you validating that nothing was done?
 
@Danack Can I ask what Z_ARRVAL_P() does? as it's not used in reset()
 
((because yes, that's should do what you seem to be asking it to do))
@CraigFrancis It's a typed accessor for zval pointers containing arrays
 
((and please ignore me, I'm not a C programmer))
 
@Sara the commented out lines below, when commented in don't printf the "After loop: %d" for the second loop. And more importantly, the php_implode returns "", rather than the expected imploded string.
 
@Sara Thanks
 
3:24 PM
bbl, need beers.
aka easier to explain in voice...
 
@Danack dude it's 3.30
on a wednesday
 
The shop near me gets busy with asshole students who stand in the booze aisle discussing the party they had last night.
 
ah kk if it's pre-investment fair enough
 
@Danack Is it possible your array is empty? The ZEND_HASH_FOREACH macros don't use the array's internal pointer, they track their own position (from start to end). So yeah I wouldn't expect the reset to have any effect, but if you're not getting any output, then the array is probably empty.
 
you know I am definitely one for drinking too much at inappropriate times, but I am afraid even I am gonna have to call people out for drinking on their own at 3.30pm on a wednesday
 
3:26 PM
Also: You're testing this in CLI I assume?
php_printf("Size: %d\n", zend_hash_num_elements(Z_ARRVAL_P(pieces)));
Is this having a go at taint flagging?
 
@Sara Kinda... it's vey much like taint, but no escaping, just looking for safe strings (from the developer) defined in the PHP script.
I'm the one hoping to get this added to PHP, so we can basically copy what Google do in Go, where we have a way to completely stop SQL/HTML/etc Injection issues/mistakes, but a little bit better (i.e. doing this at run time).
 
P.S. - You forgot to check $glue for IS_LITERAL
Well, my comments above stand about zend_hash_internal_pointer_reset() not being the thing you want since nearly all the APIs used internally don't actually use the "internal pointer". That thing exists pretty much exclusively for the userspace reset/next/current/end functions
 
@Sara Good point... although I think Dan is just getting started, experimenting, hoping to see if it's possible (I'm hoping it is, then I've got the fun task to convince everyone it's worth adding).
 
3:52 PM
As an aside, if anyone isn't sure about the is_literal() suggestion, I'm happy to talk about it.
 
I'll vote for it if you also add an is_figurative
 
And they should be aliases of each other.
 
@MarkR I'm happy if anyone has a better name... I
 
((we're making a joke))
 
@Sara Gathered, turns out my typing (and hitting the enter key) is a bit off today :-P
 
4:02 PM
@CraigFrancis Don't worry, I'm usually the clueless one about jokes being made
 
As for the general idea, I do like the idea of a taint mode (I know, you're calling it something else, but let me have my words). I think we need to think long, hard, and deep about what that flag looks like and how it behaves (I actually do like that you essentially assume taint rather than the other way around). Anyway, buckle in for a long discussion period.
 
@Sara not taint, literal tracking: draft words. Though a section needs adding on why literal tracking is better than taint tracking - which is basically going to be this guys talk summarise: youtube.com/watch?v=ccfEu-Jj0as
 
I SAID, LET ME HAVE MY WORDS.
 
Also, thanks for the help...... it was s/(!ok)/(ok != 0)/
 
@Girgias Thanks... I suspect I need to stick around to get a feel for the general chat (Spaß ist verboten).
 
4:04 PM
@Danack Ah, so you had a pending exception, but weren't exiting?
(or vice-versa)
This, btw, is why I don't like SUCCESS(0)/FAILURE(-1) returns. SO EASY to get them wrong.
 
@Sara GOD I HATE THIS
 
Give me a nice bool any day of the week. Or a proper exception that's actually an exception.
throw AllTheThings();
 
Legit the main reason why I went through core to change int returns to zend_result (and introduce it) just to know what the hell I am meant to check
 
throw new (╯°□°)╯︵┻━┻;
You're doing God's work.
 
throw new Tantrum();
 
4:07 PM
There was a bug in the user session handler implementation because of this.
Documentation said return TRUE; on success, FALSE otherwise, but because it was being passed through to a SUCCESS/FAILURE return, it meant that you could only succeed with FALSE and TRUE resulted in undefined behavior.
 
@Sara The truly god's work would be to go and check every usage of SUCCESS/FAILURE and see if they are used for a boolean argument or -1 and 0 because I/O API or a larger range
 
Wanna say that was only caught in like.... 5.4 or something (relatively) recent. ((Recent compared to how long user session handlers have existed))
 
@Sara I'm expecting a long discussion period, I've been vaguely around when discussing previous RFC's, and had to re-think my approach to using escaping (the taint checking approach, which is fundamentally flawed)... I think Dan's RFC is good at explaining what it should include, where my RFC probably went on too much of a tangent explaining why it has to be this way.
 
IMO while a userland function is good, I think that's only half the job, and adding modes to enable it for things like PDO would be the bigger effect
 
@Sara Yep, I think you're right, throw AllTheThings(); :-)
@MarkR It really would, and that's where I want to get to... but I also appreciate that we need a bit of time to convince everyone of it's value... so start with a userland function (and maybe some other functions to avoid some performance concerns), then get some ORM's and HTML Templating systems to use it, then look at expanding to PDO, etc.
 
4:15 PM
@Sara the implode was never being reached. And I will leave you with your taint....
 
Personally i'd encourage rolling both at once if time allowed. Convincing someone of its benefit isn't much use if they then realise they can't use it without wrapping PDO
 
> that we need a bit of time to convince everyone of it's value
that's probably not the best strategy......getting it so that it's hard to justify voting against is probably easier.
 
@MarkR I really don't know PHP Internals that well, but I'm assuming that getting a userland function accepted, which will hopefully avoid performance concerns, would be faster, and allow tweaks, before we move onto PDO, etc.
 
Isn't that done by setting the "Author: " bit correctly?
 
@pmmaga how's the baby? :)
 
4:23 PM
She's doing great :) Thanks for asking. Almost 4 months old already hehe
 
@Danack I surprised that a better error didn't come out since you would have hit RETURN_THROWS() without an active exception, but /shrug
Still, the part about internal pointers is legit
 
@Danack :D
 
@Sara Maybe someone forgot to set the --enable-debug flag ;)
 
What? People compile non-debug builds?
BLASPHEMY
Next you'll be telling me that nobody uses --enable-maintainer-zts anymore.
 
4:27 PM
@Sara It's the truth
... because it was renamed to --enable-zts ;)
Though actually, I haven't used --enable-zts in ages
 
thatsthejoke.png
 
It makes for a worse debug experience, and nowadays there just aren't really any differences left
 
History lesson question: what were the differences between a ZTS and NTS build?
 
It used to change a million function signatures...
 
oh
 
4:29 PM
(I'm probably off by only 1 order of magnitude)
 
Didn't know we had 10M functions in php-src
But doesn't it still do that?
 
No. We don't pass a TSRMLS related object around to almost every function that uses thread-safe data like globals, transitively.
 
@Girgias you used to have to pass around TSRMLS_CC (and similarly named things) everywhere, to (afaik) pass around the thread local storage. If you really wanted to look, you could look at the imagick extension, which compiles against 5.4 -> 8 for the hacks required...
 
Re: bugs.php.net/bug.php?id=80722 What can we do to not let some users damage PHP's reputation?
 
@Dharman so..................my general plan is to:
 
4:33 PM
If you are referring to rtrtrtrtrt at dfdfdfdf dot dfd35, this person has been banned from the list.
 
Hassle someone to approve: github.com/php/web-bugs/pull/91
Hassle PeeHaa to make a Jeeves plugin to announce comments in here.
Get some integration tests setup for web-bugs, so that we can change the code without it breaking too much.
Change from comments going live straight away to needing to be approved.
 
@Danack God, that must have been awful
 
@Danack Oh, I thought the next step was to train an AI to detect this specific person, and announce comments that need moderation here.
 
btw I contacted the police in Austria about his messages (and worse ones sent to me directly) and they said that I need to report it to police in the UK. Which I've done, but they don't have the resources to open a "request for assistance" internationally for this.
(going to try to get someone in Austria to do the Php project a large favour.)
 
@Dharman WTH is that feature request even about? PHP has interfaces. It's had interfaces for 17 years.
 
oh, and next step in plan, make bugs.php.net not look like ass.
2
 
As someone who made php.net not look so bad... I wouldn't recommend spending your time there.
People will complain about any visual change, and I'd rather have features.
For instance, requiring a valid email.
If an email address is not verified, then it won't be approved.
 
For bugs? Probably makes more sense to send an email to the address to confirm it than just checking for formatting
 
Yes, because someone who is the sysadmin at a tech company is completely incapable of signing up to new email addresses.
 
@MarkR That's what I mean.
@Danack Yes, but since we'll ban every new one he makes, it does increase his level of effort required.
Meanwhile, moderation on our end would hopefully be distributed across multiple people.
 
4:53 PM
@Danack It looks like hot sweet 1996 booty, tyvm
 
I really need to get around to updating my prototype to automatically parse the changelogs =\
 
@LeviMorrison As an addition to that, we should allow email masking (only php.net folks can see email addresses, show a display name instead).
I don't love putting up a handy database for spammers to scrape for valid addresses.
 
5:08 PM
When including CSS, is it a good idea to use slash at the start of the path? <link rel="stylesheet" href="/css/style.css">
 
floor() returning a float once again bites me in the ass.
 
@Dharman It really depends on the project, absolute vs relative paths have different advantages.
 
I am talking here about a project using front controller
 
@Dharman I find full/absolute paths (slash at the start) easier to read, and remain consistent for the whole project, but some projects don't have a set root to work off.
 
I just cloned web-bugs into a subfolder and now all the links are broken.
I don't really understand why web-bugs uses absolute path
 
5:18 PM
@Dharman That's the example of when absolute paths can break, when moving into a sub-folder... but sometimes that can be easy to fix (maybe there is a variable for the root; or paths only defined in a few locations, maybe a common include).
 
There is no easy way to fix. These paths are scattered around
 
@Dharman How does where you cloned web-bugs matter?
You just need to start the server with the right doc root
 
I use wampserver. The root doesn't change. I don't feel like creating a new virtual host. When it is in a subfolder then all CSS and JS and images are 404 because path is invalid
If it was relative then it wouln't matter
 
@Dharman php -S localhost:8000 -t docroot
 
@Dharman If there is something common to the HTML <head>, you could use <base href="/sub-folder/" />
 
5:22 PM
I know it is a very small annoyance and easy to overcome, but my question is why did web-bugs use absolute path in the first place
 
@Dharman It's often easier :-)
As in, easier to author, assuming it's going to be at the webroot
If all pages need to relatively include their resources, it can get messy (but not impossible, I've had to do it a few times, like when I had to put a website on a CD).
 
@Dharman Generally your app should have knowledge of what the app-root path is, and then it generates all links for you, including the CSS links, to include that app-root path if needed.
 
PHP built-in web server resets timeout when it can kill the process ・ Built-in web server ・ #80728
ssh2_shell() streams are not stream_select()able ・ ssh2 ・ #80729
 
6:09 PM
@Dharman if you're a docker person, use the PR I made...
 
No I am a Windows user
 
6:23 PM
Random segfault PDO fetch_value ・ PDO MySQL ・ #80730
 
7:16 PM
talking of moderation on bugs, anyone have access to delete these spam comments and block the address? bugs.php.net/…
 
 
1 hour later…
8:25 PM
I should be able to do that now
 
Incident on 2021-02-10 20:34 UTC
All issues have been resolved!
 
9:13 PM
Guys I need some clarification, when I make
$a = 41;
$a = 'hello';
zval (no zend_value) still the same and change only the zend_value member in this case str (zend_string) ?
 
consider me concerned about your understanding of temporal mechanics
 
10:36 PM
@BruceOverflow yes
The value and type in the zval change
But it's still the same zval
 
@Sara Do you mind sharing your reasons for voting no on enums?
 
11:24 PM
@DaveRandom ping
 

« first day (3770 days earlier)      last day (1164 days later) »