« first day (3840 days earlier)      last day (1091 days later) » 

12:56 AM
@DaveRandom I'm comming for my daily dose of internet harassement
 
1:47 AM
@Girgias I was going to quote Ghostbusters 2 here, but was afraid that without context "You're short, your ugly, and you're a terrible burden on your poor mother" might come off too mean. Honestly, even with context it does.
 
I meant the context of my response, but good to know. :D
 
Ah, sorry yes, it's getting late here but I'm binge watching a show lol
 
PDO is driving me nuts
I start a transaction, I change some data, I commit the transaction, then it says there is no transaction started
The commit fails
I thought to myself "well maybe I am using more than one connection somewhere.."
so I searched the code for other calls to "commit". It's only called in this one class.
Ok, so maybe there are multiple object instances calling "commit"?
So I gave the object a unique ID and logged when the transaction starts and commits
There is only one object starting and commiting, it is the same object. The begin is successful, the commit fails because it hasn't begun
rollBack is not being called. I put logging in place in case it was. Nope
I thought maybe I have a completely different connection type (mysqli, not PDO) that is doing stuff after the transaction begins, and somehow enabling auto commit.
I find some other code like that, and changed it to not run
nothing changed
 
2:11 AM
PDO might keep track of the transaction status by itself, but it can be wrong as some statement in some DBs will always commit a transaction.
However, some PDO drivers will not use PDOs internal (naive) tracking and ask the DB directly
Which might explain the disparity
 
2:58 AM
round() fail if ini 'precision' value > 16 ・ *Math Functions ・ #80973
 
3:08 AM
That reminds me of an old joke.
Pirate walks into a bar with a giant helm for a belt buckle. Bartender ask, "What's with the wheel? Isn't it a little bulky?" Pirate replies, "Yar, it's drivin' me nuts!"
 
 
2 hours later…
5:22 AM
@CraigFrancis any response from dmitry ?
(or anyone, actually)
 
5:39 AM
Not yet... I don’t know how fast these things move, maybe people are on holiday / taking a break?
 
hey,

Can anyone teach me how can fill missing chart data using only php?
 
(bbl, off for a bike ride and walk, for a bit of a distraction).
 
 
1 hour later…
7:12 AM
Incident with GitHub Actions ・ GitHub Pages has Partial Outage
 
@Crell ping
 
7:29 AM
@CraigFrancis I'm interested in the benchmark! Actually, an official PHP benchmark suite is something I've been planning to start working since months. A few weeks ago I started a POC, but haven't got far. So if Dmitry doesn't take it, I might be able to help.
Btw my idea is to create an automatic cloud-based infrastructure via Terraform where the Zend microbenchmarks, and demo apps of the major frameworks (e.g. Symfony, Laravel, Wordpress) was run in different setups (with/without preloading, with/without JIT).
 
7:47 AM
morning o/
 
7:58 AM
\o
 
8:39 AM
All issues have been resolved!
 
cmb
9:24 AM
@Derick -1073741819 is a segfault; -1073740791 is STATUS_STACK_BUFFER_OVERRUN; I'll have a closer look
 
why these magic numbers? :-)
which I couldn't google for
 
cmb
you need to convert to unsigned, and then to hex C0000005 and C0000409 :)
 
what the actual fuck, that's ridiculous ...
 
10:08 AM
the sign bit indicates a system error
but yes, ms really should list the decimal on the lookup tables so they are googleable
in windows the return value is a DWORD btw, it's just that most things print it as a signed int32 for "historical reasons"
 
Hi people o/
 
Hi Dr Nick!
 
\o
 
is there an article on what's coming to xdebug 3 ? :)
 
cmb
the early return prevents some resources from properly being released
@DaveRandom I guess that Windows isn't made for people knowing what a SIGSEGV is anyway. It's not made for devs at all; otherwise Win Defender wouldn't constantly flag github.com/xdebug/xdebug/blob/master/tests/debugger/… as severe security issue.
 
@ln-s xdebug 3 is already out and the articles exist on dericks blog afaik
 
heh
 
10:50 AM
@beberlei Didn't know I'm still on 7, I'm about to switch to 8
thanks!
 
Xdebug 3 is for PHP 7.2 and later
 
Ok so I can use it with 7 too? Nice, for some reason I thought it was 8 only
 
@cmb DO you know which resources? I can't reproduce this on Linux. And why would that cause a STACK_OVERRUN?
 
(checking upgrade list right now)
 
this sounds an awful lot like the issues that that @Trowski was hitting a few weeks ago with fibers btw @cmb @Derick, may be related, I forget the details will try and find refs in a bit
 
10:53 AM
@cmb Is it the ts_free_id perhaps?
 
cmb
@Derick I'm not exactly sure. That happens on module (DLL) unloading. I think it is the ts_free_id() which isn't called. But why are you bailing out early anyway?
 
Because none of the other things should have allocated anything when the mode is off
 
cmb
I'm checking whether the missing ts_free_id() is the issue.
 
There are no leaks...
 
cmb
 xdebug.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xdebug.c b/xdebug.c
index e135bb44..1715f40f 100644
--- a/xdebug.c
+++ b/xdebug.c
@@ -567,6 +567,7 @@ PHP_MINIT_FUNCTION(xdebug)
 PHP_MSHUTDOWN_FUNCTION(xdebug)
 {
 	if (XDEBUG_MODE_IS_OFF()) {
+		ts_free_id(xdebug_globals_id);
 		return SUCCESS;
 	}
would solve it
of course, just a POC
 
10:56 AM
Did you test that? I can just push that in my branch and let appveyor tell me
 
cmb
I tested that, but that should only be done for ZTS.
 
of course
 
Need to wait as it's testing something else right now
I went with github.com/xdebug/xdebug/pull/735/… — I like my early returns.
 
cmb
yes, that should be fine as well
 
11:03 AM
I wonder why this wasn't an issue on Linux/OSX
 
cmb
I guess it's MSVC runtime which is a bit picky here.
 
@MateKocsis Hi Máté, that sounds really good. Forgive my ignorance of internals (I'm more the heathen/external/security/programmer type). While I'm under impression that Dmitry is the gold-standard of perf testing, would you be in a good position to test Joe's patch for is_literal()? Tests with major frameworks sound ideal, and I'm happy to support that (I assume this would help internals for general testing as well).
 
11:29 AM
@cmd
@cmb It seems to do the trick on CI as well. Thank you!
 
cmb
yw :)
@Derick, did you see github.com/php/php-src/pull/6880?
 
@CraigFrancis Yeah, I agree that Dmitry is THE ONE when it comes to perf testing, but I also have experience since I'm maintaining a DI container benchmark (github.com/kocsismate/php-di-container-benchmarks) for quite a few years, and it helped Symfony and PHP-DI (as well as my very own lib) several times to catch perf issues and boost performance. If you would like to also measure the number of executed instructions then I'll have to dig into this topic.
And you are right, my ultimate goal is to create a benchmark suite that the PHP project could use regularly. But of course, now I'd only develop the core functionality what is needed for is_literal(), and then I'd iterate on it on my own expense. :) If this sounds good for you.
 
11:56 AM
Right down my alley
 
12:21 PM
@Sjon ping
 
12:39 PM
@cmb I hadn't, but Xdebug should link directly to zlib, so why would that need anything on the PHP side?
 
@MateKocsis Yep, I think that sounds good, I suspect Dmitry is a little busy at the moment, so it might be a good idea to do an initial test run now? @JoeWatkins, what do you think?
 
cmb
@Derick that wouldn't work for static Xdebug, but that's not really relevant for Windows anyway. I'll give it another try.
 
@CraigFrancis I'm not even certain that perf is a problem, but you've mentioned it really loudly now so you need to deal with the argument ...
a sub 1% deviation is probably just within the margin of error for the benchmark ... when we're looking at such tiny differences, numbers are only partly useful, we need to know why we get those numbers - have we somehow introduced code that introduces cache misses, is there anything we can actually do about it ...
those answers are only going to come from 1 place, dmitry, if indeed there's a problem ...
 
@JoeWatkins I hope it isn't either (and my primitive tests make me think it's fine), but I suspect that would be the main argument against it, and having some numbers to back it up, from someone who can ideally put it in context (as in, X says it's fine), would hopefully avoid those concerns.
 
the only people whose words carry any weight with the entirety of internals there are nikita and dmitry ...
 
12:52 PM
ok... I have emailed dmitry on Sunday, and I did an initial email to nikita on the 12th (and followed up on the 15th with nikita asking to ignore that, as I was going to re-post on internals)... I hope I've got the right email addresses for them... I assume they are busy at the moment.
 
1:28 PM
I think Dmitry has his hands full with JIT for ARM
 
@Girgias oh, yeah, I suspect that would be a tricky one, thanks for the heads up.
 
2:14 PM
@Crell Partial instanceof Closure
 
 
2 hours later…
3:55 PM
o/
 
4:23 PM
@Crell Finally ordered a chair that will hopefully be better for my back. you have been instrumental in making me stop procrastinating that, thanks :)
I took a herman miller, but sadly not the embody, maybe if I ever get to work for nasa or something :)
 
@Girgias Ah yes, the culprit was TRUNCATE. It turns out TRUNCATE is special. Really special...
 
Well there's your explanation :p
 
What would be the best way to integrate node with php (as in use node for the front end and have node be the front end)?
 
?????
NodeJS is a server
JS runs natively on the browser
 
Yeah I know, and I want to use react as front end but I am not sure if that is possible.
 
4:29 PM
yeah, it is
 
That would really make my day if I could figure out how to do that.,
 
React is JS, so why would it not work?
 
React was designed for the front end..
 
Exactly, the issue I run into is that react requires node doesn't it?
 
y'all, it's ok, it is confusing to develop with both node and php at first.
@TylerLazenby no, react requires node when you bundle it.
generally the framework will also have a dev-server, which will run on node
 
4:31 PM
Oh? Ok because every installation guide I have seen says that react is installed with node.
 
to be precise: react (the library) is installed with npm (node package manager)
with react (the library) you can create single page apps.
these apps consist of javascript bundles, that are served from a web server, that can be whatever you want
once the bundles exist, generally with something like npm run build, they are static files, you can serve them however you want.
 
Right, the issue is I am using cakephp, I have never used node to create any kind of website before, but the node framework really lends iteself to the DRY principal and I kind am over constantly reloading my pages to see if a javascript change works
 
oh. that is unrelated to php, look into hot module replacement
 
Hot module replacement got it
 
but you really don't want to set that up yourself
if you are using a framework, there's generally a npm run dev or somethign that generates a local development server that will do that for you.
because believe me, it's a nightmare to set up.
 
4:35 PM
yeah I know... I haven't really even tried at this point because I know that running your website on a server pretty much means you either need to serve it on the default ports, or have a server communicate on one port and server on another.
 
4:46 PM
@TylerLazenby I'm not sure what you mean, but it feels like you want to have too many servers there... if you already have a cake php app, that is served from an (presumably apache) server, you don't need another one for the react part. the apache server can expose the react bundles.
unrelatingly, is there some page that would be like "the lazy programmer introduction to hacking php-src"?
 
@Girgias Changed to to a regular DELETE for now. I guess TRUNCATE is faster but doesn't work with triggers or transactions
 
@FélixGagnon-Grenier phpinternalsbook?
 
@Girgias why that looks very much like it, minus maybe the "lazy" part :P
 
@FélixGagnon-Grenier Well... the lazy bit is kinda impossible I think :p
 
5:08 PM
Howdy to most of yall that probably recognize me. Im coming in to ask if I could ask a question... No Really... Im wondering if yall would take a look at a motorcycle classifieds I built from scratch with nothing more than lots of learning and Notepad++
Problem is: This classifieds is PERFECTLY simplified and optimized yet noone will touch it (Visitors w/ motorcycles for sale elsewhere)
So... hoping for input
 
hm ?
Is it open source software ?
 
I think people are STUPID to not take advantage of what I built
No, Not open source. Hand built
100% Original
No templates etc
 
For those who worked with Amp / ReactPHP, which term would you use to describe Loop::defer / Loop::delay, Loop::onReadable and so on? Currently Amp uses the term Watcher.
 
Watcher / Observer is fine I guess
?
@Stuart How can anyone look at your code if it's not open source ? I'm not following
where is the code
 
Infact I encourage anyone to follow the full flow and I'll delete the sample fake classifieds ad afterwards
Its not about the code
Code is on my hosting providers server
 
5:14 PM
Then it doesn't belongs here
 
Yea yea yea
 
@Danack Hey o/
 
That might be the case if yall didnt talk about every other topic under the sun here
Watch long enuff and youll see topics discussed here that have nothing to do with web dev
Im just asking yall to take a look at the UI and offer any criticism / suggestions
Code works perfectly
My visitors know nothing about code. This is an investigation into why noone uses the classifieds
What scares them off
@ln-s See above: "ordered a chair that will hopefully be better for my back. you have been instrumental in making me stop procrastinating that, thanks :)
I took a herman miller, but sadly not the embody, maybe if I ever get to work for nasa or something :)
"
Is that related to code?
 
ghosts, possibly your code is haunted, check for ghosts ...
 
and quit yer snitching
 
5:19 PM
yeah I agree, ghosts dude
get a Ouija board
 
not gonna do you any good
 
clearly ghosts
 
Im well known here
 
@JoeWatkins Demons
demons everywhere
See? We are talking about demons and rose mary's baby right now, nothing to do with code, SNAP!
 
@ln-s thanks for wasting my time trying to explain anything to you. Run along now
 
5:21 PM
I'll just sit here, thanks o/
Get a life is a cool limp bizkit song
I dig it
 
talk about demons?
 
No no more demons
 
Nvrmnd
 
Ghosts is the new thing, as stated by joe
 
Enjoy your head banging heavy metal
and run along
 
5:23 PM
I told you I'll just sit here I don't want to run
 
limp bizkit is not heavy metal ... and you have a very bad attitude ...
 
Yeah it's nu metal at most
 
this is not how you ask for help
 
out of genre, out of attitude
 
Sorry Everyone... If anyone would'nt mind engaging in meaningful discussion Im all ears
It was when I came in and your earlier response isnt how to offer help @JoeWatkins
 
5:25 PM
I wasn't trying to offer any help, you are trying to ask for it ...
 
It's the "people are stupid I'm a genius" attitude, I've seen it before, helpless case, requires years of therapy
 
@ln-s Hey, I'm getting better :-P
 
hahaha
 
healthy case of humility
take one
 
6:00 PM
Speaking about demons youtube.com/watch?v=WllOatNmBK4
 
6:29 PM
PHP puts SO files into a path like lib/php/extensions/no-debug-non-zts20190902. Parts of this I understand. The lib/php part definitely make sense, because these are plugins (not regular lib*.so that anyone could load up). I understand the no-debug-non-zts20190902 part, though I would have preferred ndebug-nts-$date, but it's fine. Why extensions though? Is there some specific reason you might put things into lib/php other than extensions?
 
@PeeHaa yes that is the latest
 
Is 8 not available yet?
 
@LeviMorrison Future proofing? If you don't put it in a named subfolder then you probably never can.
 
@Sara But it's already in a named subfolder php?
 
Yeah, I mean a named subfolder under php, obv.
 
6:39 PM
@PeeHaa forgot to add it to windows build it seems
 
Only thing I can think of is dependencies, but those would go in lib/ directly, I think?
 
I'll also say it's self-describing by having that there.
lib/php/no-debug-non-zts20190902 <--- What's in that folder? The php binary? Scripts? A dwarf named Robert?
I dunno, I'm just making guesses. I had nothing to do with that naming. Seems fine to me though.
 
Poor Robert.
 
@beberlei It's great to hear it should be there all ready :)
 
@Trowski Don't judge Robert. She likes it in that folder.
 
6:58 PM
@Sara I'll go with a dwarf named Robert
did I win ?
I always thought that the naming is a tad strange
for that folder
lib/php/<version>/extensions
would be sysadmin friendly
if you want to have different php versions compiled with different things, paths must be specified during the configure stage, that's it
 
7:17 PM
The weird thing to me is that extensions get versioned on build type (debug,nts), but not headers, but headers also depend on build type...
You can't actually install two PHP versions over the top each other because of this (and other reasons), so why do it for libs? Dunno.
 
@LeviMorrison wait wut?
til
I always assumed the headers were specific to the build config in every ABI-relevant way
(API? never been 100% clear on that)
 
7:35 PM
@DaveRandom They are, but this isn't reflected in the folder structure like it is for lib/.
 
sorry yes that's what I meant, I thought they were spit out with the build slug in the folder structure
though I have never looked specifically
that seems like an oversight
 
Debian overrides these vars, apparently: packages.debian.org/buster/amd64/php7.3-dev/filelist. They do it "right".
 
I started trying to write an ELI5 explanation of ABI versus API and realized I need more diagrams and pictures than SOChat really offers. I'd suggest googling it. :)
 
I did a few years ago I think around the 5.5/5.6 boundary when there was an ABI break that kicked off on the list
I understood it a bit then, and I will indeed google it again later
cheers for the effort though :-)
 
I guess the simplest version is tsrm_ls.
In PHP5 (zts builds) you might have: void php_do_thing(int a, void ***tsrm_ls)
In PHP7 (also zts build) you'd have: void php_do_string(int a)
Because we got rid of tsrm_ls in 7.
These are binary INcompatable, because one takes an argument the other does not.
However, they are SOURCE compatable, because they can both be compiled by calling with: php_do_string(123 TSRMLS_CC)

Thus ABI breaks (the binary interface is different), but API is not broken (the some calling code compiles either way).
You'll see that in other places in the source where php_do_thing() is a real function in one version (e.g. 7.1), but in the next version, it actually expands out to php_do_thing_ex(..., 123);
Again, the calling code compiles and works as expected either way, but the underlying function is now exported as a different symbol with a different set of arguments.
Maintaining API compat is VERY important so that 3rd party extensions don't suddenly break (though we do break it sometimes). Maintaining ABI compat is only really important in branches though, because users expect to have to rebuild extensions between minor releases, and there's no effort required on the part of the extension maintainer to keep it functional.
Looks like I wrote that ELI5 anyway
 
7:48 PM
I don't think my 5 year old would understand, sorry.
 
so in the context of output headers - those are "absolute" (not passed through the pre-processor), right? or do the TRSM macros appear in them, which would presumably make the zts/nts builds "compatible" again? or did I misunderstand?
in fact actually here's my real question: do the output headers constitute API or ABI? do they describe the binary interface directly, or allow a bit of fuzzing?
 
8:14 PM
What do you mean by "output headers"?
 
Is there a format for hex numbers in phpt?
Oh, it is %x, just without including the 0x, so 0x%x.
 
8:47 PM
@Sara the header files that the build system spits out for e.g. a PHP build in order for extensions to be built against it
the thing I #include from a 3rd party lib
 
why do *_float things exist if all representations of real numbers inside PHP are doubles ... besides "historical reasons"
 
other historical reasons
 
xD
Would be interested to know what is the name of the non aliased function is_(double|float) so my code reflects better the PHP intention (due to intention reasons not of performance reasons)
 
tbf they are merely "floating point values", there's currently nothing to stop us from changing the implementation down the line (e.g. to quads)
 
is_double is an alias of is_float got it
 
8:50 PM
@DaveRandom API's are for humans - source code, the text in headers, names of functions, argument order and so on, ABI's are for machines - the code that results in the compilation of source code, so structure layout, calling conventions and so on ...
 
OK... and the headers that I install e.g. if I install a *-devel package fall into which category?
tnx btw both @JoeWatkins @Sara
 
they contain both the ABI and API
take a simple example
 
is that "an API which describes the ABI" or two separate things?
 
take a header that forward defines some structure, and then functions that take pointers to that structure
that structures form is not part of the API
if you move the definition into the header, you made it part of the ABI
 
9:07 PM
what if I move some pre-processor magic into a header (e.g. a function with TSRMLS_DC)? do I ship that file before or after it went through cpp?
that's what I am getting at, and I realise the question may represent a misunderstanding of something else
 
you don't ordinarily see the result of pre-processing
it's more complex than the simple example, there are some changes you can make that wouldn't be considered an ABI break (by some standards) if the struct were in the header, even though they technically changed the binary interface ... but for the purposes of understanding the difference - when the structure is not an exported public symbol, it's name is part of the API, when the layout is exported publicly it becomes part of the ABI - you can't change that struct (generally) without code
that was compiled against the old layout breaking ...
 
9:25 PM
tnx... I may come back with follow up questions <3
 
9:50 PM
good lord is this really valid code? wiki.php.net/rfc/mysqli_fetch_column#future_scope
I mean the foreach-push-destructure madness
 
$result = $mysqli->query('SELECT username FROM users');
$usernames = [];
foreach ($result as ['username' => $usernames[]]);
                                          // ^what dis?
You mean, it's surprising you can do an array-push inside array-destructure?
 
Wrong diff between 2 dates in different timezones ・ Date/time related ・ #80974
 
@DaveRandom Gotcha. I wouldn't call them "output" headers, but I can see how you got to that nme. :D
 
for future ref, what would you call them? :-)
 
Just headers
 
10:02 PM
oh lol
 
They're not generated by the build (apart from config.h), they're just part of the repo having been hand written by some human at some point.
 
ahh right, I thought they would be pre-processed and made "relevant to the build" perhaps
 
And yes, they haven't been preprocess at the point that they exist in the devel tree. Though they are of course run through the preprocessor when you compile something with them.
 
would that be possible/sensible potentially?
 
config.h is where the "relevant to the build" stuff exists.
 
10:04 PM
ahhhh right of course
 
Actually that last statement was false. deleted.
 
tbh I think I have always assumed the build process is perhaps more magical than it really is
I find autotools and m4sh and all that stuff completely impenetrable, I do not have time to learn 9 more DSLs :-P
that's on me tho obv
 
There are only about 4 people in the world who understand autotools to begin with.
 
is one of them RS
 
RS?
 
cmb
10:10 PM
@DaveRandom well, then consider to have a closer look at the Windows build chain :p
 
Richard Stallman
 
cmb
Pramatic view on API/ABI: consider an app which uses a shared lib. If you can swap out the lib (.so/.dll) with another version without the need to rebuild the app, the lib versions are ABI compatible. If you can't, but you still can rebuild the app against the lib (.h,.c) without changes, the lib is at least API compatible.
 
@cmb what you mean the absolutely insane JScript DSL that is actually specifically designed to emulate m4? :-P
I do find it it painfully hilarious that ecma is wooly enough to make that possible
@cmb you might be able to tell me this in language I understand - what is the difference between a dll and a ".lib" ?
is there one, other than name?
 
cmb
10:27 PM
Maybe, dll is used at runtime, lib is used at compile time?
 
We should switch to CMake. I actually ported the main Zend folder once -- it's the extension ecosystem that's harder to deal with.
Once CMake is stable enough, kill off autotools and ... whatever thing that windows build is using.
 
cmb
I would really love that, but yeah, external extensions would be a serious issue.
 
CMake is cross-platform, and then we can hopefully co-design a better "phpize" workflow that works across platforms too.
 
cmb
Yes, of course, but you can't break hundreds if not thousands of existing extensions. :(
 
Would it be practical to maintain two build systems in parallel for a time?
I can't think of technical reasons against it, but there would certainly be a hassle.
 
10:33 PM
@cmb presumably this as I only see references to them when building things, just wonder what the practical difference is
 
cmb
I wonder for quite some time whether there's a way forward. (regarding the build system)
 
I have seen it come up so many times that I assume we are waiting for the point when "hassle of current system" > "hassle of switching to CMake"
no idea whether that time is now
 
@cmb Of course you can -- over years.
Let's say we have "experimental" support in PHP 8.2. Then in 9.0 we tell the ecosystem "seriously please migrate to cmake, open issues along the way, because we plan on removing the old ways in 10.0".
 
Would love to see meson + ninja
 
All I know about meson is they got the rpath defaults wrong. Only reason I know that is that hit it the very first time I tried using meson :)
 
10:46 PM
everything i built with meson and ninja "just worked" for me
not saying that the configure + make combo is a bad thing
 
cmb
@DaveRandom roughly: DLLs allow to share code between different clients, and to ship bug fixes without the need to rebuild their clients; the drawbacks are "DLL hell" and less optimized builds ("whole-program optimization")
 
11:08 PM
@LeviMorrison yes very much this - does that work?
 
DGF
11:27 PM
Hey. I'm testing some stuff out: https://3v4l.org/rh16e
When I run `print_r($errors)` the output shows "self::MIN_USERNAME", etc... Shouldn't the output be the values of the `const` since it's between "" ?
Wrong one: 3v4l.org/8Makd
 

« first day (3840 days earlier)      last day (1091 days later) »