Skip to main content

PHP Collective

Discuss PHP with peers and experts Learn more
A new space for technical discussions about PHP
Share your insights, advice and experience with peers and experts
Engage and discuss in threaded post replies

Discussions

Browse discussion posts about PHP.

81 discussion posts
Sorted by:
2 votes
225 views
5 replies

Best Practices for Rendering Reusable HTML Components in PHP

In PHP, I have been using functions to render reusable HTML components instead of using `include` or `require`. This approach allows me to pass parameters and dynamically modify the generated output. ...

Code Spirit's user avatar
  • 5,111
5 votes
61 views
1 reply

Fig/PSR MailerInterface. Would it be useful?

I've noticed that MailerInterface is a very common interface among frameworks and components. I recently created one myself so that I can provide different adapters for different mailer components in ...

Tyrsson's user avatar
  • 183
111 votes
11k views
78 replies

Why do people keep shouting "PHP is Dead" always?

So, there are a lot of toxic devs who keep saying PHP is sh*t and is dead. It has no future etc. But for me, I really love it. So why do some hate it so much? And does it actually have no future? And ...

Chris Henry's user avatar
1 vote
273 views
12 replies

Best approach for scheduling recurring tasks in PHP?

Hey, community! I'm developing a system in PHP, hosted on a Linux server, and I need to implement recurring tasks, such as executing a job every 7 days or monthly. Since I don’t have much experience ...

elh's user avatar
  • 56
79 votes
10k views
162 replies

What inspired you to program?

Hey everyone, I've been pondering a question for a while now a singular question which is: What inspired you to start programming? For me, it was the realization that there are no boundaries, and I ...

M_G's user avatar
  • 1
0 votes
56 views
2 replies

Use seperate settings for S3

In my case in the project I maintain I use S3Client directly and I am looking for a way to make it as a service. Using a 3rd party lib will result a large scale refactor. Also using 3rd party libs is ...

Dimitrios Desyllas's user avatar
3 votes
338 views
12 replies

What is Design pattern?

I am little bit confused about design pattern. Is it necessary to use design pattern in every application? If not where we should use and why?

Justus's user avatar
  • 1
3 votes
345 views
8 replies

Why does PHP have a "bad reputation" among some developers? Does it still have a strong future?

I’ve often come across developers who dismiss PHP, saying it's outdated or lacking compared to other languages. But personally, I’ve found PHP to be reliable and effective, especially when using ...

Keith Walker's user avatar
2 votes
290 views
14 replies

Security tips when submitting a form in php

Hello, I would like to ask about submitting a form ( in php ) and the questions I have about it.I hope it will be a comprehensive discussion and everyone will benefit from it. Thank you and I ...

MSO's user avatar
  • 19
2 votes
835 views
28 replies

Does it make sense to throw an exception in a try block in PHP?

So, does this code make sense, and if yes, under what circumstances? try { throw new \Exception('First exception...'); } catch (\Exception $e) { throw ...

Gimby's user avatar
  • 5,282
15 votes
1k views
15 replies

What are some uses of Enums?

I occasionally come across mention of Enums but I haven't been able to find a good use case for them in my code. Take this example from the PHP documentation: <?php enum SortOrder { case Asc; ...

Tejas Parnerkar's user avatar
4 votes
376 views
3 replies

What Age Do Programmers Typically Reach Their Peak Performance?

I'm curious about the typical career trajectory for programmers in terms of peak performance. Is there a specific age range or number of years of experience after which a programmer is generally ...

Sergey A Kryukov's user avatar
14 votes
1k views
35 replies

Project to help me get a job

I came back to SO in attempt to re-ask this and I saw the 'new' discussions page. This is exactly what I was looking for. I put posts up to 'the coding forums' in attempt to get help with this with no ...

Sergey A Kryukov's user avatar
4 votes
266 views
12 replies

Pros and Cons of JavaScript (Node.js) vs. PHP for Email and File Handling?

I am developing a cloud service application in C++ that interacts with a database (SQLIte3) and manages user accounts, file uploads/downloads, and metadata. While most of the backend functionality is ...

Sergey A Kryukov's user avatar
4 votes
398 views
3 replies

Why use abstract classes when method overriding can achieve the same functionality in php?

I’m trying to understand the practical importance of abstract classes in object-oriented programming, particularly in PHP. From my understanding, abstract classes enforce child classes to implement ...

Sergey A Kryukov's user avatar
15 30 50 per page
1
2 3 4 5 6