« first day (4706 days earlier)      last day (467 days later) » 

06:39
@Crell Awww
> I couldn't find any other compiled DI containers that use match() internally. The only other compiled DI container I know of is Laravel's IoC container, but it doesn't use match() internally.

> I hope you can find the DI container you are looking for.
 
3 hours later…
09:42
Good Morning and Happy Monday!
10:33
Happy Monday :-)
11:32
I heard this over the weekend and thought it was funny... "My wife really loves me... in fact she worships me. She puts burnt offerings before me every evening."
11:46
@Crell Yes, I made use of match in my DI Container (github.com/woohoolabs/zen). And I maintain a benchmark (github.com/kocsismate/php-di-container-benchmarks), albeit I haven't updated it for a long time..
11:57
@crell @Tiffany You can see match in action here: https://raw.githubusercontent.com/kocsismate/php-di-container-benchmarks/master/src/Container/Zen/Resource/CompiledSingletonContainer.php

Using match() allowed me to completely inline the code retrieving the services into a single get() method, which boosted performance quite much due to elimination of a few method calls.
Actually, Zen became significantly faster than Symfony DI in most cases, which is also exceptionally fast compared to the rest of the containers. PHP-DI also performs very well since v6.x. Previously, it was among the slower ones (php-di.org/news/21-php-di-6-compiled-container.html).
 
2 hours later…
13:58
@kelunik The Amphp tests failed in nightly github.com/php/php-src/actions/runs/6074048375/job/… "Argument #2 ($closeCode) must be of type int, Amp\Websocket\WebsocketCloseInfo given, called in Rfc6455Client.php on line 313". Might this be related to changes from yesterday? (We usually don't care about test failures in nightly, but this got reported because PHPUnit sets exit code to 255 on crashes)
 
1 hour later…
15:11
@MateKocsis Ah ha, OK. I'll have to look into it. (Context: I'm benchmarking some other comparative libraries, using PHP-DI since they all rely on a container, and the container impact is huge it turns out, so I am debating replacing it to get more reliable benchmarks.)
16:02
@IluTov Yes, that's related to changes from yesterday.
16:30
@Crell "Huge" as in 2% of total runtime...? ;) Or how much?
>50% of the runtime in some cases. (I'm testing different kernel designs, and it turns out different kernel designs rely on the container a very different amount. Who knew?)
@Crell Hm for which type of load?
Just displaying a dynamic home page?
At the moment I'm testing just the kernel, so all other actors are as trivially small as I can make them.
(Eg, I have it plugged into a hard-coded router that's just a 4 element array internally.)
Eventually this will all get blogged, but I'm not sure how to know when I'm done with my testing. :-)
17:21
I'm mainly comparing Symfony-style event-driven design vs PSR-15 middlewares. I want to include a Laravel style kernel, but I can barely understand how that damned thing works.
17:41
@kelunik Great, thanks
18:15
@Crell That seems a bit on the high side, is there any additional loading taking place, reading / parsing config files on demand as part of the factory etc?
 
2 hours later…
19:51
Is there a way I can identify all errors arising from any part of my PHP application? I need to create a page that will show all these errors, but I don't want to go to each page of the error, but rather have all of them in one place, kinda like a log, but instead is in log.php file. Hint: The application does have a root, which I think could be used.
 
1 hour later…
21:02
I am creating a monitoring tool. So I need to capture all errors.
21:18
Create a file that uses set_error_handler to store the errors&warnings&whatever in a log. I believe you can use opcache's preloading then to automatically inject that file for each request
Thank you @nielsdos
21:50
@MarkR There's 2 sources: The action/controller (which is pulled out of the container on demand), and in those that use an event-driven approach, the events are services that get loaded on demand.

« first day (4706 days earlier)      last day (467 days later) »