« first day (3700 days earlier)      last day (1244 days later) » 

2:01 PM
just for my own sanity @JukEboX, can you try the LDAP_OPT_X_TLS_CACERTFILE option again?
I cannot see why that would not work, as long as you give it a valid file path to the correct certificate
 
Sure.
 
the path would need to be absolute
(I think)
and it may not be able to cope with forward slashes
 
yeah I'd assume so too. relying on relative seems risky.
 
the cert would need to be in PEM format
it should be functionally identical to the curl.cainfo and openssl.cafile options, basically
 
@DaveRandom so like C:\Cert etc....
@DaveRandom same error:
error1416F086:SSL routines:tls_process_server_certificate:certificate verify failed (unabel to get local issuer certificate)
 
2:12 PM
what's the windows equivalent of strace?
 
stroke?
 
procmon
 
yeah im gonna have one because of autocorrect
 
kind of
@JukEboX does it really say "unabel"? lol
cane was unabel
 
LOL no. Most of what I am showing is because it is on another system. So I am working on 2 computers at once. Its not connected to this one
bare with my typos
sometimes.
 
2:14 PM
wait did you type all that out??
@Stephen is right though, what I would do now is crack open procmon and watch what it's actually doing/trying to do when you connect
like you should be able to see it opening (or attempting to open) the CA cert file, reading from it, maybe the path is invalid in some way, etc etc
 
I'd try and get it working from a CLI call too, to be honest.
 
you need to inspect what's actually happening though, because it's clearly not functioning as designed
 
avoid any apache/iis stuff to get a base working/not working case.
 
@DaveRandom yes I typed it. For the bigger stuff I copy it over with a USB drive
 
@Stephen @JukEboX yeh, you should be able to put just the LDAP connection routine in a file on it's own and invoke it from the command line, that will give you the cleanest smallest data set to look at in terms of process activity log messages
 
2:17 PM
So make the file just like any other php file and using command line to invote php and refer to the file?
 
yeh, just a couple of lines, a basic example of how to connect to an LDAP server via TLS
 
ok give me a second
 
imagine you are writing an example for the manual to show someone else how to do it
you should be able to provoke the same error that way
and if you can't then something super fucky is going on :-P
 
the block you copied to me yesterday should be fine on its own @JukEboX
 
I'm out for an hour or so, got to go pick up van from garbage
 
2:32 PM
room topic changed to PHP: Support group for those afflicted with Active Server. Don't ask to ask, just ask. Username auto complete is *tab, not enter. Spaß ist verboten. Chat Guidelines: room-11.github.io LXR: heap.space [friday] [php]*
@makadev I had absolutely no idea that has anything to do with horses.....I knew 'currying' is an old word that has changed meaning since we started eating tasty Indian food, but not the horse side of things. I've mentioned this elsewhere before, I have a strong suspicion that English works well as language, because it's so illogical....which means that changes in meaning are easier than other languages.
 
@Danack what's Active Server? :-D
have I missed something?
 
room topic changed to PHP: Support group for those afflicted with PHP. Don't ask to ask, just ask. Username auto complete is *tab, not enter. Spaß ist verboten. Chat Guidelines: room-11.github.io LXR: heap.space [friday] [php]*
 
Nurse! Nurse! He's out of bed again!
 
@DaveRandom not sure whether you mean me or Dan :-D
 
yes.
 
2:46 PM
:-P
 
its decided, i need to make changes to stream notifiers for 8.1 - please stand back, also i need to get some protective gear
 
@beberlei You will not be forgotten
also doesn't drunk Sara want to get rid of streams altogether?
 
Sally forth, brave warrior.
 
@Girgias even if, i need this fixed earlier than maybe 9.0, maybe never
 
@beberlei Makes sense
 
2:57 PM
Drunk Sara wants to rewrite the whole streams API, not eliminate the idea of streams.
 
no @Girgias was right first time, fuck streams, they are dangerous
streams killed my father
 
Huuuuum, I didn't read that like that from the Reddit post/poll, sure have something to replace it but I don't imagine there would be filters and such
 
I like streams, as long as I know about all their possible failure scenarios …
 
Stream filters are fine as a concept.
@bwoebi Monads! ducks
 
it needs to be OO with interfaces, then you can decorate them to your heart's content
 
3:01 PM
@DaveRandom I think we need some sort of native shorthand decorating syntax for that to be viable…
 
"need" is a strong word
 
PHP9: Now with even more codegolf
 
@cmb can you double check that github.com/php/php-src/pull/6471 works on Windows?
 
for specific interfaces which are used a lot (such as a stream) you can easily make a default passthru trait and override the bits you want, anyway
 
@PeeHaa TBH, I'm missing quite some shorthands for quick & dirty scripting in PHP
 
3:04 PM
@bwoebi don't get me wrong, I'd love a bit more sugar around stuff like that
 
foreach ($line as explode("\n", stream_get_contents(STDIN))) is so tedious to type on php -r
 
I don't think it's a precondition for OO streams though :-P
 
vs bash: while read -r line; do
 
@bwoebi you could always just patch file() to it accepts a stream arg...
I don't think anyone would object to that
but yeh obviously that's not the point :-P
 
I was just replying to peehaas codegolf comment
 
3:07 PM
oh right
well yeh, the point stands, for both topics :-P
 
@mega6382 technically he went into management
 
@DaveRandom and no, it isn't strictly, but it is making extensibility much more achievable
 
@Girgias the reddit poll is about Stream Filters, not about Streams in general
 
@beberlei Fair, tbh I only read it before going to bed at 3AM
 
@Girgias let me post a link, but don't look at me if you hurt yourself ;) php.net/manual/de/stream.filters.php
 
3:09 PM
@DaveRandom at least having to decorate classes with not just 1-2 methods is really dissuading me and I'm going to hack my way around then
 
@bwoebi maybe a move to "fix" streams would make some of the sugary things more urgent and get people to work on them
 
@Gordon hmm, so more excel than ide? lol
 
@beberlei Oh I know what they are, and they are very whack
 
@DaveRandom true… but you may also be more motivated to actually move forward with streams if the sugary things were all there
 
@mega6382 yeah and google data studio
 
3:11 PM
@bwoebi sounds like a potentially virtuous circle if we can get the ball rolling...
 
@DaveRandom running php.exe how do I invoke the test file ?
CLI?
 
open command prompt and just php path\to\script.php
relative or absolute path
in procmon add a filter rule for Process name=php.exe
then clear the history and invoke the script once and stop capture, so you have a complete capture of a single run
 
@DaveRandom ok running the code I have so far comes up with this:
 
then I would search it for network traffic being exchanged on TCP/389
to find the relevant bit of the log
I am heading out now for an hour or so
back in a bit though
 
PHP Warning: Module 'openssl' already loade din Unknown on line 0
Warning: Module 'openssl' already loade din unknown line 0
Then the normal unable to get local issuer certificate error
No problem. I have a meeting shortly. Then I will be here itll 3PM EST
thanks for the help BTW
 
3:16 PM
ah, pass php the -c option and point it at the ini file from xampp
 
which INI file
 
oh
sorry
 
LOL
the php.ini file?
 
no your ini file it trying to load the openssl extension twice
yeh
 
ok
one sec
 
3:17 PM
it might be in more than one ini file
look at phpinfo() or php -i output to check which files are being loaded
really have to go, ttyl
 
Go go go
we can continue later :)
 
cmb
@beberlei I suggest to read the EN docs; DE is pretty much outdated nowadays
 
Hi there, had lately a discussion about integration testing (with PHPUnit) and would like to hear what you think is the best approach for tests interacting with the database:
(1) Use a dedicated database for testing to not screw up your development database
(2) Use transactions and roll them back in setUp and tearDown
(3) Both
(4) Something different
 
@cmb accidently posted the de one ;)
 
@AlfredBez 1
 
3:22 PM
@AlfredBez The usual recommended approach is to make fixtures to prep your database before each test and then reset it for the next test. Even if two tests use the same fixture, reset the DB before each test to ensure it's clean and test can run in any order.
 
@PeeHaa Thanks, do you run migrations for testing and development databases at the same time? Or how do you ensure, that the testing DB is up to date?
 
I create test dbs on the fly
 
@AlfredBez 1 definitely
 
Yes, use 1, with defined fixtures.
 
@PeeHaa Do you hook somehow into PHPUnit to create them?
 
3:28 PM
Yes
Using the normal methods for setup and teardown
And possibly the bootstrap
 
hi there. I learned core php and built a job posting website. I wanted to know what I can learn next.
 
Securing said job posting said :P
 
@AlfredBez have a bookmarked conv of my thought: chat.stackoverflow.com/rooms/11/conversation/db-conv . Also, I never use tearDown, and absolutely test again live.....if nothing else, developers need to be able to work remotely/in isolation.
 
@PeeHaa That sounds appealing to me, thanks a lot. Thanks also for the other guys who shared their opinion
 
@Trowski @kelunik possibly of interest: What went wrong with the libdispatch.
 
3:33 PM
@GuneshShanbhag Your next step is to write lots and lots of code to train your brain to think in code. Most of it will be crap code, because everyone's first 100,000 lines of code are crap. That's OK.
Also, what @PeeHaa said. :-) Security should be something you think about all the time.
 
@GuneshShanbhag if you haven't already, learning docker is (imo) really good...it makes switching between projects, and sharing projects a lot easier. And the slim framework with PSR7 makes using other PHP libraries easier.
 
cmb
@Girgias 81 passing, 1 skip \o/
 
AYE
 
@GuneshShanbhag If you want to really level up your thinking, I am contractually obligated to recommend my book on Thinking Functionally in PHP. :-)
 
Gonna merge that then, can I update NEWS about the regression bug without a ticket or do I need to open one? Also I'm technically adding some news warnings to some functions...
 
cmb
3:39 PM
yep, okay to add to NEWS without ticket; might be reasonable to ask RMs about this generally
 
@Sara @GabrielCaruso so in reference to the message two lines above, I've made the IMAP ext a bit more consistent with how it handles invalid message numbers, this meant introducing some warnings in functions which didn't emit them. (and also fixed a regression bug) OK to land this with a relevant entry in NEWS?
 
Where did php.net/manual/en/class.valueerror.php come from? There's no RFC that I see, so who gets the credit/blame for its existence?
 
user14596741
Hey guys, how is github or stackoverflow profile picture made?
It is unique ever time the new use, How can i get those image datasets?
 
@Danack Seemingly the biggest problem is that libdispatch uses threads for async, which adds enormously to the complexity and the overhead of spinning up a thread for tasks that should not be async can lead to performance degradation, rather than gains.
 
3:43 PM
@Crell Technically salathe, but it's more my fault for introducing a bazillion Errors on values and instead of having a generic one we got a dedicated one :D
 
So do I just credit it to the great amorphous blob of internals?
 
yes
 
cmb
depends; could also blame them ;)
 
The bug fix can certainly land in 8.0 Changes to behavior (like new warnings) I'm gonna want to ask you to justify individually. Do you have a diff up somewhere I can look at?

Also, WRT NEWS entries; You don't need a ticket. Just a description of what was done is fine.
 
SO basically invalid UID sometimes would warn, sometimes not, compared to message numbers which would always warn if they were outside the range
 
3:47 PM
Yeah. Those seem fine.
 
cmb
@Sara, if you have time, could you please take a look at github.com/php/php-src/pull/6001#issuecomment-681873278, and clarify?
 
Great thanks :) I'll add a mention about those new warnings :)
 
@Crell Peter Cowburn (aka salathe)
 
Does he want to take the blame? :)
 
Clarification: WE SHOULD BURN FILTERS TO THE MOTHER LOVING GROUND
 
3:51 PM
fetchAll after execute now failing on DELETE's ・ PDO MySQL ・ #80472
 
Seriously though, I've forgotten most of what I ever knew about streams. Your guess is better than mine.
 
@Sara You ended up doing the extra shots then?
 
Reddit is my booze.
Note also that they seem to agree with me.
 
cmb
but some filters are really important, e.g. string.rot13 :p
 
Riiiiiight
 
3:54 PM
I had forgotten that was a thing
 
^^^^^^^
 
@cmb You know, we have a highly optimized SIMD implementation of str_rot13...
Because, you know, it's a really performance critical function
 
"""I've programmed in PHP for over 22 years now (March 1998, baby!). I have never once even seen the streams filters in live code, nor wrote them..."""
https://www.reddit.com/r/PHP/comments/k514jf/how_awful_are_userspace_filters_in_php/geceqis/?utm_source=reddit&utm_medium=web2x&context=3
 
@Sara That's a pretty strong argument again you then...
 
for me killing them, you mean
 
3:56 PM
@Sara I know who wrote that without clicking
 
I've hated stream filters since nearly day one.
 
a bit strong. some of the people on reddit aren't that bad. but sure.
 
I blame Wez, mostly.
 
cmb
we use stream filters internally quite a lot, though
 
We who?
 
cmb
3:57 PM
php-src
 
eh? where?
 
cmb
eg. Phar (for compression/decompression)
 
Oh... that chestnut.
Phar could equally use the zlib:// wrapper though
or bz2:// or whathaveyou
I'm far less critical of the wrapper implementations than of filters.
 
wiki.php.net/rfc/restrict_globals_usage Burn Lightly char $GLOBALS with fire.
7
 
4:01 PM
@GuneshShanbhag Was that to me?
 
cmb
http:// wrapper uses dechunk filter
 
Damn. Right.
 
conceptually filters aren't inherently bad, they are just very wrongly implemented
 
@Crell I was going through your book on leanpub and I found it really amusing. Chapter 1 concepts i know little bit. And i was browsing through leanpub and came across this book leanpub.com/production-haskell . Want to learn this too. Sounds fun.
 
Okay. Can we settle on burning USER-DEFINED filters with fire?
 
4:03 PM
if it was interfaces and decorated objects it would make sense
@Sara shut up and take my money
 
@DaveRandom How do you feel about putting together a "REPLACE USER-DEFINED FILTERS WITH OR WITHOUT FIRE" RFC with me?
 
@NikiC Are we expecting like a 1% speedup here or are you just tired of having the code around for a feature that is never used?
 
@NikiC """Additionally, the $GLOBALS array is excluded from the usual by-value behavior of PHP arrays:""" WAT???!?!?!?!?!?!?!!!1111111111oneoneoeneleven
 
@GuneshShanbhag I try to be entertaining. :-) I think once you get past the free chapter you'll find a lot you aren't familiar with yet. Which is the point.
 
@LeviMorrison it makes some reasoning about code impossible... twitter.com/MrDanack/status/873128170232307712
 
4:06 PM
@NikiC Huh I was going to look into something like that lol
 
@NikiC I'll get the marshmallows.
 
think he said that this is a blocker for some optimisations.
 
@Crell Yes what intrigued me was a chapter on category theory.
 
That was by far the hardest chapter to write...
 
@NikiC +1 for making $GLOBALS access more sane. I wish we could kill it entirely, but this is a reasonable step towards sanity.
 
4:09 PM
@LeviMorrison No idea if this will be a measurable speedup, but it should definitely eliminate a lot of bug surface
Nowadays if you pass $GLOBALS to array functions we usually don't crash anymore
 
cmb
Can we get completely rid of IS_INDIRECT and related stuff, then?
 
But you don't have to try hard to find something that doesn't handle $GLOBALS properly
 
Interesting. I always knew globals were terrible, but didn't realize it was technically so perilous.
 
@cmb It is still needed for objects, but that is self-contained. All arrays that escape to PHP would not contain INDIRECT
 
cmb
great! :)
 
4:14 PM
Question, I'm looking to add support to shut up exceptions with @ (yes idea is mad but I've got some reasons to try...) what would be the best: insert try/catch AST nodes somehow, handle it in the zend_compile_silence() function, handle it in the VM Handler, or I've seen there is something with the live ranges (which I don't really understand)
 
Like a sandbox sort of thing?
 
Well basically if you do $a = @foo() and foo throws it should be similar to wrap it in a try/catch block and just return null (will look for default values later on)
The point is to be able to move I/O functions from emiting warnings to throwing Exceptions while limiting BC
Even if that means adding some weird capabilities to @
 
@NikiC How much of a performance impact will generating the globals array copy have? (well, yeah, you know, I maintain a codebase doing extensive usage of extract($GLOBALS, EXTR_REFS))? Probably quite negligible, right?
 
@DaveRandom back.. Does the Van work?
 
@bwoebi Some but probably not much?
Depends on how often you do that ^^
And how many globals you have...
 
4:22 PM
@NikiC probably a hundred times per request or such, sometimes more if there are some functions included in loops…
 
@Girgias you could use @@ for that for lul
 
@NikiC I guess a couple hundred or thousand - nearly every variable defined during the request lifecycle - i.e. there are a lot "unused" globals, they are once defined and not reused afterwards, but still present
 
@beberlei stares
The point is to make the transition as easy as possible without making people rewrite stuff >-<
 
@bwoebi and how often do you extract?
 
2 mins ago, by bwoebi
@NikiC probably a hundred times per request or such, sometimes more if there are some functions included in loops…
 
4:25 PM
@bwoebi oh, missed the first message ^^
 
<venting> sometimes, Windows filesystem is fucking annoying. I'm trying to change the default program that a file type opens in, I want to change it to Chrome, but Chrome isn't in Program Files or Program Files (x86) under any kind of obvious name (e.g. Google or Chrome or something)... so now I have to start digging around in Windows to figure out where TF a program should be in an obvious place, but is not </venting>
 
@bwoebi Thinking about this again, it shouldn't matter really. extract() already loops over all variables and does a fairly expensive operation (registering them in the local scope). Doing an extra copy doesn't really make this meaningfully more expensive
 
@NikiC yeah, that's what I wanted to hear and expected
 
However, the extract($GLOBALS, EXTR_REFS) wouldn't actually work
 
uuuh
because it's a copy and globals not changed
that's … bad :-D
 
4:27 PM
Or it would only work if you had pre-existing references, not new ones
The good news is that you can do a search and replace for foreach ($GLOBALS as $var => $_) { $$var =& $GLOBALS[$var]; }
 
@Girgias that reminds me i wanted to make an rfc about a simplified version of go's multiple return values, where $value, $error = call(); would either fill the $value or $error, where $error is either an exception that was auto caught, or an instance that represents the last warning/notice. details TBD
 
@NikiC will $GLOBALS += still work or is that an indirect modification?
 
@bwoebi indirect modification
The only modification that will work is $GLOBALS[$x] =
 
cmb
@Tiffany C:\Program Files (x86)\Google\Chrome\Application ?
 
@cmb it's under AppData -_- because that's obvious
 
4:30 PM
@beberlei I would imagine this to be rather orthogonal, but wouldn't you need to introduce tuples first for that?
 
so I guess I'll need to change all occurrences of $GLOBALS += get_defined_vars(); as well @NikiC
 
Maybe it's something to do with how it's installed on my work computer
 
to do a loop
 
@Girgias i haven't thought about details ;) maybe
 
@Tiffany That's because it's not a global install but one limited to your user account
 
4:30 PM
@bwoebi your codebase is really something :)
 
@Girgias get out with your logic :P
 
But yeah, that would become something like foreach (get_defined_vars() as $var => $value) $GLOBALS[$var] = $value;
 
@Tiffany Ah yes; the reason why I'm annoying, always applying logic to things :P
 
huh..... get_defined_vars() I always wondered if there was a way to expose the local scope as an array. Since 4.0.4.... neat! So I can just barely use it in WordPress.
 
@Sara Now, give me that for parent scope as well please, so that I can build my own stacktrace with important variables of central functions included in these traces (without throwing exceptions)
 
4:35 PM
@bwoebi I have included your examples in the rfc
 
@NikiC nice :-) (check your twitter dms)
 
hm is there a reliable API for PHP 7.0+ to pre-define a list of interned zend_string's that my extension needs?
7.* higher is also ok, maybe I can backport it down to 7.0 myself
 
@bwoebi Yep. Would be pretty straight-forward to add a depth arg to that function. Doesn't even need a new API.
 
@Sara would be awesome, not sure whether I can just pull that off though :-D
also … JIT
 
4:43 PM
@cmb yeah i use that already in other context, maybe in MINIT and store in an array
 
I'd just put up a small PR, ask on internals if anyone objects, then merge it after a week or so.
 
@Sara At least I have no idea whether it's safe to build and access symtable of JITted stack frames?
 
Definitely not safe
We need the ability to analyze whether the symtable will be accessed or not
 
I'd hope JIT wouldn't be an intersection. We must keep the frames for use by backtraces, and so long as it's by-value there shouldn't be any action at a distance concerns. Well, maybe for object props.
 
Which is also why you can't call get_defined_vars() dynamically
 
4:45 PM
Oh right. The symbol table is only materialized on demand now, isn't it?
 
@Sara yes
 
I mean... hrmmm.... Could we jump to frame then walk the CVs if there's no symbol table?
Okay. It gets harder.
 
@NikiC Is it actually completely impossible to reconstruct actual variables within JIT?
I mean, is there any information left which variable is present in what register
 
@cmb what i dont understand about that API, when i do zend_new_interned_string(zend_string_init("mystr", sizeof("mystr")-1, 0)); then i still need an allocation
 
@bwoebi I don't think you can reconstruct at random points
 
4:50 PM
@NikiC Then how are exceptions dealt with?
 
At exits the necessary information to move from regs to VM is stored of course
@Sara exceptions only contain arguments
 
Specifically, the backtraces that go with them?
Oh right, duh
 
I'm not really certain on the details where jit is concerned, but generally we optimize based on the fact that intermediate state of variables does not matter, if get_defined_vars etc is not used
So if you do $x = 1; foo(); var_dump($x); we are allowed to transform that to foo(); var_dump(1); and drop $x entirely, for example
if foo() could now inspect the variable state, that would technically no longer be legal
 
We could, but IAUI, we don't.
((not that that's relevant))
 
@NikiC Would it be an option to allow get_defined_vars() with depth only for non-JITed frames? … At least would be good enough for me
 
4:53 PM
@Sara we do ^^
@bwoebi nah, this happens also without jit
 
@NikiC I mean without opcache optimizations overall…
 
user14596741
I dont know why but i dont like php:D
 
it's like with gcc … if you optimize you lose some variable state to inspect
I.e. unoptimized: all info is always correct, lightly optimized: some info may be optimized away, strongly optimized: forget even accessing it
It's a debugging feature and I don't even care about 100% accurateness, but things like these make it easier to see a logged error and infer the cause
 
@bwoebi Right, if we spec that it may not report correct results, then that should be fine
But will probably need an RFC :)
 
cmb
@beberlei I think that is expected; however, you can do zend_string_release() afterwards, and be fine; see also phpinternalsbook.com/php7/internal_types/strings/…
 
5:03 PM
@NikiC Can we spec though that unoptimized builds are reporting 100% correct results?
 
@cmb ah thanks :)
 
@bwoebi I think so
 
5:18 PM
Anyone know what DateTime[Immutable]::createFromInterface() is all about? It's in the new feature list as existing, but that's it. No docs, no RFC.
 
ohi php 7.1 and zts breakage
 
@Crell IIRC DateTimeInterface is the unified interface for datetime + datetime immutable to expose common functionality that doesn't assume mutability
 
@Crell It's createFromMutable + createFromImmutable combined into one method, so you can use it on DateTimeInterface
 
I know what DateTimeInterface is. But what does createFromInterface() do? I can make an educated guess but I'd prefer more than an educated guess before putting it in a book. :-)
@NikiC That was my educated guess. Any idea when/by whom it was added?
 
@Crell search github prs ^^
 
@Danack I updated the initial example with verbosity and comments, what are your thoughts? github.com/trowski/fiber-rfc/blob/master/rfc.md#examples
@Crell I'd be interested in your thoughts too ^^
 
@Trowski I'll see if I can steal some time in the next day or 2.
 
cmb
@beberlei indeed, zend_new_interned_string_int() returns the string in ZTS (heap.space/xref/PHP-7.0/Zend/zend_string.c?r=478f119a#80)
 
@cmb Oh geez that's old. Looks like the current one is from Nikita's link.
 
cmb
5:32 PM
yes ^
 
And I found one from Dave, too, that was apparently forgotten along the way. Poor Dave. :(
 
cmb
well, github.com/php/php-src/pull/5346 is marked as [WIP] ;)
 
cmb
huh, seems I forgot about that
sigh, I've been asked to release xmlrpc for PHP 8 :(((
 
How much money did the request come with?
@NikiC If I read that diff correctly, the method was added separately to both classes, but NOT added to the interface? Is that correct?
 
5:51 PM
@Trowski I'll look when my brain is working better. I still think having a chat would be useful.
 
@Crell yeah
 
@Danack Sure, my schedule is pretty flexible for the rest of the week, including today.
 
@NikiC Yeesh. That feels like a mistake to me. Is it, or am I just not groking what C code can do again?
 
@Trowski The rest of my day is mostly cracking my spine....will give you a ping another time.
 
what do you use as unique identifier for users? hexdec(uniqid()) is giving me some problems since it generates too large integers
 
5:59 PM
@Crell my understanding is i) the return types are different:
DateTime::createFromFormat(...) : DateTime
DateTimeImmutable::createFromFormat (...) : DateTimeImmutable
 
Ah, excellent point.
 
and then the behaviour of the two objects is different:
DateTime::sub - changes current object
DateTimeImmutable::sub - returns new object
aka only bits that behave the same that are in the interface. the subtly different bits aren't.
 
Well, createFromInterface() returns a new object in both cases, but typing the return as DateTimeInterface would be less useful.
 
@yessure there's a library that you should use......which I've forgotten the name of.... it converts from internal id to encoded value and back
 
Thanks! I'll search it then!
 
6:04 PM
@Sara I mean I'd love to but if I'm completely honest it won't ever happen if it relies on me, certainly not lately
I'd be happy to help write the RFC but the actual doing of the things what's actually at issue :-P
@JukEboX it lives \o/
I am still working atm, got one more job for today then done though
 
@yessure found it - hashids.org
 
@Danack Awesomee! Thank you
 
cmb
@Dharman, thoughts on bugs.php.net/bug.php?id=80458? That's introduced by github.com/php/php-src/pull/6203. Probably the new behavior will stick, but we should document that at least.
 
In docs, how do I indicate that a given method is only available as of a given PHP version?
(I'm adding createFromInterface)
 
cmb
there are versions.xml files where this info should be added
 
6:12 PM
Let me investigate.
 
Oh, it's a complete separate file? No wonder I couldn't find it...
github.com/php/doc-en/pull/257 - For the PHP 8 doc punch list.
 
G'day to all
 
6:30 PM
'Stralian typing detected
 
@DaveRandom no problem. I got another hour and 20 minutes
 
Is there a way to create a "dummy" AST?
Actually I'm probably going about this completely wrong
 
E_AUSSIE ?
 
I have a HashTable I'm initializing in a module global in PHP_MINIT_FUNCTION, but it appears the HashTable reference is available in threads. Is there a way to have a global per thread?
 
I'm having a hard time grasping the AST compilation phase and what's happening there
 
6:42 PM
I thought using the module globals were per-thread, so now I'm a bit confused.
 
cmb
module globals are per thread
@Girgias you mean for a xmas tree? :P
maybe you want to modify an existing AST: phpinternalsbook.com/php7/extensions_design/…
 
@cmb Would be lovely
 
cmb
would modifying an AST work for you? (see above)
 
Well my idea currently is to overload the @ compilation phase, so evaluate the AST, and if there is an exception discard it and return a value
So maybe I'll have a look
But maybe the znode has info about if it threw an exception
 
@cmb In the thread this assertion is failing because the refcount is more than 1 when I try to add an element to the hash table stored in the module global.
Failing here, in _zend_hash_index_add_or_update_i.
Scratch that, the refcount is 0 when it fails.
 
cmb
7:00 PM
Not sure if it's related but you ZEND_TSRMLS_CACHE_UPDATE() in RINIT; I think that's wrong (although ext/skeleton does it)
 
@cmb If I comment that out, then it fails on the first access to one of the module globals.
 
cmb
@Trowski oh, I think MINIT isn't the right place, but rather GINIT (only GINIT is called for each new thread). There you must not use FIBER_G(fibers), but rather fiber_globals->fibers
see alsohttp://www.phpinternalsbook.com/php7/extensions_design/globals_management.html
 
7:16 PM
@cmb Awesome! That worked perfectly!
ext-fiber is now compatible with ext-parallel!
 
Hey, you got your async in my process manager!
No, you got your process manager in my async!
 
@Danack That article you linked is definitely an argument for limiting the number of threads you use with async software. amphp/parallel defaults to 4 * CPU cores, which is probably too many.
 
7:34 PM
Part of the reasoning is that parallel is meant to offload blocking or CPU intensive tasks. Though I think that's often not how it's used…
 
I haven't seen people use it in anger, but my belief is that it will be the thing that allows us to replace php-fpm eventually...
Also, we probably ought to have a rule that popular culture references over twenty years old need to be linked.
 
FPM be replaced by threads / async?
 
7:51 PM
@NikiC For fdiv(), is INF and -INF new or did those already exist? Are they magic constants?
 
@Crell INF is a (non-magic) constant
 
Does it have a value?
Or just "inf"? (Same for NAN)
 

« first day (3700 days earlier)      last day (1244 days later) »