PHP Reddit – Telegram
PHP Reddit
34 subscribers
289 photos
37 videos
24.8K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
MapQueryBuilder in 7.3 parsing problem

Hello everyone,

I have a problem in app, and I wondered if any of you had the same ?

I have a route with an invoke like this :
__invoke(...stuffs, #[MapRequestPayload] MyDTO $dto)
{
dump($dto);
}

MyDTO class construct looks like this :

public function __construct(
..stuffs,
/**@var array<MyOtherDTO> */
public array $otherDTOs = []
)

The problem is that when getting datas from the request through the MapRequestPayload, instead of having in MyDTO an array of MyOtherDTO, I get an array of arrays...
I tried to rollback to Symfony 7.2 and it reworked perfectly, so I'm sure the problem was introduced by the update to 7.3.

Does any of you have similar issue ?
Thx 😀

https://redd.it/1nebngt
@r_php
Is PHP still in demand in the AI-Tech era?

Well, guys you will agree with me - AI can write basic codes or maybe advanced code in the upcoming days. But AI lacks creativity and leadership. That's where human come into the picture. If you're creative enough and the one who like to play with code then, nobody can take your job. You are in demand today, tomorrow and in the future.

Let me give you some data which makes my statement more stronger.

According to Clariontech, PHP is used by approximately 75%-79% of all websites utilizing server-side language, with WordPress (built on PHP) alone fueling up 43% of the internet world in 2025. A survey done by Stack Overflow Developer in 2025 revealed that PHP becomes the top 10 most utilized language among developers worldwide, which shows the strong dominance of PHP in the global market.

Now, comes to the job scope of PHP. According to Bitbyhost, the demand for PHP developer is skyrocketing in this AI era, with hunders and thousands of job posting worldwide and salaries averaging $89,500 in the US (Indeed Salary Data, 2025).

Now comes to the entry-level PHP jobs.

According to Accesto, entry-level PHP developer job continues to increase due to vast number of PHP-based legacy systems and ongoing site development, especially for CMS solutions and APIs.

From these data, we can say that PHP is not "dead", it holds a strong position in the modern web development with continued updates and vast developers ecosystem.

As PHP has huge demand in the market so, US medium-sized and giant companies like Microsoft, Meta, Technource and Bairesdev are hiring PHP developers by offering attractive packages because they know the value of PHP developers in this AI-Tech era.

So, guys from the above data and statements you can understand the essence and demand for PHP developers in 2025. So, if you want to learn PHP then, go for it without any second thought. If you're persuing PHP then, focus and learn it and also become creative which makes you unique in the long-term.

One thing is left to say from my side "All the Best guys for your upcoming bright and shiny career."



https://redd.it/1nev73v
@r_php
My PHP httpresponsecode is not sending status 200 but status code 302?

Hi all I am facing an issue with my Webhook response code whereby I am sending a Http response code of 302 (redirect) based on my http server logs.
This 302 redirect is overriding my default HTTP response code 200 I have set up in my noscripts.
The 302 redirect is coming from the requireonce in my main noscript below but it is after my httpresponsecode(200).
Any suggestion how do I ensure only my main noscript's http
responcecode(200) is being sent out and not the requireonce files.
We are using PHP version 5 on our end.
Code snippet as below:


  if (hashequals($providedsignature, $yourHash)) {

    httpresponsecode(200);

    if ($product === 'v1'){
        $pymntGateway='curlec';
        requireonce "v1backend.php"; (302 redirect from here)
    }
    elseif ($product === 'v2'){
        $pymntGateway='curlec';
        requireonce "v2backend.php"; (302 redirect from here)
    }
    else{
        httpresponsecode(202);
        exit('Unknown product.');
    }

  }
  else{
      httpresponsecode(403); // Forbidden
    exit('Invalid signature.');
  }



https://redd.it/1nexuc6
@r_php
Benchmark difference with FrankenPHP vs without FrankenPHP?

I was looking at the TechEmpower Web Benchmark, PHP section: https://www.techempower.com/benchmarks/#section=data-r23&l=zik073-pa7

I would imagine FrankenPHP has better performance because it is written in Go, etc, but I noticed something unexpected from the benchmark.

The best performer is "php-ngx-pgsql" with a score of 785961 but "php-frankenphp" is way down the list with a score of only 129068. FrankenPHP seems to perform even worse than Fiber-based solutions (e.g. Workerman, which has a best record "workerman-pgsql" with score 742577, right after "php-ngx-pgsql").

What might explain this huge benchmark score difference? One guess by me is that the Benchmark did not adjust the FrankenPHP worker count, which greatly limits the performance potential of FrankenPHP. If FrankenPHP is limited by worker count, then naturally it's not gonna perform well.

https://redd.it/1nfohk5
@r_php
What do you like/dislike about pho

Hello everyone, pretty new coding world, self taught, I’m currently hired on to be a frontend coder, so mostly dealing with Vue, HTML, React, and those type of things. Mainly using VS Code.

But I would like to become more familiar with backend. I already mess with it a bit but not really, I added a missing field that I need for one of my checks.

I know the backend uses Laravel as their framework, php, mongodb and MySQL. And was wondering if anyone could give me some tips or tricks that you wish you knew about working in the backend in general or with php

https://redd.it/1nfuekc
@r_php
Can someone ELI5 PHP-FPM vs. FrankenPHP?

What are the benefits of each, downsides, support levels, production readiness, etc. I use FPM but have heard that Franken is faster.

https://redd.it/1ng2w8e
@r_php
Best way to keep PSR-12 formatting across a whole project?

Finally diving into par formatting, use vscode but would love to have it standardized on the project instead of based on the editor. Any tips/pitfalls?

https://redd.it/1ngbbjo
@r_php
SQLite3 class is slower than PDO?

As the noscript says. I noticed the SQLite3 class being consistently slower than using PDO.

In my project i wanted to implement support for multiple database adapters, to take advantage of the extra functionality that the SQLite3 might have to offer. However, after building the abstraction i found SQLite3 to be lagging behind by 2-4ms.

In case you're wondering about the code.

PDOAdapter:
https://github.com/Sentience-Framework/sentience-v3/blob/main/sentience%2FDatabase%2FAdapters%2FPDOAdapter.php

SQLiteAdapter:
https://github.com/Sentience-Framework/sentience-v3/blob/main/sentience%2FDatabase%2FAdapters%2FSQLiteAdapter.php

Any idea what might be causing this?

https://redd.it/1ngchuq
@r_php
Dilemma: Release my own package or contribute to someone else?

I recently added http logging to my Laravel project, for both incoming and outgoing requests. My reasons were for enhanced security, historical data, and retaining paid API responses such as those from Google APIs. I also made it configurable to include removing sensitive data, ignore certain URLs, pruning, automatic uploads of files, database logging option, etc. I was just about to turn this into a package for release when I found that someone else just recently released a similar package. Their package doesn't do everything mine does, and vice versa, but I don't know if I should release my version or just contribute my ideas to theirs. What is the normal consensus here? I know there are many packages out there that do similar things, but I also don't want to step all over someone else's work.

https://redd.it/1ngprq9
@r_php
Weekly /r/Laravel Help Thread

Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:

What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.

For more immediate support, you can ask in the official Laravel Discord.

Thanks and welcome to the r/Laravel community!

https://redd.it/1ngwl0i
@r_php
Feedback needed: Stream Pulse Event Streaming & Monitoring Tool (MVP with Redis Streams)

Hey everyone

I’m working on a side project called Stream Pulse a lightweight tool to help developers manage event-driven workflows. The idea is to support multiple backends in the future, but for the MVP (v1) I’m starting with Redis Streams.

What it does so far:
• Uses Redis Streams to handle events.
• UI to monitor streams (consumer lag, event list).
• Configurable retention (how long to keep events).
• DLQ (Dead Letter Queue) for failed events, with retry support.

What I need your help with:
• As Laravel devs, do you find this useful for real projects?
• What features would you want to see in v1 or v2 (e.g. metrics, alerting, integrations)?
• Would you prefer this as a standalone monitoring tool or a package you can drop into Laravel projects?

My goal is to make event handling + monitoring developer-friendly without needing to jump into Kafka/RabbitMQ complexity unless really needed.

Would love to hear your thoughts

https://redd.it/1ngwy63
@r_php
Weekly Ask Anything Thread

Feel free to ask any questions you think may not warrant a post. Asking for help here is also fine.

https://redd.it/1nhazyz
@r_php