PHP

667 readers
2 users here now

Welcome to /c/php! This is a community for PHP developers and enthusiasts to share and discuss anything related to PHP. From the latest updates and tutorials, to your burning questions and amazing personal projects, we welcome all contributions.

Let's foster an environment of respect, learning, and mutual growth. Whether you're an experienced PHP developer, a beginner, or just interested in learning more about PHP, we're glad to have you here!

Let's code, learn, and grow together!

founded 2 years ago
MODERATORS
1
2
submitted 2 weeks ago by [email protected] to c/php
2
6
PHP 8.4.7 Released! (www.php.net)
submitted 2 weeks ago by [email protected] to c/php
3
 
 

June 17, 2025

  • 13:30–19:00 CET/CEST
  • 07:30–13:00 EST/EDT
  • 11:30–17:00 UTC
4
4
submitted 1 month ago by [email protected] to c/php
 
 

Internals link: https://externals.io/message/127120

Note: I am not the RFC author.

5
 
 

Note: I am not the RFC author.

6
7
9
submitted 3 months ago by Olissipo to c/php
8
 
 

I noticed that if you have too few pm_children set then some requests hang until timeout. This surprised me - I'd expect an immediate error, but it's more like a tarpit! For ages I was thinking my server was not performant, then I noticed via top that it wasn't doing or waiting while the browser was.

I have two questions:

  1. If you have pm_max_children=1 and you occupy that and submit another request, what actually happens? (I'm proxying through nginx.) HTTP doesn't have a "40_ Come back later".

  2. (if life deals you lemons...) if you can generate a tarpit that doesn't use server resources, this could be quite useful to know about too!

9
 
 

A summary of the highlights and key accomplishments of the Symfony project in 2024.

10
14
submitted 5 months ago* (last edited 5 months ago) by Olissipo to c/php
 
 

My TLDR is:

  • Their team was using PHP

  • Before doing a complete re-write they evaluated other languages

  • Rust ruled out due to cost/benefit, being the fastest in the list, but also the most complex

  • PHP kept as the main language because:

    • The ecosystem is mature
    • The PHP/Symfony (and Roadrunner) stack meets their high-performance needs
  • Inertia: their team "already had extensive experience" in it

  • They already integrated Go in some microservices

  • They aren't locked to PHP, and will continue to evaluate these programming languages and others

11
 
 

Ever wanted to provide your arguments to a function as a comment?

https://gist.github.com/RikudouSage/18defbf1746322a289ae78b2980d0115

#php #cursed #wtf #programming @php

12
21
submitted 6 months ago by Olissipo to c/php
13
9
submitted 7 months ago* (last edited 7 months ago) by [email protected] to c/php
 
 

I've been working on this on and off, could use some other eyes to help expand features, maybe some pull requests. Let me know what you think. I just uploaded version 0.0.12 and I am going to start working on 0.0.13. The CMS is built in a bundle, so that's where most of the features are. What I have linked here is the skeleton app, but installation is still beefy. Thanks everyone!

Edit: Forgot the link to the bundle https://github.com/SeleneSoftware/seleneCMSBundle

14
 
 

Should I create functions for packages/libraries that allow optional parameters to accept null?

In this example below, I set the 3rd and 4th parameter as null which will act as the default value.

myLibrary::myFunction(1, 7, null, null, true);

Or is this not a good way to go about creating functions for a package and therefore should not accept null as a parameter value.

myLibrary::myFunction(1, 7, false, 4, true);
15
16
2
submitted 9 months ago by prwnr to c/php
17
8
submitted 9 months ago by prwnr to c/php
 
 

I want to try to migrate from PHPStorm to VSCode, what plugins to get to have the experience similar? I mean the code inspections, renaming, usage etc. Will PHL Intelephense plugin be all I need to achieve this? with xdebug and phpunit plugins in addition to that, or there are some other plugins that make the transition better?

18
13
PHP 8.3.10 Released (www.php.net)
submitted 9 months ago by mac to c/php
19
20
5
submitted 10 months ago by mac to c/php
21
12
submitted 10 months ago by mac to c/php
22
4
submitted 11 months ago by mac to c/php
23
24
25
 
 

In conclusion, it is easy to see PHP in 2024 as the forgotten child of web development, while JavaScript is the most popular kid in class. Sadly for PHP, its decline in usage is unlikely to stop any time soon — why would it, when WordPress developers are busy adapting to a new JavaScript paradigm? But at least there is active development at the PHP Foundation.

view more: next ›