this post was submitted on 11 Jul 2023
2 points (100.0% liked)

PHP

540 readers
1 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 1 year ago
MODERATORS
 

To lighten up some discussion here, I would like to ask what features or changes you would love to see in future PHP versions? We know that in recent versions a lot of nice adjustments were added, but I bet most of us dreams for more.

I personally would love to see types on inline variables, at first even not strict. However, I don’t know if it’s remotely possible with how currently the language is implemented.

top 5 comments
sorted by: hot top controversial new old
[–] Zd47@lemmy.world 2 points 1 year ago

Genetics, updated built-in functions (types, order of arguments, naming), better attribute reading support (should be easier), threads or support long running processes, one line methods (kotlin like), updated env-var handling especially $_SERVER/POST/GET...

[–] blackshadev@programming.dev 2 points 1 year ago

Proper typing of nested or generic types. For instance: generic classes or array elements without phpdoc's template.

For me the typing of array elements is the most important one. As soon as you have some form of array, the typing in php ends. I see this as such a short coming in the growing type system of php. Seeing a lonely array type always leaves me questioning simple things like: What kind of array is it, a list of strings, objects? Or maybe an associative array? Does it even hold items? Why are we here?

[–] spartanatreyu@programming.dev 0 points 1 year ago (1 children)

This one right here: https://wiki.php.net/rfc/consistent_function_names

Right now the only reason I ever use php is because I have to.

This one simple change would bring me half way to wanting to use php for fun (the other half would be making debugging easier).

[–] prwnr@programming.dev 0 points 1 year ago (1 children)

Could you wrote more about that debugging? I’m curious what you find not easy.

[–] spartanatreyu@programming.dev 1 points 1 year ago

Mainly because you've got to setup PHP to be debuggable in the first place.

And setting up PHP is already a hassle. When a dev has to set up php in about 5 separate ways just to figure out which one is actually debuggable, then PHP has a problem.