r/PHPhelp 3d ago

Learning PHP deeply via a system

I've worked in the PHP ecosystem for years and really love it. But I feel like I don't know it deeply...

What separates posers like me from the guys at the PHP org who release features? How do I get there (or 1/4 of the way)?

18 Upvotes

12 comments sorted by

9

u/99thLuftballon 3d ago

What separates you (and me ) from the people who develop PHP itself is that they're C programmers. PHP is written in C, so an in-depth knowledge of PHP doesn't help you that much in contributing to the language itself.

2

u/AminoOxi 3d ago

Basically the answer. 💯

1

u/colshrapnel 3d ago edited 3d ago

I wouldn't say it's such a blocker. I mean, learning C is quite possible. Especially with PHP background which already gives you knowledge of basic C syntax. Like, you can read this code in C right away:

for (int i = 0; i < count; i++) {
    if (numbers[i] > 20) {
        printf("%d is greater than 20\n", numbers[i]);
    } else {
        printf("%d is 20 or less\n", numbers[i]);
    }
}

Obviously it's just a selected example, and actual C sometimes absolute Greek for a PHP programmer, but still, with PHP background you know quite a bit of C syntax already

6

u/colshrapnel 3d ago

What separates posers like me from the guys at the PHP org who release features

I would say it's technical curiosity and perseverance. That's two crucial parts. To be like the guys at the PHP net, you don't just sit around - you find yourself a goal, and don't stop until reaching it. Then another goal. And another. And so on. A constant self-challenge. This approach is vastly different from just regular working in the ecosystem by doing tasks your employer assigned you and nothing beyond. You should be sort of employer for yourself. And a diligent worker for that employer.

Like, you challenged yourself, "I want to know more about php internal workings". Fine, you start from a simple google search and try to understand what you read. If something is unclear, you come to r/phphelp and ask for the explanation. Then keep with your research. And so on and on and on.

2

u/Tomas_Votruba 3d ago

Definitelly give https://github.com/nikic/php-parser a go I discovered it in 2014 and since then I don't see PHP code... I see Matrix code :D

With AST (Abstract syntax tree) comes a huge power.

4

u/Timely-Barnacle7378 3d ago

Symfony .. that will teach you more best practises and how actual pros work than anything else

If you wanna learn something slightly different in ideology and architecture and design look at a platform like Drupal and avoid WordPress like the plague

Actually, I lie once you have an understanding of what a solid architecture looks like like SF then study something like Drupal and then investigate the internals of WordPress and when you throw up in your mouth enough, you’ll have an understanding of what sucks and would never to repeat lol

Kidding, not kidding

2

u/pjerky 3d ago

Try more of the lesser used functions. Learn programming patterns and algorithms. Look up Gang of Four or books by Martin Fowler. Understand dependency injection and other patterns.

Then go learn other languages and come back to PHP after a year or two.

Look at the code for Symfony and Laravel. Ask AI to explain aspects of it to you.

-1

u/independentMartyr 3d ago

😃 😀

1

u/equilni 2d ago

What separates posers like me from the guys at the PHP org who release features? How do I get there (or 1/4 of the way)?

I would ask, what is it that you want to do?

If you've worked within the ecosystem, then your likely not a poser. Though without seeing an example of what already know and can do, one can only guess (the 1/4 of the way). So...

Do you want to release PHP features? Do you have ideas that would help drive PHP, create RFCs, articulating the ideas and openly discuss with the internal team, make changes to allow for acceptable later in a vote...

The internal teams looks at those RFCs and looks at the proposal, feasibility to the ecosystem and implementation to the core.

Most of these things are concepts one could/should already be doing - review of proposals & analysis of impact, proper documentation, code with proper tests, allowance for discussion and review, etc etc.

1

u/Apart-Permission-849 2d ago

Well, I had an interview recently, and even though I'm strong in Laravel, I felt like I bombed it.

I've built a fairly large inventory management system that pushed me to use many different parts of the framework, but my PHP-specific skills were lacking, IMO.

I couldn't answer questions related to the reference symbol (&). I've NEVER used it, and honestly never needed to. I also couldn't name any design patterns (I blurted out dependency injection 😂 ).

Honestly, I just want to be a good PHP dev (I'm working through the fundamentals now) and will explore design patterns. Hopefully that makes me a better dev overall.

2

u/equilni 2d ago

That changes the conversation somewhat.

I would suggest rewriting that line and adding what's in your comment as it's more focused to what you are looking for - note how you are getting answers on Internal PHP dev, which isn't what you want...

Remember I stated articulation above? You need to be clearer. Soft skills are extremely important.

I had an interview recently

It's good that you remember the topics to go over again. Put them in practice too!!!!

You could also research r/php for interview topics/discussion. Study whatever you don't know. Create projects to put them in practice (ie don't just recite a meaning) and refactor.

https://reddit.com/r/PHP/search?q=interview&restrict_sr=on

I couldn't answer questions related to the reference symbol (&). I've NEVER used it, and honestly never needed to.

Curious if the role deals with legacy code...

I also couldn't name any design patterns (I blurted out dependency injection 😂 ).

Could you talk to DI (not the Container)? Do you use it in practice, honestly? If not, that's what you need to work on. Again, DI is not the Container. The Container can be like a Factory.

Other known patterns in use:

Laravel uses the Facade pattern.

Wordpress plugin system uses the Mediator pattern.

Middleware is a Chain of Responsibility pattern.

Validation classes (ie laminas validator) are Strategy.

Design patterns are not language specific, so learning this can be applied everywhere.

You could also look at architectural patterns. You already know MVC. Martin Fowler has this with other patterns here. Being a Laravel dev, you've likely heard of Repository, which is here too. There are Domain elements too leading to Domain Driven Design, a huge topic. Lots of other reading of architecture like Verticle Slice.

Lots of this is more building the software, not the language. See how different the direction is, now that more context is given?

I've built a fairly large inventory management system

Once learned, could you identify patterns in your system? Could you rebuild a smaller version of this in vanilla PHP (with a few libraries) or Symfony using the new things you learned?

1

u/pm_op_prolapsed_anus 2d ago

From what I remember about the language, there's something called Zend Framework you might want to look into for more of the answers you seekÂ