« first day (3855 days earlier)      last day (1314 days later) » 
00:00 - 21:0021:00 - 00:00

00:22
I successfully built php from source in March. I'm trying again now, but I'm getting some errors around an extension or two.
Is it best to just use --disable-all ?
@BenMorss what branch are you building from?
I just rebased from master. I wondered if that was a bad idea :)
do you mind trying to build from a branch, say 8.0.5 for example?
@BenMorss Do a make clean, ./buildconf, and then do ./config.nice and make again (or make -j 4 to build with 4 cores).
I'd be happy to use a branch instead - whatever is best!
00:27
Levi's suggestion should do it
Ok! Here I go.
Already it removed one of the files I saw complaints about: ext/opcache/jit/zend_jit_x86.c
and, look at that, config.nice has the options I'd just been using for configure
Thanks, now the only error is one I introduced myself
I should be good from here :)
00:49
Rule of thumb I've learned to follow, if I run into errors when compiling php-src, make clean first then try again
make clean resolves most issues
does anyone here use slevomat/coding-standard rules on a php 8 project?
01:16
Uh oh 3v4l.org is down
Don't know how to function
02:00
All issues have been resolved!
Sunsetting API Authentication via Query Parameters, and the OAuth Applications API ・ API Requests has Under Maintenance
All issues have been resolved!
Sunsetting API Authentication via Query Parameters, and the OAuth Applications API ・ API Requests has Under Maintenance
All issues have been resolved!
02:30
Goodnight r11 <3
02:57
/night
 
1 hour later…
04:15
Opcache optimization assumes wrong part of ternary operator in if-condition ・ opcache ・ #81015
 
1 hour later…
05:29
\o
06:13
o/
Has anyone heard of correlation id passed back by webhook integration in cases where remote API interaction was taken with kind of correlation id passed for eg. in headers?
The thing is I integrate remote service via HTTP API which also have webhooks integration, sometimes and even maybe often I get 500 on create actions like HTTP POST but the real REST resource is being created and returning webhook triggered from remote to my server. It'd be no issue if I could pass desired UUID of resource I tend to create but since I get 500 even though the resource is created I have no clue about the identity of that entity.
On my side this leads to duplicate creation due to retry
I was wondering if anyone used correlation id's passed in all remote API interactions which then are passed back via webhook integration and if that makes sense at all?
What changed with regard to error handlers and/or how errors are raised between PHP 7.3 and PHP 7.4? github.com/sebastianbergmann/phpunit/issues/…
github down for anyone else ?
no, up and running
PING github.com (140.82.121.4) 56(84) bytes of data.

--- github.com ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
totally dead for me
Also works for me.
06:43
@SebastianBergmann
\implode([new \stdClass]);
throws Error, object of stdClass could not be converted to string
@JoeWatkins but there is a set_error_handler() called with $this so shouldn't it go through an ErrorHandler::__invoke() ?
it doesn't raise an error, it throws an exception
oh, ok so different mechanism, got it
@JoeWatkins Since PHP 7.4 it does :) Thanks! So this is not a general thing that changed but something specific to this function.
krakjoe@Fiji:/opt/src/php-src$ /opt/bin/php -r "echo (string) new stdClass;"

Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1
krakjoe@Fiji:/opt/src/php-src$
it's that ...
afk
06:54
Thanks!
 
1 hour later…
07:56
@Trowski We might need some asan support for fibers after all. There are fiber-related stack-use-after-return failures, though for now they're rare.
sounds scary
Hi guys, quick review welcome on github.com/php/php-src/pull/6944 (probably only for master, despite this is a quite trivial change)
s/failures/fuzzing failures/, missed the important word ^^
oh I wondered why I don't see them
08:12
And somehow our CI builds have gotten much slower since ~yesterday
y u no signing commits @NikiC ?
I see the slowdown also, no good ideas why
08:28
@RemiCollet I don't know enough about the details ... but master sounds like a good idea, and it looks superficially good to me
08:39
@JoeWatkins thanks, (in short, old deprecated inet functions are forbidden in some distro, e.g. RHEL-9)
08:50
@JoeWatkins I think it's a problem on the azure end ... I really hope it didn't just get permanently slower
09:00
maybe we can look at another big project on azure and see if they're suffering in the same way ?
I don't know who uses it
good call, have we ever done that before, are they quick or ?
iirc we used email before when we were setting up, that was pretty slow
They did fix developercommunity.visualstudio.com/t/… before, though I don't think it was quick. Though that was a different kind of issue
yeah, if this is a general issue, likely they already know about it also
@cmb Why is there your nick in the changelog here php.net/ChangeLog-7.php#7.4.18
09:36
just bumped into something similar to this 3v4l.org/AYo0g, which is stupid. I expected the deprecated notice for required param after optional here...
@cmb I didn't expect that to be classified as a sec issue
cmb
cmb
I let others decide whether this is a sec issue. :) Still, should be fixed anyway.
At least, I thought we have a bunch of cases where mysqlnd assumes a non-malicious server
@cmb Sure, fixing can't hurt ^^
cmb
cmb
@Dharman don't know what happened there, but should be fixed now
@NikiC might be a good idea to clarify that in the sec classification docs then :)
 
2 hours later…
11:41
Morning, all.
@Girgias Are you willing to help the guy who wrote us a mail? It sounds like a really good task: OCI8 and PHP 5.6 :D
8/
cmb
cmb
@Derick, thoughts on bugs.php.net/81013? IMHO the current default makes perfect sense.
I agree. XDEBUG_CONFIG should be avoided in general anyway. They can make a case for XDEBUG_MODE though - is it possible to white list these env vars?
cmb
cmb
11:57
I guess not, but that would seem to be a more appropriate FR.
morning :-)
12:13
\o
how bad of an idea is to create a small header file to be used as a library shim to adapt to multiple releases of a dependency? (for an extension that is)
quite a common thing to do
often called thing_common.h
Hmmm great, I'm obviously not very experienced in this hehe
thanks Joe!
what's the dependency ?
libgpiod
it handles gpio in the linux kernel
12:19
what versions are actually shipped ?
dealing with ioctl etc
(I know what it is)
1.4.x afaik
(sorry :-) )
but what is shipping in lastest raspian ?
what I'm getting at is that there's no sense in supporting very very old releases "just in case" someone is using it ...
raspbian ships 1.2.x
12:20
especially if the releases you are trying to support aren't actually supported by developers, or their apis changed because there was some problem with them ...
on their repository there is 1.3 up to 1.6 + master that is going to be released as 2.x
@NikiC with the current impl parent::'$prop::get'() will work though, right? But for actual use cases, do we actually need explicit parent accessor calls except from within the overriding child accessor methods? I think I already suggested that we treat direct $this->myVirtualProperty accesses within the accessors as parent access - I think this will solve 98% of the use cases and for the other 2% the indirect access by name (i.e. parent::'$myVirtualProperty::get'()) should be enough.
or do we need actual first-class syntax support for that?
some of the changes are like "gpiod_chip_name" being renamed to "gpiod_chip_get_name"
it's probably fine
I don't understand their versioning ... I've used it but don't have it committed to memory ... I just tried to install on my normal machine to see what I get and I get libgpiod2 which is version 1.5 ...
it's quite weird I agree
gonna have to map some constants that have been renamed as well, but so far so good :-)
12:36
@bwoebi That wouldn't work out of the box, as the accessors are not added as actual methods. Not sure we want to do that
there's another kind of api you could provide here ... you could provide access via a stream wrapper to gpio pins ...
might be a nice learning exercise too ...
@bwoebi Using $this->prop to refer to the parent property is an interesting idea ... but pretty magic :) I would expect a lot of confusion, especially when you mix different access kinds. For example, if you're inside set {} and you do var_dump($this->prop), does that access the parent property, or the child property, because of separate getter and setter guards?
@NikiC I'd expect only the actual get -> get access to access the parent
but the actual answer is magic ...
Knowing how these things work, I'd expect that as well :)
But for people who don't, having var_dump($this->prop) and $this->prop = 123 refer to different properties might be unintuitive
12:39
otherwise you'd get unexpected behavior when e.g. comparing to current value and using the getter for that in the setter
I would only change the behavior which is an error right now
@JoeWatkins wow, have no clue how to do such thing, but will def explore it
I didn't finish reading the thing yet, but I notice that it essentially, internally, turns user classes into something completely different to internal ones, while I'm sure we can fix that by adding api ... I'm not sure it's worth it, considering the 90% use case would appear to be much easier to implement consistently for both user and internal classes ... and not a pain in the ass for internal classes to actually use the feature ...
@NikiC are there concrete disadvantages to making the methods directly accessible via dynamic call?
At least I expected them to be there given error messages showing the names as TheClass::$theProp::get() etc.
maybe the api we need to add is simple, or can be simple, or I haven't read enough about it to judge it properly ...
@bwoebi From a technical perspective, I think doing that would be okay, but it seems pretty dubious design wise
12:49
@NikiC yeah - well, I consider property accessors to generally be sugar, a thin method wrapper … because they are functions. guess depends on the perspective
@bwoebi Something I just realized is that we probably need to make sure that guards get set ... somehow ... if the accessor methods get directly invoked from reflection, otherwise there's going to be misbehavior. Currently due to lack of error, but with your scheme it would just misbehave outright
and it's pretty hard to overlook how complicated it makes what could be a simple keyword, or combination of keywords ...
@NikiC good catch, yeah - should be done in any case.
@bwoebi Seems annoying to do :/
@NikiC the guards themselves could maybe be handled by a trivial opcode on start of the accessors? (and clear in leave helper)
12:54
also, you've made static or inline at least one call that makes it quite hard for an extension to re-implement any of this if they have special read/write_property object handlers ... I know all of this is fixable ...
optimizer could even elide the guard opcode if it's clear that it's not needed
cmb
cmb
@FlávioHeleno there is some (potetially outdated) documentation
@bwoebi could work...
@bwoebi probably not practical due to error handlers
@cmb thank you!! will take a look and possibly work on an alternative extension for gpio/spi/i2c based on streams :-D
@JoeWatkins indeed...
13:00
the patch itself is simpler than I expected it to be, I think possibly simpler than a previous version I read but might misremember ...
@NikiC hm? you mean when an error handler is invoked in an accessor function (or some leaf call down there) and then calling the function again?
@bwoebi yes
I'm honestly not sure what behaviour I'd expect there, what happens with __get/__set in that case currently?
@bwoebi it's guarded
@bwoebi For extra fun times, think about what happens if you have a fiber switch inside __get/__set (or an accessor)
Spoiler: The guard remains active, and some unrelated code is going to bypass magic
@NikiC should be fixed probably :-/
13:04
@bwoebi If you have any ideas on how... ^^
@NikiC track the current guards in some mapping which is backed up and restored on fiber context switch or error handler invocation … that's probably the high level how
the nice part here is that we can directly store pointers and their values here as they won't be dangling as long as the underlying stack exists
(this mapping could be probably a simple linear array lookup as we don't expect much nesting)
this would probably even simplify the current guards implementation… for reasons we currently have a dynamic guard zval at the end of properties on every object (with acc_guards)
@bwoebi But that would mean we always need to look up guards for the object, rather than having them stored directly on the object
It might be okay if we're reasonably sure that guards nest ~never
13:20
@NikiC In my head even if we have like 10 nested guards, doing this thing of lookup should be very inexpensive as it'll be a linear chunk of memory
@bwoebi If we don't care about pathological cases, yes
imagick throwing out “Uncaught ImagickException: unable to open file” ・ *Graphics related ・ #81016
@NikiC well the alternative would be just using a hashmap like we currently do…
wouldn't be particularly expensive either
at least not really more expensive than right now
@bwoebi Would need one more hashmap lookup (for the object) or the construction of a key that contains both the object and the property name
@NikiC right, we don't have multi-key lookup (like using the integer with the objects address and additionally the string)
13:38
@Ekin I think it's because a null default marks the parameter as nullable, thus bypasses the optional deprecation warning
@MateKocsis I'll send a reply that the PHP project doesn't support PHP 5.6 so non of our buisness and he needs to contact Oracle support
@NikiC Do you have a failing example?
@NikiC but no matter the data structure we end up using for the lookup, do you think the approach in general could be viable? i.e. a map object ptr, string key to guard flags which is globally switched when entering error handlers or fibers
so that it's mostly a question of implementation details then
14:02
this is a wider problem than you think it is
a fiber can switch while opcache holds a mutex on the cache, any cache read in the new context will deadlock ...
you can't solve these problems piecemeal ...
a simple solution to that one thing might be to use a recursive mutex ... but this is a wider problem than it appears ...
anything using normal primitives, either in php-src or outside of it, is going to effected by this strangeness ... there isn't always going to be a way out of it ...
/cc @beowbi @NikiC @Trowski
14:23
a complicated mistake that not enough people understand ... that we should reverse, immediately ... this is not worth it ... I'm absolutely certain there are things beyond our control, all of PHP is written with nothing like this execution model in mind, so are most of the libraries we use ... does curl use mutex, what about libxml ?
this cannot work
cmb
cmb
@JoeWatkins this sound like a serious issue!
Generators already make most of what you describe possible.
@JoeWatkins which mutex exactly?
Unless opcache executes user code while holding the mutex, a fiber switch is not possible.
@Trowski Nothing that would reproduce outside the fuzzer environment
14:32
@bwoebi one allocated in shared memory
@NikiC Hmm… well I can try setting up something, but it would be nice to have something to test against.
Maybe it's actually fuzzing specific ... the thing is that we perform a zend_bailout when certain limits are hit
Fibers deal with fatal errors, but I'm wondering right now what their interaction with zend_bailout is
@JoeWatkins I mean, to the best of my knowledge we don't invoke any opcache mutexes outside of compiler?
what ?
@JoeWatkins I don't think a fiber switch can happen while opcache holds a lock
In fact, no user code at all can run while opcache holds a lock
If it could that would cause many other issues
14:35
what about everything else that uses the same primitives ?
I really think this was a mistake ...
@NikiC I guess bailout could switch back to main too.
@JoeWatkins It's a good question. I wonder how this interacts with apcu
I actually feel sick ... this is horrible, I should have made much more noise ...
We generally also don't allow executing user code while the lock is held ... with the exception of the apcu_entry() API (which is a completely broken API btw)
these are not questions we should be asking now
14:37
Though with recent fixes, if you perform a fiber switch inside apcu_entry(), I think the only thing that happens is that you block all other processes from using the cache while you're switched away
morns
Which is how that should work.
@Trowski It probably effectively already does, right?
I mean, the top-level setjmp should've happened on the main thread
@NikiC Yes, so it should already be jumping out of the fiber stack.
I assume the fuzzer doesn't like jumping between stacks.
yes, or rather asan doesn't like that, when detect_stack_use_after_return=1 is used
Though I'm wondering if anything can go wrong with the cross-stack setjmp independently of that
14:49
I was wondering that myself. Maybe it would be better to switch back to main like I do for fatal errors.
Though that doesn't really work…
@Trowski Yeah, you don't know if the bailout address is on main or not
@NikiC Then I'm not sure asan support would matter because the longjmp would jump over it.
Perhaps it would be fine because both stacks would be marked as active. I'm not entirely clear on what that API does.
15:06
@Girgias yup, it's the null default indeed
@Trowski I think I can address this on the fuzzer side by disabling destructors on bailout
Which is what we also do for fatal errors
@NikiC Perfect. :D
Makes sense, I'm surprised that behavior was different.
Incident with GitHub Actions ・ GitHub Pages has Partial Outage
15:26
... maybe the reason packagist.org gives bad gateway ? ...
or not.
Does anyone know of any libraries / tools that might help me flatten WSDLs to a single file, preferably in PHP?
I'm using ReactPHP in a backend process that talks to a SOAP service and the reactphp-soap library doesn't currently support imports because of the way it downloads and feeds the WSDL into SoapClient as a data:// string (ref: https://github.com/clue/reactphp-soap/issues/53 )
Unfortunately the WSDL for the service I'm using isn't simple and has many imported xsds, some of which have their own imports.
if that are xincludes a dom document might resolve them, then dumping might work. from top of my head I can't remember how that was for WSDL. maybe interveening with the entity loader can also do it.
@AllenJB ^-- above
15:49
@NikiC Were you going to bring this to a vote? wiki.php.net/rfc/new_in_initializers
Minor Service Outage ・ GitHub Pages has Partial Outage
All issues have been resolved!
cmb
cmb
16:46
@Ekin, since lxr.php.net is down for years, and I can't imagine that anybody will make it work, is it okay for you to link to heap.space at php.net/sites.php#git? Otherwise I'll remove the OpenGrok paragraph.
@cmb of course, feel free to link to it anywhere
this one's not going anywhere
cmb
cmb
cool, thanks!
oh wow: "Please select a display mode: Fancy HTML (Best with Mozilla)"
@NikiC ok I'm calm ... that's not the problem
fiber suspended inside apcu-entry, same process re-enters apcu-entry ... in the case of apcu-entry it's already using a recursive mutex ... but in the majority of cases, recursive mutex aren't used because they're considered non-portable
so potentially the problem exists in software we don't control ...
@JoeWatkins I recently switched everything in apcu to test a recursion flag first
Because otherwise people would deadlock doing something like apcu_inc inside apcu_entry
As said before, it's a terrible API
16:59
it should be using a recursive mutex
and that would have been the correct fix if it isn't
apcu uses rwlocks
rw write locks cannot be recursive
oh yeah you're right, ages since I even read it ...
nevertheless, this is a potential problem in software that we can't just change
That's true
Though I would generally say that anything that holds a lock while running arbitrary PHP code is on super thin ground
I'm going to find out, I was so focused on the future that I didn't consider what it meant for now ...
The main thing fibers add to the picture is that they can bypass zend_try {
Which actually is a problem for apcu as well, not that I think on it
We do use that while having acquired a lock to make sure nothing bad happens on fatal errors. But now on fatal errors, we're going to switch back to the main thread
@Trowski I think we need to be a bit more careful about how fibers interact without bailouts. I'm thinking we may need to let bailouts actually bubble up to the top of the fiber before we do a switch to main.
17:07
sorry I missed these recent changes, I got no idea what's going on or why
@NikiC There's probably no reason to actually switch to the main thread, I was doing that mostly to keep the sanitizer happy, but that maybe should be handled differently.
@NikiC We also need to reduce how many bailouts there are, too.
Last I checked some extensions do bailout based error handling, which is just terrible.
Yeah, it's all over in soap.
cmb
cmb
17:26
shouldn't be hard to change that, and to fix the few remaining issues right away ;)
Let's just get rid of SOAP then :p
keep the object to xml conversion and back, remove the http client
Is there a recommended way for creating a CMakeLists.txt file for php-src in CLion?
@ramsey Look into compile database with compiledb -- that's what I do for php-src.
17:42
@LeviMorrison Are there any good resources for how to use it? Or just pip install compiledb and compiledb make?
@Sara how are you doing since your second vaccine?
@Trowski But you do need to end up back on the main thread somehow, right?
@LeviMorrison I think our remaining bailouts are in places nobody is willing to touch
18:01
@Tiffany flatline.png
that joke is risky af.
@NikiC Looks like ext/soap has like half of the remaining usages :|
that thing really needs to do away, it is not user friendly and it does not work properly
even within the broader context of soap, it is terribad
afaik the notorious >1000 do_http_request() function is still there, being terrible
(or whatever it is called)
@Tiffany Feels like the time I got hit by a humvee, why?
@LeviMorrison I got it working. I had to rm -rf the .idea folder and open a new project in CLion by clicking directly on the compile_commands.json file and choosing "Open as a Project." I may have been able to load it without removing the .idea folder and re-opening, but I couldn't figure it out.
@NikiC Maybe Datadog will pay @bwoebi to get rid of them :)
Bailouts cause us problems, so I'm only half-joking.
18:17
@Sara ouch :(
@NikiC curl and libxml appear safe, do any others spring to mind ?
is it just me, or should this be broken into two lines? if (is_file($file = (dirname($this->streamPath) ?: '.') . "/$imagePath")) { I spent a good few minutes trying to understand what it was doing, I feel like it's doing too much in one line and makes it harder to read
@NikiC Do I if abort is going to be called anyway?
@Tiffany In this case, I think $file should be assigned before the if -- it's not done conditionally.
Sometimes there will be things like this where the assignment is conditional:
that's what I was thinking... like $file = dirname($this->streamPath) :? '.'; then if (is_file($file . "/$imagePath")) {
18:21
if ($foo && ($file = /* ... */)) {
    // this is fine, as long as things aren't too complicated
}
just need to find something wrong with this class so I can justify opening a ticket, and include making that line readable...
they were the two I thought would bite us, so I feel a little better ...
a guy has been asking me for ages why he can't access his draytek router, finally got him to send me a pic of the setup
@Sara I was wondering cause I've read in here that the second one has caused people issues, so my question had two motivations: I was curious how you were feeling, and curious what I'm in for this weekend
@DaveRandom ohgodwhy
I actually know very specifically why and it's very long winded and boring, the tl;dr is that virgin do static IPs weirdly and very few people understand how they work, and whoever installed that has bullshitted their way out of the building
(if you care, they use a GRE tunnel to deliver a static which is tied to their endpoint so you can't pass an unNATed connection through to a 3rd party router with a /32)
18:27
Yay SO mobile chat
To be clear, the router is the one without any cabling plugged in? Otherwise my response is significantly less amusing.
both devices are routers, the guy thinks he is using the white one on the bottom, the one on the top is ISP-supplied and should be in modem mode for that setup to work
at the very minimum, the draytek needs a wire in it to communicate with stuff :-P
(it has power on the rear, which is a very annoying chassis design)
18:51
@DaveRandom … why would one do that?
these days you wouldn't you would probably use MPLS
it's business connection switched across the residential network
I don't know the specifics because I don't work from virgin but basically it feels like a reasonable thing to do 20 years ago
@Tiffany It's actually not too bad. Just joint aches and headaches
and "works" today so not enough motivation to update (and thus have to replace all end user hardware in the process)
but yeh I hope there is not a lot of life left in it because it's a pita to actually use
at the same time it also discourages people from getting static IPv4 addresses which can only be a good thing
@Sara I'm told that a joint can fix the head, and if I remember basic math the aches cancel each other out
PharData memory leak ・ PHAR related ・ #81017
19:08
regarding SOAP, is there any reason it couldn't run on top of HTTP streams, other than nobody having enough round tuits?
it probably break BC somehow
otherwise no
the SoapClient constructor has 50 million options, but I think most of them are actually things the stream context can handle
it's hard to tell, because neither is actually documented properly right now
it's not a case of getting around to it, it's a case of throwing that codebase in a river and throwing the river into the sun
I hate to keep banging this drum, but we really really really should not be feeding arbitrary external XML documents into libxml, which does not use zend mm
plus like a zillion other reasons but that's the one that matters
Every time I see somebody in here talking about having to work with some SOAP service I'm super thankful I don't have to do that anymore.
@DaveRandom hm never thought of it that way, you convinced me:D
19:17
<3
if I ever have to work with SOAP again, I will treat it just like any other XML service, and use SimpleXML
which, unfortunately, doesn't solve the libxml problem
honestly, this week, I recommend invoking node as an external program
or java but the warmup time on that is... big
but they both at least have tooling that is fit for purpose
I seem to remember there's a PHP extension somewhere to interface a Java XML parser; but being a) Java, and b) Apache Foundation, the list of dependencies takes about half an hour to read
@LeviMorrison It also looks like CLion supports opening a project as a Makefile project now, too.
surely there must be a modern XML library written in Rust or something that we could drop libxml in favour of?
19:25
I think @clue wrote a something for react but I think it's still libxml based, and suck the docs into memory at once (which is the actual problem)
doesn't XMLReader use a SAX-based parser?
I'm guessing it uses this: xmlsoft.org/xmlreader.html
My point was that I thought it went node-by-node so that it doesn't load everything into memory at once
it might still use libxml2 to do that, but that's how I thought it worked
yes, I was just trying to find the right words
the problem is, most people want a tree-based API
I'm maybe missing something, but I think that basically implies having that tree in memory somewhere
@ramsey I have better luck with compiledb, but yes, it's technically supported.
19:39
@IMSoP Now you have two problems :P
Morngins all
@PeeHaa eh, I don't know why everyone hates on SimpleXML so much
Because it's all kinds of broken and there are better tools :P
But pretty sure we already went over that :D
@IMSoP Yeah. If you want to traverse the DOM, the whole thing has to be in memory
@IMSoP Try using an XML document with namespaces with SimpleXML :-)
¯_(ツ)_/¯ I've always found SimpleXML always does basically what I want
@ramsey ->children(); that's literally it
there's some weirdness around unprefixed attributes, but that's the W3C's fault
you can iterate over them, but you can't necessarily reach directly to them
you can, but it's not easy or intuitive
19:42
$foo->children(SOME_NS)->bar->children(SOME_OTHER_NS)->baz
where's the problem?
@ramsey not afaik
it's been a while, so I can't remember the exact problems I had
there is a saxon wrapper but it's not free
@DaveRandom So, even xmlreader loads the whole doc into memory first?
most of the problems I see are a) the debug output on SimpleXMLElement is awful, which some day I'll do something about; and b) XML namespaces confuse everyone anyway
19:44
I remember hearing about this but can't remember the details, can anyone fill in the details? I heard of someone proposing backwards incompatible changes to the php language writing a script that automatically analyzed the php code of all github projects for ones that would break from the change, and automatically refactored the code such that the change won't break it, and then automatically created a pull request in every single project.
Now that's refactoring! Refactoring all of github at once...
not sure about that, I think there is an incremental parser in libxml, but either way it doesn't use zend mm
@IMSoP Definitely true for B 😂
@ramsey No it does not AFAIK
@DaveRandom it's not SAX-based, but it is streaming, assuming it is in fact this API: xmlsoft.org/xmlreader.html
@PeeHaa So, my understanding of SAX, which has no formal specification, is that operating on each piece of the document sequentially is SAX
19:47
I guess they were using PHP Parser from Nikita Popov. Perhaps he was also the person who used it in this way, not sure
unlike DOM, which does have a formal spec and has to be aware of every node in the tree
@ramsey skim-reading the above link, SAX is event-based (callbacks), XmlReader is visitor based (iterators)
@IMSoP Ah, yes. That would be another difference. That makes sense
But, at any rate, if you want to quickly parse a rather large XML document in PHP and save memory, then XMLReader is the way to do it, but you won't be able to do that with the built-in SoapClient
(if using SOAP)
indeed
there are a lot of fairy cheap improvements that can be made, just a basic measure of "how many byte did we pump into this thing so far" would be a start
19:53
Not using soap would be another
and using streams is also a relatively easy win
@PeeHaa that ship sailed in like 2004 tho
we just need to mysqlnd libxml out of php-src, should be peanuts
I wonder if they used Rector for the refactoring. Going to try it out. Any alternatives I should look into/try first, is that a good place to start? Need to make really targeted changes across entire code at once, such that it only changes the part of the code being refactored, not reformatting all the code.
I have spent a lot of time looking at ext/soap over several years and even tried/failed to improve it a couple of times. I do not have the energy/inclination to lead a project, but I have things to bring to the table and if I feel like it will accomplish something I will definitely spend time doing shit
19:56
@DaveRandom People are sloooooooooooooooooooowly moving away luckily though
k sweet, I'm going to bed, wake me up when it's gone
sounds reasonable
lets meet again and compare
@Sara so load up on meloxicam afterwards. I have osteoarthritis in my right hip, so I'm not looking forward to the joint aches bit
seriously though, I am well up for any of:
- ripping out libxml in favour of something else (better)
- working to improve PHP's binding around libxml
- working to improve libxml itself
I use it a lot and I wish it worked better, but it's too big for me on my own
20:06
I use it too much, but sure as hell am not going to touch any of that :P
"doesn't use zend mm" = "not re-entrant" = "not thread safe" = I think just basic static var overuse
like I have looked into it before and my inexpert eye concluded it was practical for a few people who aren't all that much cleverer than me
like there is a big knowledge threshold for improvement but I don't think a huge technical one
20:22
You know feelings? Since when?
20:32
May 2 at 22:11, by DaveRandom
personally it depends on which phase of my oscillating and difficult relationship with alcohol I am in yes
20:44
he means he can feel the oscillations happening through a tequila shot, got it <3
@Trowski Why would abort be called?
@NikiC Sorry, I meant to say exit.
But I see it actually calls zend_bailout().
@NikiC I've been experimenting with the sanitizer, and this works for all but the test that throws from a destructor: github.com/trowski/php-src/commit/…
I'm thinking that's the correct way to handle things, but I'm not sure what's going on in that case.
I dropped switching to main for a fatal, if there's a zend_bailout() within the fiber it calls exit(1).
Does that seem correct, or is that the wrong approach?
00:00 - 21:0021:00 - 00:00

« first day (3855 days earlier)      last day (1314 days later) »